stars: DONE ENOUGH
This commit is contained in:
parent
a567c011f4
commit
c66b1eddec
2 changed files with 549 additions and 0 deletions
24
html/stars.tsx
Normal file
24
html/stars.tsx
Normal 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
525
pch/stars.toml
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue