fixes and delays

This commit is contained in:
satr14 2025-03-28 13:45:12 +07:00
commit e8bf2bde91
2 changed files with 5 additions and 3 deletions

View file

@ -6,7 +6,9 @@
let loaded = false; let loaded = false;
onMount(() => { onMount(() => {
loaded = true; const handleVisibilityChange = () => loaded = document.visibilityState === 'visible';
document.addEventListener('visibilitychange', handleVisibilityChange);
handleVisibilityChange();
}); });
</script> </script>

View file

@ -45,9 +45,9 @@
<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} {#if webring}
<a href="https://nixwebr.ing" class="no-underline">nixwebr.ing:</a> <a href="https://nixwebr.ing" class="no-underline">nixwebr.ing:</a>
<a href="https://nixwebr.ing/prev/" class="no-underline">&larr;</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/rand/" class="no-underline">?</a>
<a href="https://nixwebr.ing/next/" class="no-underline">&rarr;</a> <a href="https://nixwebr.ing/next/satr14" class="no-underline">&rarr;</a>
{:else} {:else}
<p class="animate-pulse italic text-base"> <p class="animate-pulse italic text-base">
<span class="hidden sm:block">Press [Enter] to continue.</span> <span class="hidden sm:block">Press [Enter] to continue.</span>