-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
227 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import { defineConfig } from "astro/config"; | ||
|
||
import mdx from "@astrojs/mdx"; | ||
import sitemap from "@astrojs/sitemap"; | ||
import tailwind from "@astrojs/tailwind"; | ||
import vercel from "@astrojs/vercel/static"; | ||
import icon from "astro-icon"; | ||
import svelte from "@astrojs/svelte"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [tailwind(), mdx(), sitemap(), icon({ iconDir: "src/components/icons" })], | ||
build: { format: "file" }, | ||
integrations: [tailwind(), mdx(), sitemap(), icon({ | ||
iconDir: "src/components/icons" | ||
}), svelte()], | ||
build: { | ||
format: "file" | ||
}, | ||
site: "https://siri-dev.vercel.app", | ||
adapter: vercel({ | ||
webAnalytics: { enabled: true }, | ||
}), | ||
}); | ||
webAnalytics: { | ||
enabled: true | ||
} | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<script lang="ts"> | ||
const { text, animationSpeed = 90, staticText = "" } = $props(); | ||
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+"; | ||
let currentText = $state(""); | ||
let resolved = 0; | ||
function scrambleText() { | ||
let output = ""; | ||
for (let i = 0; i < text.length; i++) { | ||
if (i < resolved) { | ||
output += text[i]; | ||
} else { | ||
output += chars[Math.floor(Math.random() * chars.length)]; | ||
} | ||
} | ||
currentText = output; | ||
if (resolved < text.length) { | ||
setTimeout(() => { | ||
resolved++; | ||
scrambleText(); | ||
}, animationSpeed); | ||
} | ||
} | ||
$effect(() => { | ||
scrambleText(); | ||
}); | ||
</script> | ||
|
||
{`${currentText}${staticText}`} | ||
<!-- In case of no JS, the text can still be shown --> | ||
<noscript>{text}{staticText}</noscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script> | ||
import AnimatedText from "./AnimatedText.svelte"; | ||
const { defaultText, replaceText, staticText = "" } = $props(); | ||
let showingDefault = $state(true); | ||
let hoveredOnce = $state(false); | ||
function handleMouseEnter() { | ||
showingDefault = false; | ||
hoveredOnce = true; | ||
} | ||
</script> | ||
|
||
<span role="presentation" onmouseenter={handleMouseEnter} onmouseleave={() => (showingDefault = true)}> | ||
{#if showingDefault} | ||
{#if !hoveredOnce} | ||
{`${defaultText}${staticText}`} | ||
{:else} | ||
<AnimatedText text={defaultText} {staticText} animationSpeed={20} /> | ||
{/if} | ||
{:else} | ||
<AnimatedText text={replaceText} {staticText} animationSpeed={20} /> | ||
{/if} | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script lang="ts"> | ||
const RICKROLL_URL = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"; | ||
</script> | ||
|
||
<button | ||
type="button" | ||
class="bg-white text-black p-2 px-4 rounded-full my-4 hover:bg-gray-200 duration-200" | ||
on:click={() => window.open(RICKROLL_URL)} | ||
> | ||
Proceed to Checkout | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.