diff --git a/package.json b/package.json index 77858c3..feb8200 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "preview": "vite preview", "start": "svelte-kit start", "test": "vitest", - "svgstore": "svgstore -o static/build/icons-sprite.svg src/svg/**.svg", + "svgstore": "svgstore -o src/svg/build/icons-sprite.svg src/svg/**.svg", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "lint": "prettier --plugin-search-dir . --check . && eslint .", diff --git a/src/components/SvgIcon.svelte b/src/components/SvgIcon.svelte index 61975d5..804cb48 100644 --- a/src/components/SvgIcon.svelte +++ b/src/components/SvgIcon.svelte @@ -1,5 +1,5 @@ diff --git a/src/components/portfolio/presentation.svelte b/src/components/portfolio/presentation.svelte index 2912898..71eb913 100644 --- a/src/components/portfolio/presentation.svelte +++ b/src/components/portfolio/presentation.svelte @@ -26,7 +26,7 @@
- {previewVisible ? 'Close' : 'Open'} preview
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 2eafda1..87798df 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1,7 +1,8 @@ import type { LayoutLoad } from './$types' +export const prerender = true export const load = (async ({ fetch }) => { - const blogPostsResponse = await fetch(`/blog/articles/pageSize/5`) + const blogPostsResponse = await fetch(`/blog/articles/pageSize/5.json`) const blogPostsContent = await blogPostsResponse.json() return { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index a2d4acf..a9544eb 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -21,16 +21,16 @@ Portrait diff --git a/src/routes/blog/[...params]/+page.ts b/src/routes/blog/[...params]/+page.ts index 1c9a243..3defa20 100644 --- a/src/routes/blog/[...params]/+page.ts +++ b/src/routes/blog/[...params]/+page.ts @@ -6,7 +6,7 @@ import type { PaginationResult } from '$lib/pagination/pagination' export const load = (async ({ fetch, params }) => { const { page = 1, pageSize = 7, ...filters } = parseParams(params.params) const articleResponse = await fetch( - `/blog/articles/${params.params ? params.params : 'index'}` + `/blog/articles/${params.params ? params.params : 'index'}.json` ).then((r) => r.json()) return { diff --git a/src/routes/blog/[slug=blogPage]/+page.server.ts b/src/routes/blog/[slug=blogPage]/+page.server.ts index 58096cd..2e12d01 100644 --- a/src/routes/blog/[slug=blogPage]/+page.server.ts +++ b/src/routes/blog/[slug=blogPage]/+page.server.ts @@ -6,6 +6,8 @@ import { error, json } from '@sveltejs/kit' import type { PostAttributes } from '../content' import type { PageServerLoad } from './$types' +export const prerender = true + export interface SinglePost { body: string } diff --git a/src/routes/blog/articles/[...params]/+server.ts b/src/routes/blog/articles/[...params].json/+server.ts similarity index 95% rename from src/routes/blog/articles/[...params]/+server.ts rename to src/routes/blog/articles/[...params].json/+server.ts index 450b23c..5eb2289 100644 --- a/src/routes/blog/articles/[...params]/+server.ts +++ b/src/routes/blog/articles/[...params].json/+server.ts @@ -6,6 +6,7 @@ import { json } from '@sveltejs/kit' import { getBlogListing } from '../../content' import type { RequestHandler } from './$types' +export const prerender = true export const GET = (async ({ params }) => { const handledParams = params.params === 'index' ? '' : params.params const { page = 1, pageSize = 7, ...filters } = parseParams(handledParams) diff --git a/src/routes/feed.json/+server.ts b/src/routes/feed.json/+server.ts index cf7eeb2..4186019 100644 --- a/src/routes/feed.json/+server.ts +++ b/src/routes/feed.json/+server.ts @@ -1,6 +1,7 @@ import type { RequestHandler } from '@sveltejs/kit' import { getFeed } from '../feed' +export const prerender = true export const GET = (async ({ setHeaders }) => { const feed = await getFeed() diff --git a/src/routes/feed.xml/+server.ts b/src/routes/feed.xml/+server.ts index f97c20a..7dcfa97 100644 --- a/src/routes/feed.xml/+server.ts +++ b/src/routes/feed.xml/+server.ts @@ -1,6 +1,7 @@ import type { RequestHandler } from '@sveltejs/kit' import { getFeed } from '../feed' +export const prerender = true export const GET = (async ({ setHeaders }) => { const feed = await getFeed() diff --git a/src/routes/portfolio/+page.server.ts b/src/routes/portfolio/+page.server.ts index 62d926b..e73c64e 100644 --- a/src/routes/portfolio/+page.server.ts +++ b/src/routes/portfolio/+page.server.ts @@ -5,6 +5,8 @@ import marked from 'marked' import { parseField } from '../../markdown/parse-markdown' import type { PageServerLoad } from './$types' +export const prerender = true + export interface RecordAttributes { name: string description: string @@ -78,5 +80,5 @@ export const load = (async () => { presentations, } - return response; + return response }) satisfies PageServerLoad diff --git a/src/routes/portfolio/not-neede.ts b/src/routes/portfolio/not-neede.ts deleted file mode 100644 index f7b62bf..0000000 --- a/src/routes/portfolio/not-neede.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { PageLoad } from './$types' - -export const load = (async () => { - const res = await fetch('/portfolio.json') - const content = await res.json() - return { - content, - } -}) satisfies PageLoad diff --git a/src/routes/showcase/index.svelte b/src/routes/showcase/+page.svelte similarity index 100% rename from src/routes/showcase/index.svelte rename to src/routes/showcase/+page.svelte diff --git a/src/svg/build/icons-sprite.svg b/src/svg/build/icons-sprite.svg new file mode 100644 index 0000000..a9bacec --- /dev/null +++ b/src/svg/build/icons-sprite.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/m-wide-cam-bg.svg b/static/m-wide-cam-bg.svg new file mode 100644 index 0000000..81de0f1 --- /dev/null +++ b/static/m-wide-cam-bg.svg @@ -0,0 +1,52 @@ + + + + + + + + + + diff --git a/vite.config.ts b/vite.config.ts index be08ac2..85e0bc6 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,9 +1,9 @@ import { sveltekit } from '@sveltejs/kit/vite' -import { UserConfig } from 'vite' +import type { UserConfig } from 'vite' import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin' const config: UserConfig = { - plugins: [sveltekit(), vanillaExtractPlugin()], + plugins: [vanillaExtractPlugin(), sveltekit()], test: { include: ['src/**/*.{test,spec}.{js,ts}'], },