Skip to content

Commit

Permalink
speed up load of / and /about
Browse files Browse the repository at this point in the history
i think the client is quite capable of subtracting two integers thank u past me
  • Loading branch information
DenebTM committed Jan 10, 2025
1 parent 9b69879 commit efea354
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 42 deletions.
11 changes: 0 additions & 11 deletions src/routes/(og-default)/+page.server.ts

This file was deleted.

17 changes: 6 additions & 11 deletions src/routes/(og-default)/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
<script lang="ts">
import Socials from '~/components/Socials.svelte'
import WikiLink from '~/components/WikiLink.svelte'
import type { PageServerData } from './$types'
import splashes_dot_txt from './splashes.json'
import { socials } from './info.json'
import { socials, birthday } from './info.json'
import { page } from '$app/state'
const {
data: { siteMetadata },
} = page
interface Props {
data: PageServerData
}
const { data }: Props = $props()
const age = new Date(Date.now() - Date.parse(birthday)).getFullYear() - 1970
const buttonAStyle = 'display: inline-block'
const buttonImgStyle =
Expand Down Expand Up @@ -61,7 +56,7 @@
<a style="--delay: 0.2s" href="/art?img=ref">ref sheet</a>
</div>
<div class="blurb-right">
<span style="--delay: 0.15s">age {data.age}</span>
<span style="--delay: 0.15s">age {age}</span>
<span style="--delay: 0.25s">
<img class="nb-pride" src="/img/nb.svg" alt="non-binary pride flag" />
they/them
Expand All @@ -76,9 +71,9 @@

<h1>Hi!</h1>
<p>
I'm <strong title="all-lowercase, please">deneb</strong>, a {data.age}-year
old <WikiLink page="maned wolf" /> from Austria, currently studying computer
science (BSc) in Innsbruck.
I'm <strong title="all-lowercase, please">deneb</strong>, a {age}-year old <WikiLink
page="maned wolf" /> from Austria, currently studying computer science (BSc)
in Innsbruck.
</p>
</section>

Expand Down
10 changes: 0 additions & 10 deletions src/routes/(og-default)/about/+page.server.ts

This file was deleted.

16 changes: 6 additions & 10 deletions src/routes/(og-default)/about/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<script lang="ts">
import WikiLink from '~/components/WikiLink.svelte'
import type { PageServerData } from './$types'
import { page } from '$app/state'
import { birthday } from '../info.json'
const {
data: { siteMetadata },
} = page
interface Props {
data: PageServerData
}
const { data }: Props = $props()
const age = new Date(Date.now() - Date.parse(birthday)).getFullYear() - 1970
</script>

<svelte:head>
Expand All @@ -28,10 +24,10 @@
<p>
My name (at least online) is deneb. My pronouns are they/them, and I am
somewhere on the aromantic and asexual spectrum.<br />
I live in Austria — Innsbruck to be precise — I'm {data.age} years old, and
currently in my 7th and hopefully final semester studying computer science
(as of 2024-10). I am just working on my bachelor's thesis at this point, and
looking to become a <nobr>backend/systems</nobr> engineer in the near future.
I live in Austria — Innsbruck to be precise — I'm {age} years old, and currently
in my 7th and hopefully final semester studying computer science (as of 2024-10).
I am just working on my bachelor's thesis at this point, and looking to become
a <nobr>backend/systems</nobr> engineer in the near future.
</p>
<h4>floof</h4>
<p>
Expand Down
1 change: 1 addition & 0 deletions src/routes/(og-default)/info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"birthday": "2000-12-22",
"socials": [
{
"platform": "Fediverse",
Expand Down

0 comments on commit efea354

Please sign in to comment.