add Head
All checks were successful
Push to cloudflare pages / deploy (push) Successful in 41s

This commit is contained in:
Lara 2025-01-25 18:07:53 +02:00
parent 9b32ca00e8
commit 1c84e0c952
3 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,21 @@
<script lang="ts">
interface HeadProps {
title: string;
ogTitle?: string;
ogDescription?: string;
ogImage?: string;
ogUrl?: string;
articleAuthor?: string;
}
let { title, ogTitle = title, ogDescription, ogImage, ogUrl, articleAuthor }: HeadProps = $props();
</script>
<svelte:head>
<meta property="og:title" content="{ogTitle}"/>
{#if ogDescription} <meta property="og:description" content={ogDescription}/> {/if}
{#if ogImage} <meta property="og:image" content={ogImage}/> {/if}
{#if ogUrl} <meta property="og:url" content={ogUrl}/> {/if}
{#if articleAuthor} <meta property="article:author" content={articleAuthor}/> {/if}
<title>{title} | VilisHost</title>
</svelte:head>

View file

@ -1,7 +1,10 @@
<script lang="ts">
import { page } from '$app/state';
import Head from '$lib/components/Head.svelte';
</script>
<Head title="Error {page.status} | protogen.social"/>
<h1 class="text-4xl font-bold">No secrets here</h1>
<p>{page.status} {page.error?.message}</p>

View file

@ -1,10 +1,13 @@
<script lang="ts">
import { formatDistanceToNow } from 'date-fns';
import Head from '$lib/components/Head.svelte';
const prevDate = new Date(2023, 7, 5)
</script>
<Head title="protogen.social" />
<h1 class="text-4xl font-bold">protogen.social</h1>
<p>I intend to make protogen.social return sometime in the future, if i'm ever able to recover it's data</p>
<p>The server used to host it is currently down and frankly, I don't know when it might be coming back, I do hope it will tho as i've been damn proud of the mastodon instance i've been running for <span class="font-bold">{formatDistanceToNow(prevDate)}</span> now</p>