random tag: add randirect link

This commit is contained in:
mehbark 2023-07-27 12:20:58 -04:00
parent c9413077e9
commit 31162f2360
4 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,2 @@
// i no joke had the idea for this in a dream
// winamp seems more fun (the equalizer yk)

View file

@ -10,6 +10,7 @@
// img.src = a.href;
// a.insertAdjacentElement("afterend", img);
// })
// didn't find anything there btw
// pretty hopeless to try to recreate the pulsing light
import { Main, render_and_copy, static_url } from "./common.tsx";

View file

@ -1,8 +1,9 @@
import { ComponentChildren, toChildArray } from "preact";
import { Main, render_and_copy, shuffle, n_of } from "./common.tsx";
const tag_link = (tag: string) => `https://cohost.org/rc/tagged/${tag}`;
const Tag = ({ tag }: { tag: string }) => (
<a href={`https://cohost.org/rc/tagged/${tag}`}>{`#${tag}`}</a>
<a href={tag_link(tag)}>{`#${tag}`}</a>
);
const tags = [
@ -25,12 +26,17 @@ const tags = [
"cohost utilities",
"alt text request",
"meepismonday",
"rats",
"worldwide music wednesday",
"chaos magick",
];
const default_repeat = 4;
// repeating makes it seem more random
export const PseudoRandom = ({
children,
repeat = 5,
repeat = default_repeat,
}: {
children: ComponentChildren;
repeat?: number;
@ -93,6 +99,17 @@ render_and_copy(
<ul>
<li>all tags are from @TagOfTheDay</li>
<li>i'll do my best to keep this up to date</li>
<li>
you can also go{" "}
<a
href={`https://pyrope.net/randirect#${tags
.map(tag_link)
.join("::")}`}
>
here
</a>{" "}
to be redirected to a random tag
</li>
<ul>
<li>
it would be helpful if you could pester me in the comments

1
html/winamp.tsx Normal file
View file

@ -0,0 +1 @@
// can't do the cool graph hm