From 291eb3dbce242face595efc0129ed1be7f5820b1 Mon Sep 17 00:00:00 2001 From: Simon Cambier Date: Sun, 26 Nov 2023 11:28:06 +0100 Subject: [PATCH] Updated (again) --- src/app.html | 2 ++ src/lib/utils.ts | 3 --- src/routes/+page.svelte | 15 +-------------- src/routes/editor/+page.svelte | 5 ++--- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/app.html b/src/app.html index cda52c2..977d866 100644 --- a/src/app.html +++ b/src/app.html @@ -12,10 +12,12 @@ npm/codemirror@5.65.16/lib/codemirror.min.css, npm/codemirror@5.65.16/theme/nord.min.css" /> + + %sveltekit.head% diff --git a/src/lib/utils.ts b/src/lib/utils.ts index ce6a1bd..2299763 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -34,6 +34,3 @@ export function getLangFromUrl() { export const byId = (id: string) => document.getElementById(id) -export const staticMetaDescription = - 'Paste is a client-side paste service with no database, and no back-end code. The data is stored entirely in the shared link' - diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 3cc28a2..c47734e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -10,22 +10,13 @@ import 'highlight.js/styles/nord.min.css' import TopBar from '../components/TopBar.svelte' import Icon from '@iconify/svelte' - import { getLangFromUrl, staticMetaDescription } from '$lib/utils' + import { getLangFromUrl } from '$lib/utils' let decompressed: string let htmlContent: string let isMarkdown = false let isPlainText = false - // Meta description - $: metaDescription = (() => { - if (decompressed) { - const text = decompressed.slice(0, 100) - return text + (text.length === 100 ? '...' : '') - } - return staticMetaDescription - })() - onMount(async () => { let lang = getLangFromUrl() // Remove github flavored markdown, redundant with markdown @@ -96,10 +87,6 @@ {/if} - - - -