diyavepeta oneshot

This commit is contained in:
mehbark 2023-09-06 21:48:30 -04:00
parent 7bf25db6a3
commit 47c949dc2d
5 changed files with 22 additions and 0 deletions

View file

@ -148,6 +148,20 @@ export const DisappearOnClick = ({
</details>
);
/// make sure the margins are all legit
export const ToggleOnClick = ({
children: [a, b],
}: {
children: [ComponentChild, ComponentChild];
}) => (
<details style="position: relative; margin: 0 auto; cursor: pointer;">
<summary style="list-style: none;">{a}</summary>
<div style="display: block; position: absolute; top: 0; pointer-events: none;">
{b}
</div>
</details>
);
export function shuffle<T>(array: T[]): T[] {
let currentIndex = array.length,
randomIndex;

8
html/diyavepeta.tsx Normal file
View file

@ -0,0 +1,8 @@
import { ToggleOnClick, render_and_copy, static_url } from "./common.tsx";
render_and_copy(
<ToggleOnClick>
<img src={static_url("davepeta-0.png")} style="margin: 0" />
<img src={static_url("davepeta-1.png")} style="margin: 0" />
</ToggleOnClick>
);

BIN
static/davepeta-0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
static/davepeta-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
static/davepeta.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB