diff --git a/src/components/GeneratorCard.astro b/src/components/GeneratorCard.astro index c2a8823..b301bdb 100644 --- a/src/components/GeneratorCard.astro +++ b/src/components/GeneratorCard.astro @@ -17,6 +17,9 @@ const icons: Record = { ticket: ``, 'dice-6': ``, 'square-stack': ``, + 'circle-dollar-sign': ``, + 'list': ``, + 'fingerprint': ``, }; --- diff --git a/src/components/generators/CoinGenerator.astro b/src/components/generators/CoinGenerator.astro new file mode 100644 index 0000000..1e43b88 --- /dev/null +++ b/src/components/generators/CoinGenerator.astro @@ -0,0 +1,136 @@ +--- +// Interactive coin flip generator — runs on the client via inline script +--- + +
+
+
+ + 1 +
+ +
+ 120 +
+
+ +
+
+ + + + +
+ +
+ +
+
+ + diff --git a/src/components/generators/ListGenerator.astro b/src/components/generators/ListGenerator.astro new file mode 100644 index 0000000..c3faec1 --- /dev/null +++ b/src/components/generators/ListGenerator.astro @@ -0,0 +1,174 @@ +--- +// Interactive list picker — runs on the client via inline script +--- + +
+
+
+ + +
+ +
+
+ + +
+ +
+
+ + + +
+
+ + +
+ +
+ +
+
+ + diff --git a/src/components/generators/UuidGenerator.astro b/src/components/generators/UuidGenerator.astro new file mode 100644 index 0000000..945f5d4 --- /dev/null +++ b/src/components/generators/UuidGenerator.astro @@ -0,0 +1,185 @@ +--- +// Interactive UUID / token generator — runs on the client via inline script +--- + +
+
+
+ +
+ {[ + { value: 'uuid', label: 'UUID v4' }, + { value: 'hex', label: 'Hex' }, + { value: 'base64', label: 'Base64' }, + ].map(({ value, label }) => ( + + ))} +
+
+ +
+ +
+ + +
+
+
+ +
+
+ + +
+ +
+ +
+
+ + diff --git a/src/data/generators.ts b/src/data/generators.ts index 1a9c824..257eda7 100644 --- a/src/data/generators.ts +++ b/src/data/generators.ts @@ -49,4 +49,25 @@ export const generators: Generator[] = [ icon: 'square-stack', status: 'live', }, + { + slug: 'coin', + title: 'Coin Flip', + description: 'Flip one or more coins and see heads or tails.', + icon: 'circle-dollar-sign', + status: 'live', + }, + { + slug: 'list', + title: 'List Picker', + description: 'Paste a list of items and pick random winners.', + icon: 'list', + status: 'live', + }, + { + slug: 'uuid', + title: 'UUID / Token', + description: 'Generate UUIDs, hex tokens, or random base64 strings.', + icon: 'fingerprint', + status: 'live', + }, ]; diff --git a/src/pages/generators/coin.astro b/src/pages/generators/coin.astro new file mode 100644 index 0000000..f60389d --- /dev/null +++ b/src/pages/generators/coin.astro @@ -0,0 +1,40 @@ +--- +import BaseLayout from '../../layouts/BaseLayout.astro'; +import CoinGenerator from '../../components/generators/CoinGenerator.astro'; +import AdBanner from '../../components/AdBanner.astro'; +import { generators } from '../../data/generators'; + +const generator = generators.find((g) => g.slug === 'coin')!; +--- + + +
+ +
+
+ + randify +
+

{generator.title}

+

{generator.description}

+
+
+
+ +
+
+
diff --git a/src/pages/generators/list.astro b/src/pages/generators/list.astro new file mode 100644 index 0000000..7804085 --- /dev/null +++ b/src/pages/generators/list.astro @@ -0,0 +1,40 @@ +--- +import BaseLayout from '../../layouts/BaseLayout.astro'; +import ListGenerator from '../../components/generators/ListGenerator.astro'; +import AdBanner from '../../components/AdBanner.astro'; +import { generators } from '../../data/generators'; + +const generator = generators.find((g) => g.slug === 'list')!; +--- + + +
+ +
+
+ + randify +
+

{generator.title}

+

{generator.description}

+
+
+
+ +
+
+
diff --git a/src/pages/generators/uuid.astro b/src/pages/generators/uuid.astro new file mode 100644 index 0000000..49a8e87 --- /dev/null +++ b/src/pages/generators/uuid.astro @@ -0,0 +1,40 @@ +--- +import BaseLayout from '../../layouts/BaseLayout.astro'; +import UuidGenerator from '../../components/generators/UuidGenerator.astro'; +import AdBanner from '../../components/AdBanner.astro'; +import { generators } from '../../data/generators'; + +const generator = generators.find((g) => g.slug === 'uuid')!; +--- + + +
+ +
+
+ + randify +
+

{generator.title}

+

{generator.description}

+
+
+
+ +
+
+