From 3132e9006f12673c7714e4bdd73393308c129200 Mon Sep 17 00:00:00 2001 From: Gamaliel Garcia <46827955+EGAMAGZ@users.noreply.github.com> Date: Sun, 5 May 2024 17:49:15 -0600 Subject: [PATCH 1/2] refactor: Added more meta tags --- example/public/favicon.svg | 2 +- example/src/layouts/Layout.astro | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/example/public/favicon.svg b/example/public/favicon.svg index d55bd34..cee8f30 100644 --- a/example/public/favicon.svg +++ b/example/public/favicon.svg @@ -1,4 +1,4 @@ - + diff --git a/example/src/layouts/Layout.astro b/example/src/layouts/Layout.astro index 850a4b5..6223b6d 100644 --- a/example/src/layouts/Layout.astro +++ b/example/src/layouts/Layout.astro @@ -8,6 +8,11 @@ name="description" content="Paska Ovo: A simple javascript library for adding easter eggs to web pages." /> + + Paska Ovo From fae477de4cb94e75353139a48c76567769c7f746 Mon Sep 17 00:00:00 2001 From: Gamaliel Garcia <46827955+EGAMAGZ@users.noreply.github.com> Date: Sun, 5 May 2024 19:12:36 -0600 Subject: [PATCH 2/2] feat: Added links to github page and github repository --- README.md | 2 ++ example/package-lock.json | 25 +++++++++++++++++++++++++ example/package.json | 1 + example/src/components/Badge.tsx | 15 +++++++++++++++ example/src/components/EasterEgg.tsx | 7 ++----- example/src/pages/index.astro | 21 ++++++++++++++++++++- 6 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 example/src/components/Badge.tsx diff --git a/README.md b/README.md index 5d6fc8e..0e15d76 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ const paskaOvo = new PaskaOvo( paskaOvo.listen(); ``` +Check the [example](https://egamagz.github.io/paska-ovo/) with [source code](https://github.com/EGAMAGZ/paska-ovo/tree/master/example). + ## Credits Inspired by the project [Egg.js](https://github.com/mikeflynn/egg.js) and [La Velada Web](https://github.com/midudev/la-velada-web-oficial). Created by [EGAMAGZ](https://github.com/EGAMAGZ). diff --git a/example/package-lock.json b/example/package-lock.json index 894f687..20b3c68 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -14,6 +14,7 @@ "@egamagz/paska-ovo": "npm:@jsr/egamagz__paska-ovo@^0.1.2", "@preact/signals": "^1.2.3", "@preact/signals-core": "^1.6.0", + "@tabler/icons-preact": "^3.3.0", "astro": "^4.6.3", "preact": "^10.20.2", "tailwindcss": "^3.4.3", @@ -1353,6 +1354,30 @@ "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.4.0.tgz", "integrity": "sha512-CxpKLntAi64h3j+TwWqVIQObPTED0FyXLHTTh3MKXtqiQNn2JGcMQQ362LftDbc9kYbDtrksNMNoVmVXzKFYUQ==" }, + "node_modules/@tabler/icons": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.3.0.tgz", + "integrity": "sha512-PLVe9d7b59sKytbx00KgeGhQG3N176Ezv8YMmsnSz4s0ifDzMWlp/h2wEfQZ0ZNe8e377GY2OW6kovUe3Rnd0g==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/codecalm" + } + }, + "node_modules/@tabler/icons-preact": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@tabler/icons-preact/-/icons-preact-3.3.0.tgz", + "integrity": "sha512-TFX53qW4yj1XmG70RxSXYr9zysVV7cdNb+1LCkBb17gnIv2m+ki4qnNVBtj7NjBQNpXofe6R6nXalEdxL7HuBw==", + "dependencies": { + "@tabler/icons": "3.3.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/codecalm" + }, + "peerDependencies": { + "preact": "^10.5.13" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", diff --git a/example/package.json b/example/package.json index f469073..c2fb55f 100644 --- a/example/package.json +++ b/example/package.json @@ -16,6 +16,7 @@ "@egamagz/paska-ovo": "npm:@jsr/egamagz__paska-ovo@^0.1.2", "@preact/signals": "^1.2.3", "@preact/signals-core": "^1.6.0", + "@tabler/icons-preact": "^3.3.0", "astro": "^4.6.3", "preact": "^10.20.2", "tailwindcss": "^3.4.3", diff --git a/example/src/components/Badge.tsx b/example/src/components/Badge.tsx new file mode 100644 index 0000000..2d4e598 --- /dev/null +++ b/example/src/components/Badge.tsx @@ -0,0 +1,15 @@ +import { type ComponentChildren } from "preact"; + +interface Props { + text: string + url: string + children: ComponentChildren +} + +export default function Badge({ text, url, children }: Props) { + return ( + + {children} {text} + + ); +} \ No newline at end of file diff --git a/example/src/components/EasterEgg.tsx b/example/src/components/EasterEgg.tsx index 5cbb33c..0cea684 100644 --- a/example/src/components/EasterEgg.tsx +++ b/example/src/components/EasterEgg.tsx @@ -51,11 +51,8 @@ export default function EasterEgg() { }) return ( -
-
- - </div> - <span class="text-3xl font-thin">Find the easter eggs!</span> + <div class={`w-96 h-48 transition-all ${easterEggStatus.value === EasterEggStatus.Awesome ? "rainbow-border p-2" : ""} ${easterEggStatus.value === EasterEggStatus.BarrelRoll ? "animate-spin" : ""}`}> + <Title showKonami={easterEggStatus.value === EasterEggStatus.Konami} /> </div> ); } \ No newline at end of file diff --git a/example/src/pages/index.astro b/example/src/pages/index.astro index fd3d5ff..fffd205 100644 --- a/example/src/pages/index.astro +++ b/example/src/pages/index.astro @@ -1,8 +1,27 @@ --- +import Badge from "@/components/Badge"; import EasterEgg from "@/components/EasterEgg"; import Layout from "@/layouts/Layout.astro"; +import { IconBrandGithub } from "@tabler/icons-preact"; --- <Layout> - <EasterEgg client:idle /> + <div + class="w-screen h-screen bg-red-300 flex flex-col justify-center items-center relative gap-2" + > + <EasterEgg client:idle /> + <div class="text-center"> + <p class="font-mono text-xl max-w-xl"> + <strong + >A simple javascript library for adding easter eggs to web + pages. Try to find the easter egg! + </strong> + </p> + </div> + <div> + <Badge text="Github" url="https://github.com/EGAMAGZ/paska-ovo"> + <IconBrandGithub size={24} color="black" /> + </Badge> + </div> + </div> </Layout>