stars: DONE ENOUGH

This commit is contained in:
mehbark 2023-11-22 23:27:19 -05:00
parent a567c011f4
commit c66b1eddec
2 changed files with 549 additions and 0 deletions

24
html/stars.tsx Normal file
View file

@ -0,0 +1,24 @@
import { render_and_copy } from "./common.tsx";
const Star = () => (
<div
class="star same-place"
style={{
transform: `translate(calc(${(Math.random() * 50 - 25).toFixed(
2
)}rem * var(--tw-border-opacity, 0)), calc(${(
Math.random() * 50 -
25
).toFixed(2)}rem * var(--tw-border-opacity, 0)))`,
}}
>
*
</div>
);
const Stars = ({ n }: { n: number }) => (
<div id="stars" class="same-place">
{...Array.from({ length: n }, Star)}
</div>
);
render_and_copy(<Stars n={150} />);

525
pch/stars.toml Normal file

File diff suppressed because one or more lines are too long