From af741e7b98596189f89f2d37a901d0f258787677 Mon Sep 17 00:00:00 2001 From: kiosion Date: Tue, 3 Oct 2023 15:55:30 -0300 Subject: [PATCH] fix: Fixup meta tags --- svelte-app/src/app.html | 1 - .../src/components/document/route.svelte | 38 ++++++------------ svelte-app/src/lib/helpers/navigation.ts | 2 +- svelte-app/src/routes/+error.svelte | 1 + svelte-app/src/routes/+layout.svelte | 14 ++++++- .../src/routes/[[lang=lang]]/+page.svelte | 8 +--- .../routes/[[lang=lang]]/blog/+page.svelte | 8 +--- .../src/routes/[[lang=lang]]/etc/+page.svelte | 8 +--- .../routes/[[lang=lang]]/work/+page.svelte | 6 +-- svelte-app/static/android-chrome-192x192.png | Bin 2670 -> 6695 bytes svelte-app/static/android-chrome-512x512.png | Bin 7627 -> 21700 bytes svelte-app/static/apple-touch-icon.png | Bin 2449 -> 6152 bytes svelte-app/static/assets/dark-embed.png | Bin 0 -> 19414 bytes svelte-app/static/assets/dark-icon.png | Bin 0 -> 9888 bytes svelte-app/static/assets/favicon.png | Bin 0 -> 13691 bytes svelte-app/static/assets/light-embed.png | Bin 0 -> 19749 bytes svelte-app/static/assets/light-icon.png | Bin 0 -> 9866 bytes svelte-app/static/assets/spinner.png | Bin 12048 -> 0 bytes svelte-app/static/assets/spinner.webp | Bin 7556 -> 0 bytes svelte-app/static/favicon-16x16.png | Bin 410 -> 497 bytes svelte-app/static/favicon-32x32.png | Bin 729 -> 956 bytes svelte-app/static/favicon.ico | Bin 15406 -> 15406 bytes 22 files changed, 35 insertions(+), 51 deletions(-) create mode 100644 svelte-app/static/assets/dark-embed.png create mode 100644 svelte-app/static/assets/dark-icon.png create mode 100644 svelte-app/static/assets/favicon.png create mode 100644 svelte-app/static/assets/light-embed.png create mode 100644 svelte-app/static/assets/light-icon.png delete mode 100644 svelte-app/static/assets/spinner.png delete mode 100644 svelte-app/static/assets/spinner.webp diff --git a/svelte-app/src/app.html b/svelte-app/src/app.html index d8e8dfd35..04ef7c925 100644 --- a/svelte-app/src/app.html +++ b/svelte-app/src/app.html @@ -17,7 +17,6 @@ href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Work+Sans:ital,wght@0,100;0,200;0,300;0,400;1,100;1,200;1,300;1,400&display=swap" rel="stylesheet" /> - %sveltekit.head% diff --git a/svelte-app/src/components/document/route.svelte b/svelte-app/src/components/document/route.svelte index e6ef62d83..381ac71c6 100644 --- a/svelte-app/src/components/document/route.svelte +++ b/svelte-app/src/components/document/route.svelte @@ -25,15 +25,8 @@ scrollTo($page?.url); }); - $: allTags = - (data?.tags || []) - .reduce( - (acc, tag) => (tag.title && acc.push(tag.title.toLowerCase()), acc), - [] as string[] - ) - ?.join(', ') + ', ' || ''; $: $page?.url && scrollTo($page.url); - $: pageTitle = `${BASE_PAGE_TITLE}${data?.title ? ` | ${data.title}` : ''}`; + $: pageTitle = `${BASE_PAGE_TITLE} ~ ${data.title}`; $: pageDescription = data?.desc ? data.desc.length > 160 ? `${data.desc.slice(0, 160 - 3)}...` @@ -43,30 +36,25 @@ {pageTitle} - - + + + + + + + + - - - - - - - - - diff --git a/svelte-app/src/lib/helpers/navigation.ts b/svelte-app/src/lib/helpers/navigation.ts index 8318001eb..3587b1dff 100644 --- a/svelte-app/src/lib/helpers/navigation.ts +++ b/svelte-app/src/lib/helpers/navigation.ts @@ -55,6 +55,6 @@ export const pageTitle = derived([isLocalized, t, page], (vals) => { route = APP_ROUTES.find((r) => r.path === pathname); return route?.name?.length - ? `${BASE_PAGE_TITLE} | ${vals[1](route.name)}` + ? `${BASE_PAGE_TITLE} ~ ${vals[1](route.name)}` : BASE_PAGE_TITLE; }); diff --git a/svelte-app/src/routes/+error.svelte b/svelte-app/src/routes/+error.svelte index fd056543d..65779fc21 100644 --- a/svelte-app/src/routes/+error.svelte +++ b/svelte-app/src/routes/+error.svelte @@ -42,6 +42,7 @@ kio.dev | {status} +
diff --git a/svelte-app/src/routes/+layout.svelte b/svelte-app/src/routes/+layout.svelte index 140cb854f..6aa123f07 100644 --- a/svelte-app/src/routes/+layout.svelte +++ b/svelte-app/src/routes/+layout.svelte @@ -13,7 +13,7 @@ import { isDesktop } from '$helpers/responsive'; import { check as checkTranslations, currentLang, isLocalized, t } from '$i18n'; import { APP_LANGS, BASE_ANIMATION_DURATION, DEFAULT_APP_LANG } from '$lib/consts'; - import { ENV } from '$lib/env'; + import { ENV, SELF_BASE_URL } from '$lib/env'; import { setState as setMenuState, state as menuState } from '$lib/helpers/menu'; import { navOpen } from '$stores/navigation'; import Settings, { loading } from '$stores/settings'; @@ -95,6 +95,18 @@ $: browser && (document.documentElement.lang = $currentLang); + + + + + + + + + + + + setMenuState(e, pageContainer)} diff --git a/svelte-app/src/routes/[[lang=lang]]/+page.svelte b/svelte-app/src/routes/[[lang=lang]]/+page.svelte index 653187a57..586390fdc 100644 --- a/svelte-app/src/routes/[[lang=lang]]/+page.svelte +++ b/svelte-app/src/routes/[[lang=lang]]/+page.svelte @@ -1,5 +1,4 @@ {$pageTitle} + - - - - diff --git a/svelte-app/src/routes/[[lang=lang]]/blog/+page.svelte b/svelte-app/src/routes/[[lang=lang]]/blog/+page.svelte index d132945ba..ca0b09473 100644 --- a/svelte-app/src/routes/[[lang=lang]]/blog/+page.svelte +++ b/svelte-app/src/routes/[[lang=lang]]/blog/+page.svelte @@ -1,5 +1,4 @@ {$pageTitle} + - - - - diff --git a/svelte-app/src/routes/[[lang=lang]]/work/+page.svelte b/svelte-app/src/routes/[[lang=lang]]/work/+page.svelte index c6ddc8667..960571e23 100644 --- a/svelte-app/src/routes/[[lang=lang]]/work/+page.svelte +++ b/svelte-app/src/routes/[[lang=lang]]/work/+page.svelte @@ -1,5 +1,4 @@