Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions reproduce_issue.py

This file was deleted.

33 changes: 0 additions & 33 deletions reproduce_issue_v2.py

This file was deleted.

Binary file removed settings_en.png
Binary file not shown.
12 changes: 12 additions & 0 deletions src/lib/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,18 @@
"slashes": {
"title": "Slashes",
"description": "meine Slash-Seiten",
"items": {
"about": "",
"contact": "wie man mich erreicht",
"defaults": "meine Haupt-Apps auf iOS und macOS (mehr unter defaults.rknight.me)",
"interests": "woran ich interessiert bin",
"log": "ein Änderungsprotokoll für diese Webseite",
"now": "was ich gerade mache",
"slashes": "diese Seite",
"uses": "Dinge, die ich benutze",
"where": "wo ich die meiste Zeit verbringe",
"playlists": "meine Lieblingslieder"
},
"spin": "DREHEN",
"good_luck": "Viel Glück!",
"wheel_label": "Glücksrad",
Expand Down
12 changes: 12 additions & 0 deletions src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,18 @@
"slashes": {
"title": "Slashes",
"description": "my slash pages",
"items": {
"about": "",
"contact": "how to reach me",
"defaults": "my main apps on iOS and macOS (more at defaults.rknight.me)",
"interests": "what I'm interested in",
"log": "a changelog for this website",
"now": "what i'm doing right now",
"slashes": "this page",
"uses": "things I use",
"where": "where I spend most of my time",
"playlists": "my favorite songs"
},
"spin": "SPIN",
"good_luck": "Good Luck!",
"wheel_label": "Wheel of Fortune",
Expand Down
37 changes: 24 additions & 13 deletions src/routes/slashes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,30 @@
showSwitch: false
});

const slashes = [
{ label: '/about', href: '/about', description: '' },
{ label: '/contact', href: '/contact', description: 'how to reach me' },
/**
* Reactive slashes array that localizes descriptions
* when the active language changes.
*/
const slashes = $derived([
{ label: '/about', href: '/about', description: i18n.t('slashes.items.about') },
{ label: '/contact', href: '/contact', description: i18n.t('slashes.items.contact') },
{
label: '/defaults',
href: '/defaults',
description: 'my main apps on iOS and macOS (more at defaults.rknight.me)'
description: i18n.t('slashes.items.defaults')
},
{ label: '/interests', href: '/zettelkasten/interests', description: "what I'm interested in" },
{ label: '/log', href: '/log', description: 'a changelog for this website' },
{ label: '/now', href: '/now', description: "what i'm doing right now" },
{ label: '/slashes', href: '/slashes', description: 'this page' },
{ label: '/uses', href: '/uses', description: 'things I use' },
{ label: '/where', href: '/where', description: 'where I spend most of my time' },
{ label: '/playlists', href: '/playlists', description: 'my favorite songs' }
];
{
label: '/interests',
href: '/zettelkasten/interests',
description: i18n.t('slashes.items.interests')
},
{ label: '/log', href: '/log', description: i18n.t('slashes.items.log') },
{ label: '/now', href: '/now', description: i18n.t('slashes.items.now') },
{ label: '/slashes', href: '/slashes', description: i18n.t('slashes.items.slashes') },
{ label: '/uses', href: '/uses', description: i18n.t('slashes.items.uses') },
{ label: '/where', href: '/where', description: i18n.t('slashes.items.where') },
{ label: '/playlists', href: '/playlists', description: i18n.t('slashes.items.playlists') }
]);

let rotation = $state(0);
let isSpinning = $state(false);
Expand All @@ -48,7 +56,10 @@

let displayRotation = $derived(isSpinning ? spinTween.current : rotation);

const segmentAngle = 360 / slashes.length;
/**
* Derived segment angle based on the current number of slashes.
*/
const segmentAngle = $derived(360 / slashes.length);

let lastAngle = 0;
let lastTime = 0;
Expand Down