tag of the day done enough

This commit is contained in:
mehbark 2023-07-22 19:51:31 -04:00
parent 5f79532829
commit b1f62577a1

View file

@ -39,6 +39,9 @@ export const PseudoRandom = ({
gridTemplateColumns: `repeat(${ gridTemplateColumns: `repeat(${
toChildArray(children).length * repeat toChildArray(children).length * repeat
}, 1fr)`, }, 1fr)`,
backgroundColor: "#008282",
borderRadius: "0.5rem",
height: "3rem",
}} }}
> >
{...n_of(repeat, toChildArray(children)) {...n_of(repeat, toChildArray(children))
@ -62,13 +65,54 @@ export const Choice = ({ children }: { children: ComponentChildren }) => (
<summary <summary
style={{ listStyle: "none", width: "100%", height: "100%" }} style={{ listStyle: "none", width: "100%", height: "100%" }}
></summary> ></summary>
<div class="result">{children}</div> <div
class="result"
style={{
position: "absolute",
top: "1.5rem",
bottom: 0,
left: 0,
right: 0,
width: "100%",
height: "100%",
display: "flex",
alignContent: "center",
justifyContent: "center",
verticalAlign: "center",
color: "white",
}}
>
{children}
</div>
</details> </details>
); );
render_and_copy( render_and_copy(
<Main> <Main>
Click for a random @TagOfTheDay tag
<PseudoRandom>{...tags.map(tag => <Tag tag={tag} />)}</PseudoRandom> <PseudoRandom>{...tags.map(tag => <Tag tag={tag} />)}</PseudoRandom>
Some notes:
<ul>
<li>all tags are from @TagOfTheDay</li>
<li>i'll do my best to keep this up to date</li>
<ul>
<li>
it would be helpful if you could pester me in the comments
when this tag list is out of date (most recent first): (also
you can just like. use this tag list)
</li>
<ul>
{...tags.toReversed().map(tag => (
<li>
<Tag tag={tag} />
</li>
))}
</ul>
</ul>
<li>
if there's enough interest, i'll hack together a little
generator for these (it would be easy to make one for tags, but
one for other stuff would require a bit more work)
</li>
</ul>
</Main> </Main>
); );