webring layout changes

This commit is contained in:
Satria 2026-03-23 22:11:45 +07:00
commit 38d9ed0f9f

View file

@ -1,5 +1,4 @@
<script lang="ts"> <script lang="ts">
import { page } from "$app/stores";
import { getTimeIn, randomStr } from "$lib"; import { getTimeIn, randomStr } from "$lib";
import { onMount } from "svelte"; import { onMount } from "svelte";
import type { PageData } from "./$types"; import type { PageData } from "./$types";
@ -20,8 +19,6 @@
let time = $derived(getTimeIn(data.timezone)); let time = $derived(getTimeIn(data.timezone));
let charAmount = $state(0); let charAmount = $state(0);
let webring = $page.url.searchParams.has('webring');
let audio: HTMLAudioElement; let audio: HTMLAudioElement;
let showNotification = $state(false); let showNotification = $state(false);
@ -48,10 +45,19 @@
<audio bind:this={audio} src="/hk-white-palace-ost.mp3" loop></audio> <audio bind:this={audio} src="/hk-white-palace-ost.mp3" loop></audio>
<a href="https://hackclub.com" target="_blank" class="z-50 fixed top-24 sm:top-8 md:top-4 -left-2 hover:left-0"> <a href="https://hackclub.com" target="_blank" class="z-50 fixed top-24 sm:top-12 md:top-4 -left-2 hover:left-0">
<img src="https://assets.hackclub.com/flag-orpheus-left.svg" alt="Hack Club Orpheus Flag" class="h-16"> <img src="https://assets.hackclub.com/flag-orpheus-left.svg" alt="Hack Club Orpheus Flag" class="h-16">
</a> </a>
<nav class="flex flex-col gap-0 items-center z-50 fixed top-24 sm:top-12 md:top-4 right-0 font-semibold bg-ctp-surface0 pr-4 pl-2 py-1 rounded-l-xl border-y border-l border-ctp-sky">
<a href="https://nixwebr.ing" class="no-underline text-sm text-ctp-text">nix-webring</a>
<div class="text-2xl">
<a href="https://nixwebr.ing/prev/satr14" class="no-underline text-ctp-text">&larr;</a>
<a href="https://nixwebr.ing/rand" class="no-underline text-ctp-text">&#9858;</a>
<a href="https://nixwebr.ing/next/satr14" class="no-underline text-ctp-text">&rarr;</a>
</div>
</nav>
{#if showNotification} {#if showNotification}
<div class="z-50 fixed top-6 right-6 left-6 flex justify-center items-center"> <div class="z-50 fixed top-6 right-6 left-6 flex justify-center items-center">
<div class="flex items-center gap-3 bg-ctp-surface0 text-ctp-text px-4 py-3 rounded-xl shadow-lg border border-ctp-sky" transition:fly={{ y: 20, duration: 300, easing: cubicOut }}> <div class="flex items-center gap-3 bg-ctp-surface0 text-ctp-text px-4 py-3 rounded-xl shadow-lg border border-ctp-sky" transition:fly={{ y: 20, duration: 300, easing: cubicOut }}>
@ -96,18 +102,11 @@
<div class="fixed top-0 left-0 w-full text-base flex justify-center items-center"> <div class="fixed top-0 left-0 w-full text-base flex justify-center items-center">
<nav class="py-2 px-4 backdrop-blur rounded-t-3xl border-ctp-base hover:border-ctp-sky"> <nav class="py-2 px-4 backdrop-blur rounded-t-3xl border-ctp-base hover:border-ctp-sky">
{#if webring}
<a href="https://nixwebr.ing" class="no-underline">nixwebr.ing:</a>
<a href="https://nixwebr.ing/prev/satr14" class="no-underline">&larr;</a>
<a href="https://nixwebr.ing/rand" class="no-underline">?</a>
<a href="https://nixwebr.ing/next/satr14" class="no-underline">&rarr;</a>
{:else}
<p class="animate-pulse italic text-base text-center"> <p class="animate-pulse italic text-base text-center">
<span>"{data.quote}"</span><br> <span>"{data.quote}"</span><br>
<span class="hidden sm:block">Press [Space] to continue.</span> <span class="hidden sm:block">Press [Space] to continue.</span>
<span class="sm:hidden">Scroll to continue.</span> <span class="sm:hidden">Scroll to continue.</span>
</p> </p>
{/if}
</nav> </nav>
</div> </div>