Skip to content

Commit a38350c

Browse files
committed
Adjust webring looks 5
1 parent e89f2d7 commit a38350c

2 files changed

Lines changed: 25 additions & 9 deletions

File tree

src/components/TextSplitter.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<script lang="ts">
22
let {
3-
text
4-
}: {
3+
text,
4+
...props
5+
}: HTMLElement & {
56
text: string
67
} = $props();
78
89
let charIndex = 0;
910
</script>
1011

1112
{((charIndex = 0) || true) && ""}
12-
<splitted-text aria-label={text}>
13+
<splitted-text aria-label={text} {...props}>
1314
{#each text.split(" ") as word}
1415
{" "}<s-word aria-hidden="true">
1516
{#each word as char, index}

src/components/webrings/LeakyRing.svelte

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { onMount } from "svelte";
44
import WebringNav from "./WebringNav.svelte";
55
import Tooltip from "../utils/Tooltip.svelte";
6+
import TextSplitter from "../TextSplitter.svelte";
67
78
const {
89
backend = "https://brain.melonking.net",
@@ -42,11 +43,11 @@
4243
lastUpdate = setTimeout(() => {doRequest()}, updateInterval * 1000);
4344
if (bilging) return;
4445
45-
// if (page.url.hostname == "localhost") {
46-
// fillAmount = 100;
47-
// allSites = [];
48-
// return;
49-
// }
46+
if (page.url.hostname == "localhost") {
47+
fillAmount = 70;
48+
allSites = [];
49+
return;
50+
}
5051
5152
fetch(
5253
`${backend}/flood?bilge=${bilge}&info=${fullInfo}&path=${page.url.pathname}`,
@@ -130,7 +131,7 @@
130131
{:else if bilging}
131132
(trying my best...)
132133
{:else}
133-
(click here to flush some water)
134+
<TextSplitter class="wave" text="(click here to flush some water)" />
134135
{/if}
135136
</div>
136137
<WebringNav
@@ -219,11 +220,25 @@
219220
font-size: .75em;
220221
}
221222
223+
article :global(splitted-text.wave span) {
224+
display: inline-block;
225+
animation: wavy-text 0.5s calc(-0.05s * var(--index)) ease-in-out alternate infinite;
226+
}
227+
222228
@keyframes leaky-ring-shaking {
223229
from {
224230
transform: translateX(-1px);
225231
} to {
226232
transform: translateX(1px);
227233
}
228234
}
235+
236+
@keyframes wavy-text {
237+
from {
238+
transform: translateY(-.125em);
239+
} to {
240+
transform: translateY(.125em);
241+
}
242+
}
243+
229244
</style>

0 commit comments

Comments
 (0)