Replace svelte with Solidjs
This commit is contained in:
parent
34cf5f9742
commit
50b1059de2
|
@ -2,9 +2,9 @@ import { defineConfig } from 'astro/config';
|
||||||
import rehypeKatex from 'rehype-katex';
|
import rehypeKatex from 'rehype-katex';
|
||||||
import remarkMath from 'remark-math';
|
import remarkMath from 'remark-math';
|
||||||
import remarkEmoji from 'remark-emoji';
|
import remarkEmoji from 'remark-emoji';
|
||||||
import svelte from "@astrojs/svelte";
|
|
||||||
import mdx from '@astrojs/mdx';
|
import mdx from '@astrojs/mdx';
|
||||||
import remarkRuby from './src/assets/ruby';
|
import remarkRuby from './src/assets/ruby';
|
||||||
|
import solid from '@astrojs/solid-js';
|
||||||
|
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
|
@ -25,7 +25,7 @@ export default defineConfig({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
integrations: [
|
integrations: [
|
||||||
svelte(),
|
|
||||||
mdx(),
|
mdx(),
|
||||||
|
solid()
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/mdx": "^0.18.4",
|
"@astrojs/mdx": "^0.18.4",
|
||||||
"@astrojs/svelte": "^2.1.0",
|
"@astrojs/solid-js": "^2.1.0",
|
||||||
"astro": "^2.2.3",
|
"astro": "^2.3.0",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"leaflet": "^1.9.3",
|
"leaflet": "^1.9.3",
|
||||||
"leaflet.markercluster": "^1.5.3",
|
"leaflet.markercluster": "^1.5.3",
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"remark-parse": "^10.0.1",
|
"remark-parse": "^10.0.1",
|
||||||
"remark-rehype": "^10.1.0",
|
"remark-rehype": "^10.1.0",
|
||||||
"reveal.js": "^4.5.0",
|
"reveal.js": "^4.5.0",
|
||||||
"svelte": "^3.58.0",
|
"solid-js": "^1.7.3",
|
||||||
"unified": "^10.1.2",
|
"unified": "^10.1.2",
|
||||||
"unist-util-visit": "^4.1.2"
|
"unist-util-visit": "^4.1.2"
|
||||||
},
|
},
|
||||||
|
@ -34,7 +34,6 @@
|
||||||
"@types/leaflet": "^1.9.3",
|
"@types/leaflet": "^1.9.3",
|
||||||
"@types/leaflet.markercluster": "^1.5.1",
|
"@types/leaflet.markercluster": "^1.5.1",
|
||||||
"@types/lunr": "^2.3.4",
|
"@types/lunr": "^2.3.4",
|
||||||
"@types/marked": "^4.0.8",
|
|
||||||
"@types/reveal.js": "^4.4.2",
|
"@types/reveal.js": "^4.4.2",
|
||||||
"@types/unist": "^2.0.6",
|
"@types/unist": "^2.0.6",
|
||||||
"sass": "^1.62.0"
|
"sass": "^1.62.0"
|
||||||
|
|
212
pnpm-lock.yaml
212
pnpm-lock.yaml
|
@ -3,13 +3,13 @@ lockfileVersion: '6.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
'@astrojs/mdx':
|
'@astrojs/mdx':
|
||||||
specifier: ^0.18.4
|
specifier: ^0.18.4
|
||||||
version: 0.18.4(astro@2.2.3)(rollup@3.20.2)
|
version: 0.18.4(astro@2.3.0)(rollup@3.20.2)
|
||||||
'@astrojs/svelte':
|
'@astrojs/solid-js':
|
||||||
specifier: ^2.1.0
|
specifier: ^2.1.0
|
||||||
version: 2.1.0(astro@2.2.3)(svelte@3.58.0)(typescript@4.9.5)(vite@4.2.1)
|
version: 2.1.0(@babel/core@7.21.4)(solid-js@1.7.3)
|
||||||
astro:
|
astro:
|
||||||
specifier: ^2.2.3
|
specifier: ^2.3.0
|
||||||
version: 2.2.3(sass@1.62.0)
|
version: 2.3.0(sass@1.62.0)
|
||||||
dayjs:
|
dayjs:
|
||||||
specifier: ^1.11.7
|
specifier: ^1.11.7
|
||||||
version: 1.11.7
|
version: 1.11.7
|
||||||
|
@ -49,9 +49,9 @@ dependencies:
|
||||||
reveal.js:
|
reveal.js:
|
||||||
specifier: ^4.5.0
|
specifier: ^4.5.0
|
||||||
version: 4.5.0
|
version: 4.5.0
|
||||||
svelte:
|
solid-js:
|
||||||
specifier: ^3.58.0
|
specifier: ^1.7.3
|
||||||
version: 3.58.0
|
version: 1.7.3
|
||||||
unified:
|
unified:
|
||||||
specifier: ^10.1.2
|
specifier: ^10.1.2
|
||||||
version: 10.1.2
|
version: 10.1.2
|
||||||
|
@ -69,9 +69,6 @@ devDependencies:
|
||||||
'@types/lunr':
|
'@types/lunr':
|
||||||
specifier: ^2.3.4
|
specifier: ^2.3.4
|
||||||
version: 2.3.4
|
version: 2.3.4
|
||||||
'@types/marked':
|
|
||||||
specifier: ^4.0.8
|
|
||||||
version: 4.0.8
|
|
||||||
'@types/reveal.js':
|
'@types/reveal.js':
|
||||||
specifier: ^4.4.2
|
specifier: ^4.4.2
|
||||||
version: 4.4.2
|
version: 4.4.2
|
||||||
|
@ -118,13 +115,13 @@ packages:
|
||||||
vscode-uri: 3.0.7
|
vscode-uri: 3.0.7
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@astrojs/markdown-remark@2.1.3(astro@2.2.3):
|
/@astrojs/markdown-remark@2.1.4(astro@2.3.0):
|
||||||
resolution: {integrity: sha512-Di8Qbit9p7L7eqKklAJmiW9nVD+XMsNHpaNzCLduWjOonDu9fVgEzdjeDrTVCDtgrvkfhpAekuNXrp5+w4F91g==}
|
resolution: {integrity: sha512-z5diCcFo2xkBAJ11KySAIKpZZkULZmzUvWsZ2VWIOrR6QrEgEfVl5jTpgPSedx4m+xUPuemlUviOotGB7ItNsQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
astro: ^2.2.0
|
astro: ^2.3.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@astrojs/prism': 2.1.1
|
'@astrojs/prism': 2.1.1
|
||||||
astro: 2.2.3(sass@1.62.0)
|
astro: 2.3.0(sass@1.62.0)
|
||||||
github-slugger: 1.5.0
|
github-slugger: 1.5.0
|
||||||
import-meta-resolve: 2.2.2
|
import-meta-resolve: 2.2.2
|
||||||
rehype-raw: 6.1.1
|
rehype-raw: 6.1.1
|
||||||
|
@ -141,11 +138,11 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@astrojs/mdx@0.18.4(astro@2.2.3)(rollup@3.20.2):
|
/@astrojs/mdx@0.18.4(astro@2.3.0)(rollup@3.20.2):
|
||||||
resolution: {integrity: sha512-yLlHF74oBtCCPnCY4LBios3OrXc97IXIBVOWuyXxmNwAYMA4xIfClN2YP9cFQJITDI/d80qrANzQLQInUNKlHA==}
|
resolution: {integrity: sha512-yLlHF74oBtCCPnCY4LBios3OrXc97IXIBVOWuyXxmNwAYMA4xIfClN2YP9cFQJITDI/d80qrANzQLQInUNKlHA==}
|
||||||
engines: {node: '>=16.12.0'}
|
engines: {node: '>=16.12.0'}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@astrojs/markdown-remark': 2.1.3(astro@2.2.3)
|
'@astrojs/markdown-remark': 2.1.4(astro@2.3.0)
|
||||||
'@astrojs/prism': 2.1.1
|
'@astrojs/prism': 2.1.1
|
||||||
'@mdx-js/mdx': 2.3.0
|
'@mdx-js/mdx': 2.3.0
|
||||||
'@mdx-js/rollup': 2.3.0(rollup@3.20.2)
|
'@mdx-js/rollup': 2.3.0(rollup@3.20.2)
|
||||||
|
@ -176,20 +173,17 @@ packages:
|
||||||
prismjs: 1.29.0
|
prismjs: 1.29.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@astrojs/svelte@2.1.0(astro@2.2.3)(svelte@3.58.0)(typescript@4.9.5)(vite@4.2.1):
|
/@astrojs/solid-js@2.1.0(@babel/core@7.21.4)(solid-js@1.7.3):
|
||||||
resolution: {integrity: sha512-upfkscrNuZbQvqVB5EG38FPJCgHCxO/LOJLAap75rO/++c1T7ztbVru4uSYVBRJkzTDuH3TS52T8kFTVgHXx/g==}
|
resolution: {integrity: sha512-p07DP9NRWJPjtF+CzPZ9lzOMkoyw6wSs3S6g3OZUxR+DVQy3VIXXDqCcnZZVJI34VakkHuViZaoNNkBW/9I54w==}
|
||||||
engines: {node: '>=16.12.0'}
|
engines: {node: '>=16.12.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
astro: ^2.1.0
|
solid-js: ^1.4.3
|
||||||
svelte: ^3.54.0
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/vite-plugin-svelte': 2.0.4(svelte@3.58.0)(vite@4.2.1)
|
babel-preset-solid: 1.7.3(@babel/core@7.21.4)
|
||||||
astro: 2.2.3(sass@1.62.0)
|
solid-js: 1.7.3
|
||||||
svelte: 3.58.0
|
vitefu: 0.2.4(vite@4.2.1)
|
||||||
svelte2tsx: 0.5.23(svelte@3.58.0)(typescript@4.9.5)
|
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- '@babel/core'
|
||||||
- typescript
|
|
||||||
- vite
|
- vite
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
@ -301,6 +295,13 @@ packages:
|
||||||
'@babel/types': 7.21.4
|
'@babel/types': 7.21.4
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@babel/helper-module-imports@7.18.6:
|
||||||
|
resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==}
|
||||||
|
engines: {node: '>=6.9.0'}
|
||||||
|
dependencies:
|
||||||
|
'@babel/types': 7.21.4
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@babel/helper-module-imports@7.21.4:
|
/@babel/helper-module-imports@7.21.4:
|
||||||
resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==}
|
resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==}
|
||||||
engines: {node: '>=6.9.0'}
|
engines: {node: '>=6.9.0'}
|
||||||
|
@ -784,25 +785,6 @@ packages:
|
||||||
rollup: 3.20.2
|
rollup: 3.20.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sveltejs/vite-plugin-svelte@2.0.4(svelte@3.58.0)(vite@4.2.1):
|
|
||||||
resolution: {integrity: sha512-pjqhW00KwK2uzDGEr+yJBwut+D+4XfJO/+bHHdHzPRXn9+1Jeq5JcFHyrUiYaXgHtyhX0RsllCTm4ssAx4ZY7Q==}
|
|
||||||
engines: {node: ^14.18.0 || >= 16}
|
|
||||||
peerDependencies:
|
|
||||||
svelte: ^3.54.0
|
|
||||||
vite: ^4.0.0
|
|
||||||
dependencies:
|
|
||||||
debug: 4.3.4
|
|
||||||
deepmerge: 4.3.1
|
|
||||||
kleur: 4.1.5
|
|
||||||
magic-string: 0.30.0
|
|
||||||
svelte: 3.58.0
|
|
||||||
svelte-hmr: 0.15.1(svelte@3.58.0)
|
|
||||||
vite: 4.2.1(sass@1.62.0)
|
|
||||||
vitefu: 0.2.4(vite@4.2.1)
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/@types/acorn@4.0.6:
|
/@types/acorn@4.0.6:
|
||||||
resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==}
|
resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -892,10 +874,6 @@ packages:
|
||||||
resolution: {integrity: sha512-j4x4XJwZvorEUbA519VdQ5b9AOU9TSvfi8tvxMAfP8XzNLtFex7A8vFQwqOx3WACbV0KMXbACV3cZl4/gynQ7g==}
|
resolution: {integrity: sha512-j4x4XJwZvorEUbA519VdQ5b9AOU9TSvfi8tvxMAfP8XzNLtFex7A8vFQwqOx3WACbV0KMXbACV3cZl4/gynQ7g==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@types/marked@4.0.8:
|
|
||||||
resolution: {integrity: sha512-HVNzMT5QlWCOdeuBsgXP8EZzKUf0+AXzN+sLmjvaB3ZlLqO+e4u0uXrdw9ub69wBKFs+c6/pA4r9sy6cCDvImw==}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/@types/mdast@3.0.11:
|
/@types/mdast@3.0.11:
|
||||||
resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==}
|
resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -1020,8 +998,8 @@ packages:
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/astro@2.2.3(sass@1.62.0):
|
/astro@2.3.0(sass@1.62.0):
|
||||||
resolution: {integrity: sha512-Pd67ZBoYxqeyHCZ0UpdmDZYNgcs7JTwc0NMzUScrH4y2hjSY4S8iwmNUtd9pf65gkxMpEbqfvQj06kLzgi4HZg==}
|
resolution: {integrity: sha512-1t8U6vDHQLT0gw0IXZLtJKDIShCcJwOuh0K1JyPgFwu1famb/ggyvsqp9nxBZIbNV8BcAWDHrJA+Z7hh1oEiWA==}
|
||||||
engines: {node: '>=16.12.0', npm: '>=6.14.0'}
|
engines: {node: '>=16.12.0', npm: '>=6.14.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
|
@ -1032,7 +1010,7 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@astrojs/compiler': 1.3.1
|
'@astrojs/compiler': 1.3.1
|
||||||
'@astrojs/language-server': 0.28.3
|
'@astrojs/language-server': 0.28.3
|
||||||
'@astrojs/markdown-remark': 2.1.3(astro@2.2.3)
|
'@astrojs/markdown-remark': 2.1.4(astro@2.3.0)
|
||||||
'@astrojs/telemetry': 2.1.0
|
'@astrojs/telemetry': 2.1.0
|
||||||
'@astrojs/webapi': 2.1.0
|
'@astrojs/webapi': 2.1.0
|
||||||
'@babel/core': 7.21.4
|
'@babel/core': 7.21.4
|
||||||
|
@ -1093,6 +1071,28 @@ packages:
|
||||||
- terser
|
- terser
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/babel-plugin-jsx-dom-expressions@0.36.10(@babel/core@7.21.4):
|
||||||
|
resolution: {integrity: sha512-QA2k/14WGw+RgcGGnEuLWwnu4em6CGhjeXtjvgOYyFHYS2a+CzPeaVQHDOlfuiBcjq/3hWMspHMIMnPEOIzdBg==}
|
||||||
|
peerDependencies:
|
||||||
|
'@babel/core': ^7.20.12
|
||||||
|
dependencies:
|
||||||
|
'@babel/core': 7.21.4
|
||||||
|
'@babel/helper-module-imports': 7.18.6
|
||||||
|
'@babel/plugin-syntax-jsx': 7.21.4(@babel/core@7.21.4)
|
||||||
|
'@babel/types': 7.21.4
|
||||||
|
html-entities: 2.3.3
|
||||||
|
validate-html-nesting: 1.2.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/babel-preset-solid@1.7.3(@babel/core@7.21.4):
|
||||||
|
resolution: {integrity: sha512-HOdyrij99zo+CBrmtDxSexBAl54vCBCfBoyueLBvcfVniaEXNd4ftKqSN6XQcLvFfCY28UFO+DHaigXzWKOfzg==}
|
||||||
|
peerDependencies:
|
||||||
|
'@babel/core': ^7.0.0
|
||||||
|
dependencies:
|
||||||
|
'@babel/core': 7.21.4
|
||||||
|
babel-plugin-jsx-dom-expressions: 0.36.10(@babel/core@7.21.4)
|
||||||
|
dev: false
|
||||||
|
|
||||||
/bail@2.0.2:
|
/bail@2.0.2:
|
||||||
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
|
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -1139,7 +1139,7 @@ packages:
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001478
|
caniuse-lite: 1.0.30001478
|
||||||
electron-to-chromium: 1.4.361
|
electron-to-chromium: 1.4.364
|
||||||
node-releases: 2.0.10
|
node-releases: 2.0.10
|
||||||
update-browserslist-db: 1.0.10(browserslist@4.21.5)
|
update-browserslist-db: 1.0.10(browserslist@4.21.5)
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -1302,6 +1302,10 @@ packages:
|
||||||
which: 2.0.2
|
which: 2.0.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/csstype@3.1.2:
|
||||||
|
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/dayjs@1.11.7:
|
/dayjs@1.11.7:
|
||||||
resolution: {integrity: sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==}
|
resolution: {integrity: sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -1324,20 +1328,11 @@ packages:
|
||||||
character-entities: 2.0.2
|
character-entities: 2.0.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/dedent-js@1.0.1:
|
|
||||||
resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/deepmerge-ts@4.3.0:
|
/deepmerge-ts@4.3.0:
|
||||||
resolution: {integrity: sha512-if3ZYdkD2dClhnXR5reKtG98cwyaRT1NeugQoAPTTfsOpV9kqyeiBF9Qa5RHjemb3KzD5ulqygv6ED3t5j9eJw==}
|
resolution: {integrity: sha512-if3ZYdkD2dClhnXR5reKtG98cwyaRT1NeugQoAPTTfsOpV9kqyeiBF9Qa5RHjemb3KzD5ulqygv6ED3t5j9eJw==}
|
||||||
engines: {node: '>=12.4.0'}
|
engines: {node: '>=12.4.0'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/deepmerge@4.3.1:
|
|
||||||
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/defaults@1.0.4:
|
/defaults@1.0.4:
|
||||||
resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==}
|
resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -1376,8 +1371,8 @@ packages:
|
||||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/electron-to-chromium@1.4.361:
|
/electron-to-chromium@1.4.364:
|
||||||
resolution: {integrity: sha512-VocVwjPp05HUXzf3xmL0boRn5b0iyqC7amtDww84Jb1QJNPBc7F69gJyEeXRoriLBC4a5pSyckdllrXAg4mmRA==}
|
resolution: {integrity: sha512-v6GxKdF57qfweXSfnne9nw1vS/86G4+UtscEe+3HQF+zhhrjAY4+9A4gstIQO56gyZvVrt9MZwt9aevCz/tohQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/emmet@2.4.2:
|
/emmet@2.4.2:
|
||||||
|
@ -1783,6 +1778,10 @@ packages:
|
||||||
space-separated-tokens: 2.0.2
|
space-separated-tokens: 2.0.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/html-entities@2.3.3:
|
||||||
|
resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/html-escaper@3.0.3:
|
/html-escaper@3.0.3:
|
||||||
resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==}
|
resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -2037,12 +2036,6 @@ packages:
|
||||||
resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
|
resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/lower-case@2.0.2:
|
|
||||||
resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==}
|
|
||||||
dependencies:
|
|
||||||
tslib: 2.5.0
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/lru-cache@5.1.1:
|
/lru-cache@5.1.1:
|
||||||
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
|
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -2067,13 +2060,6 @@ packages:
|
||||||
'@jridgewell/sourcemap-codec': 1.4.15
|
'@jridgewell/sourcemap-codec': 1.4.15
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/magic-string@0.30.0:
|
|
||||||
resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==}
|
|
||||||
engines: {node: '>=12'}
|
|
||||||
dependencies:
|
|
||||||
'@jridgewell/sourcemap-codec': 1.4.15
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/markdown-extensions@1.1.1:
|
/markdown-extensions@1.1.1:
|
||||||
resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==}
|
resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
@ -2692,13 +2678,6 @@ packages:
|
||||||
'@types/nlcst': 1.0.0
|
'@types/nlcst': 1.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/no-case@3.0.4:
|
|
||||||
resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==}
|
|
||||||
dependencies:
|
|
||||||
lower-case: 2.0.2
|
|
||||||
tslib: 2.5.0
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/node-emoji@1.11.0:
|
/node-emoji@1.11.0:
|
||||||
resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==}
|
resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -2816,13 +2795,6 @@ packages:
|
||||||
resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==}
|
resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/pascal-case@3.1.2:
|
|
||||||
resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==}
|
|
||||||
dependencies:
|
|
||||||
no-case: 3.0.4
|
|
||||||
tslib: 2.5.0
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/path-exists@4.0.0:
|
/path-exists@4.0.0:
|
||||||
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
|
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
@ -3067,8 +3039,8 @@ packages:
|
||||||
unist-util-visit: 4.1.2
|
unist-util-visit: 4.1.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/resolve@1.22.2:
|
/resolve@1.22.3:
|
||||||
resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==}
|
resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
is-core-module: 2.12.0
|
is-core-module: 2.12.0
|
||||||
|
@ -3194,6 +3166,11 @@ packages:
|
||||||
lru-cache: 6.0.0
|
lru-cache: 6.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/seroval@0.5.1:
|
||||||
|
resolution: {integrity: sha512-ZfhQVB59hmIauJG5Ydynupy8KHyr5imGNtdDhbZG68Ufh1Ynkv9KOYOAABf71oVbQxJ8VkWnMHAjEHE7fWkH5g==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/server-destroy@1.0.1:
|
/server-destroy@1.0.1:
|
||||||
resolution: {integrity: sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==}
|
resolution: {integrity: sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -3231,6 +3208,13 @@ packages:
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/solid-js@1.7.3:
|
||||||
|
resolution: {integrity: sha512-4hwaF/zV/xbNeBBIYDyu3dcReOZBECbO//mrra6GqOrKy4Soyo+fnKjpZSa0nODm6j1aL0iQRh/7ofYowH+jzw==}
|
||||||
|
dependencies:
|
||||||
|
csstype: 3.1.2
|
||||||
|
seroval: 0.5.1
|
||||||
|
dev: false
|
||||||
|
|
||||||
/source-map-js@1.0.2:
|
/source-map-js@1.0.2:
|
||||||
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
@ -3362,32 +3346,6 @@ packages:
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/svelte-hmr@0.15.1(svelte@3.58.0):
|
|
||||||
resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==}
|
|
||||||
engines: {node: ^12.20 || ^14.13.1 || >= 16}
|
|
||||||
peerDependencies:
|
|
||||||
svelte: '>=3.19.0'
|
|
||||||
dependencies:
|
|
||||||
svelte: 3.58.0
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/svelte2tsx@0.5.23(svelte@3.58.0)(typescript@4.9.5):
|
|
||||||
resolution: {integrity: sha512-jYFnugTQRFmUpvLXPQrKzVYcW5ErT+0QCxg027Zx9BuvYefMZFuoBSTDYe7viPEFGrPPiLgT2m7f5n9khE7f7Q==}
|
|
||||||
peerDependencies:
|
|
||||||
svelte: ^3.24
|
|
||||||
typescript: ^4.1.2
|
|
||||||
dependencies:
|
|
||||||
dedent-js: 1.0.1
|
|
||||||
pascal-case: 3.1.2
|
|
||||||
svelte: 3.58.0
|
|
||||||
typescript: 4.9.5
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/svelte@3.58.0:
|
|
||||||
resolution: {integrity: sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==}
|
|
||||||
engines: {node: '>= 8'}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/synckit@0.8.5:
|
/synckit@0.8.5:
|
||||||
resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==}
|
resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==}
|
||||||
engines: {node: ^14.18.0 || >=16.0.0}
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
|
@ -3428,7 +3386,7 @@ packages:
|
||||||
'@types/json5': 0.0.30
|
'@types/json5': 0.0.30
|
||||||
'@types/resolve': 1.20.2
|
'@types/resolve': 1.20.2
|
||||||
json5: 2.2.3
|
json5: 2.2.3
|
||||||
resolve: 1.22.2
|
resolve: 1.22.3
|
||||||
strip-bom: 4.0.0
|
strip-bom: 4.0.0
|
||||||
type-fest: 0.13.1
|
type-fest: 0.13.1
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -3447,12 +3405,6 @@ packages:
|
||||||
engines: {node: '>=12.20'}
|
engines: {node: '>=12.20'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/typescript@4.9.5:
|
|
||||||
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
|
|
||||||
engines: {node: '>=4.2.0'}
|
|
||||||
hasBin: true
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/typescript@5.0.4:
|
/typescript@5.0.4:
|
||||||
resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==}
|
resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==}
|
||||||
engines: {node: '>=12.20'}
|
engines: {node: '>=12.20'}
|
||||||
|
@ -3585,6 +3537,10 @@ packages:
|
||||||
sade: 1.8.1
|
sade: 1.8.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/validate-html-nesting@1.2.1:
|
||||||
|
resolution: {integrity: sha512-T1ab131NkP3BfXB7KUSgV7Rhu81R2id+L6NaJ7NypAAG5iV6gXnPpQE5RK1fvb+3JYsPTL+ihWna5sr5RN9gaQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/vfile-location@4.1.0:
|
/vfile-location@4.1.0:
|
||||||
resolution: {integrity: sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==}
|
resolution: {integrity: sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -3635,7 +3591,7 @@ packages:
|
||||||
dependencies:
|
dependencies:
|
||||||
esbuild: 0.17.16
|
esbuild: 0.17.16
|
||||||
postcss: 8.4.21
|
postcss: 8.4.21
|
||||||
resolve: 1.22.2
|
resolve: 1.22.3
|
||||||
rollup: 3.20.2
|
rollup: 3.20.2
|
||||||
sass: 1.62.0
|
sass: 1.62.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
|
|
75
src/components/Search.tsx
Normal file
75
src/components/Search.tsx
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
import { createSignal, onMount } from "solid-js";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import lunr from "lunr";
|
||||||
|
|
||||||
|
|
||||||
|
const KEY = 'q' as const;
|
||||||
|
export default function Search() {
|
||||||
|
const [query, setQuery] = createSignal('');
|
||||||
|
|
||||||
|
// Data loaded from server
|
||||||
|
let index: lunr.Index;
|
||||||
|
let metadata: any;
|
||||||
|
async function load() {
|
||||||
|
const data = await fetch('/search.json').then(r => r.json());
|
||||||
|
index = lunr.Index.load(data.index);
|
||||||
|
metadata = data.metadata;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dynamically calculated from query
|
||||||
|
const results = () => index?.search(query()) ?? [];
|
||||||
|
|
||||||
|
// Update URL query and history
|
||||||
|
let debounce: number;
|
||||||
|
function syncHistory(value: string) {
|
||||||
|
clearTimeout(debounce);
|
||||||
|
debounce = setTimeout(() => {
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
(value) ? url.searchParams.set(KEY, value) : url.searchParams.delete(KEY);
|
||||||
|
window.history.pushState({}, '', url);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set query to URL param
|
||||||
|
function sync() {
|
||||||
|
clearTimeout(debounce);
|
||||||
|
setQuery(new URLSearchParams(window.location.search).get('q') || '');
|
||||||
|
}
|
||||||
|
|
||||||
|
function onInput(value: string) {
|
||||||
|
setQuery(value);
|
||||||
|
syncHistory(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(async () => {
|
||||||
|
await load().then(sync);
|
||||||
|
window.addEventListener('popstate', sync);
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<article class="c-search">
|
||||||
|
<h1>Search</h1>
|
||||||
|
<input class="c-search__input" placeholder="Start typing here!"
|
||||||
|
value={query()}
|
||||||
|
onInput={e => onInput(e.target.value)}/>
|
||||||
|
|
||||||
|
{query() && (
|
||||||
|
<section class="c-search__results">
|
||||||
|
<div>Showing results for "{query()}" ({results().length})</div>
|
||||||
|
{results().map(result => {
|
||||||
|
const meta = metadata[result.ref];
|
||||||
|
const date = dayjs(meta.date);
|
||||||
|
return (
|
||||||
|
<a class="c-search__result" href={result.ref}>
|
||||||
|
<span class="c-search__name">{meta.title}</span>
|
||||||
|
<time class="c-search__date" datetime={date.toISOString()}>{date.format("MMM DD, YYYY")}</time>
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</section>
|
||||||
|
) || (
|
||||||
|
<div>No results to show yet...</div>
|
||||||
|
)}
|
||||||
|
</article>
|
||||||
|
);
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
import timeline from '../assets/timeline.json';
|
import timeline from '../assets/timeline.json';
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="sc-timeline">
|
<div class="sc-timeline">
|
||||||
{timeline.map((year: any) => (
|
{timeline.map((year: any) => (
|
||||||
<section class="sc-timeline__year">
|
<section class="sc-timeline__year">
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import lunr from "lunr";
|
|
||||||
import { onMount } from "svelte";
|
|
||||||
|
|
||||||
const KEY = 'q' as const;
|
|
||||||
let value = '';
|
|
||||||
let index: lunr.Index;
|
|
||||||
let results: lunr.Index.Result[] = [];
|
|
||||||
let metadata: any;
|
|
||||||
|
|
||||||
/** Update the value so that it reflects the URL */
|
|
||||||
function sync() {
|
|
||||||
value = new URLSearchParams(window.location.search).get('q') || '';
|
|
||||||
search();
|
|
||||||
}
|
|
||||||
|
|
||||||
let debounce: number; // timer handle
|
|
||||||
/** Update browser URL with the query string */
|
|
||||||
function syncHistory(value: string) {
|
|
||||||
clearTimeout(debounce);
|
|
||||||
debounce = setTimeout(() => {
|
|
||||||
const url = new URL(window.location.href);
|
|
||||||
(value)
|
|
||||||
? url.searchParams.set(KEY, value)
|
|
||||||
: url.searchParams.delete(KEY);
|
|
||||||
window.history.pushState({}, '', url);
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function load() {
|
|
||||||
const data = await fetch('/search.json').then(r => r.json());
|
|
||||||
index = lunr.Index.load(data.index);
|
|
||||||
metadata = data.metadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
function search() {
|
|
||||||
results = (!value || !index) ? [] : index.search(value);
|
|
||||||
syncHistory(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => load().then(sync).then(search));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<article class="c-search">
|
|
||||||
<h1>Search</h1>
|
|
||||||
|
|
||||||
<input class="c-search__input" bind:value on:input={search} placeholder="Start typing here!"/>
|
|
||||||
|
|
||||||
{#if value}
|
|
||||||
<section class="c-search__results">
|
|
||||||
<div>Showing results for "{value}" ({results.length})</div>
|
|
||||||
{#each results as result}
|
|
||||||
{@const meta = metadata[result.ref]}
|
|
||||||
{@const date = dayjs(meta.date)}
|
|
||||||
<a class="c-search__result" href={result.ref}>
|
|
||||||
<span class="c-search__name">{meta.title}</span>
|
|
||||||
<time class="c-search__date" datetime={date.toISOString()}>{date.format("MMM DD, YYYY")}</time>
|
|
||||||
</a>
|
|
||||||
{/each}
|
|
||||||
</section>
|
|
||||||
{:else}
|
|
||||||
<div>No results to show yet...</div>
|
|
||||||
{/if}
|
|
||||||
</article>
|
|
||||||
|
|
||||||
<svelte:window on:popstate={sync} />
|
|
|
@ -12,12 +12,12 @@ Now that you've been warned, please enjoy the transient ramblings that are prese
|
||||||
## Interactive map with my Geotagged photos
|
## Interactive map with my Geotagged photos
|
||||||
Throughout the last few years I've been taking photos in random places. I've spent some time geotagging them, and I've been able to create a map of them. It takes a horrendous amount of time to geotag them, and honestly I've forgotten some places, so it will take a while to add at least some of the rest.
|
Throughout the last few years I've been taking photos in random places. I've spent some time geotagging them, and I've been able to create a map of them. It takes a horrendous amount of time to geotag them, and honestly I've forgotten some places, so it will take a while to add at least some of the rest.
|
||||||
|
|
||||||
[Take me to the map!](@/map/index.md)
|
[Take me to the map!](/map/)
|
||||||
|
|
||||||
## A short guide to the Hanafuda card game
|
## A short guide to the Hanafuda card game
|
||||||
I've been playing Hanafuda for a while now, so I decided to write a short guide to the game. I am by no means good at the game, so take everything with a grain of salt, but it should be enough to get you started.
|
I've been playing Hanafuda for a while now, so I decided to write a short guide to the game. I am by no means good at the game, so take everything with a grain of salt, but it should be enough to get you started.
|
||||||
|
|
||||||
[Take me to the guide!](@/posts/hanafuda.md)
|
[Take me to the guide!](/posts/)
|
||||||
|
|
||||||
## Thanks for visiting!
|
## Thanks for visiting!
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
import Base from "../layouts/Base.astro";
|
import Base from "../layouts/Base.astro";
|
||||||
import Search from "../components/search/Search.svelte";
|
import Search from "../components/Search";
|
||||||
---
|
---
|
||||||
|
|
||||||
<Base>
|
<Base>
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
import { vitePreprocess } from '@astrojs/svelte';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
preprocess: vitePreprocess(),
|
|
||||||
};
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true
|
"allowJs": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"jsxImportSource": "solid-js"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue