(arr: T[]): T[][] {
console.log(arr.map(item => [...arr.filter(t => t != item), item]));
return arr.map(item => [...arr.filter(t => t != item), item]);
}
-const MultiWheel = ({
+export const MultiWheel = ({
items,
calc_width,
shl,
diff --git a/html/random-tag-of-the-day.tsx b/html/random-tag-of-the-day.tsx
new file mode 100644
index 0000000..da9854a
--- /dev/null
+++ b/html/random-tag-of-the-day.tsx
@@ -0,0 +1,74 @@
+import { ComponentChildren, toChildArray } from "preact";
+import { Main, render_and_copy, shuffle, n_of } from "./common.tsx";
+
+const Tag = ({ tag }: { tag: string }) => (
+ {`#${tag}`}
+);
+
+const tags = `\
+CSS Crimes
+borgesposting
+NEISVoid
+circling the square
+retrocomputing
+cats of cohost
+coho film club
+cohost crafts
+the cohost plural feed
+cohost summer mixtape
+trans trucks
+The Cohost Local Feed (Minnesota)
+cohost draws
+tv head
+make up a mech pilot
+frasierposting
+cohost utilities`.split("\n");
+
+// repeating makes it seem more random
+export const PseudoRandom = ({
+ children,
+ repeat = 5,
+}: {
+ children: ComponentChildren;
+ repeat?: number;
+}) => (
+
+ {...n_of(repeat, toChildArray(children))
+ .map(shuffle)
+ .flat()
+ .map(child => {child})}
+
+);
+
+/// width is 0-1
+export const Choice = ({ children }: { children: ComponentChildren }) => (
+
+
+ {children}
+
+);
+
+render_and_copy(
+
+ Click for a random @TagOfTheDay tag
+ {...tags.map(tag => )}
+
+);