From 37e516f6fe6704dda8c14b84dfbf1389ccf16d5c Mon Sep 17 00:00:00 2001 From: mehbark Date: Mon, 24 Jul 2023 17:01:44 -0400 Subject: [PATCH] static background not liking the hemo --- html/static-background.tsx | 44 +++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/html/static-background.tsx b/html/static-background.tsx index 8508034..b0047aa 100644 --- a/html/static-background.tsx +++ b/html/static-background.tsx @@ -8,12 +8,50 @@ import { Main, render_and_copy } from "./common.tsx"; // moires are too headachey and cws would ruin the attention-grabbing aspect // draggable window to reveal stuff? // i've been reading a lot of homestuck lately so something related to that would be nice +// background-clip: text? +// ^ doesn't seem to really work :( +// vh units will work really well +// scrolling through my drafts is very headache lol + +function vh_stripes( + percent_of_view_height: number, + ...colors: string[] +): string { + const out = []; + const stripe_height = (percent_of_view_height * 100) / colors.length; + let start = 0; + + for (const color of colors) { + const end = start + stripe_height; + out.push(`${color} ${start}vh ${end}vh`); + start = end; + } + + return out.join(", "); +} render_and_copy( <> -
-
-
+
);