Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { defineConfig } from 'astro/config'
// https://astro.build/config
export default defineConfig({
site: 'https://playground.shiftbrain.com/',
base: '/post/template',
base: '/post/hover-to-drop-text',
server: {
open: '/post/template',
open: '/post/hover-to-drop-text',
},
prefetch: true,
integrations: [
Expand Down
21 changes: 20 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@tailwindcss/container-queries": "0.1.1",
"@trivago/prettier-plugin-sort-imports": "4.3.0",
"@types/alpinejs": "3.13.10",
"@types/lodash": "4.17.18",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"alpinejs": "3.14.1",
Expand All @@ -37,7 +38,10 @@
"eslint-plugin-astro": "1.1.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-tailwindcss": "3.15.1",
"gsap": "3.13.0",
"leva": "0.9.35",
"lil-gui": "0.20.0",
"lodash": "4.17.21",
"postcss-fluid-sizing-function": "0.0.2",
"prettier": "3.2.5",
"prettier-plugin-astro": "0.14.1",
Expand Down
Binary file modified public/thumbnail.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/audio/button.wav
Binary file not shown.
Binary file added src/assets/audio/notification.wav
Binary file not shown.
Binary file added src/assets/audio/progress_loop.wav
Binary file not shown.
Binary file added src/assets/audio/toggle_off.wav
Binary file not shown.
11 changes: 11 additions & 0 deletions src/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"slug": "hover-to-drop-text",
"title": "Hover-to-Drop Text",
"author": "komakine",
"tags": [
"audio",
"animation",
"hover"
],
"device": "pc"
}
22 changes: 0 additions & 22 deletions src/pages/_alpine-example.astro

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/_react-example.astro

This file was deleted.

38 changes: 31 additions & 7 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
---
import Layout from '../layouts/Layout.astro'
import { title, slug } from '../meta.json'
import Layout from '@/layouts/Layout.astro'
import { title, slug } from '@/meta.json'
---

<Layout {title} repoUrl={`https://github.com/devjam/playground-${slug}`}>
<main>
{/* contents start */}
<div class="relative flex min-h-svh flex-col items-center justify-center text-30">
<ul class="list-disc">
<li>Alpine example → _alpine-example.astro</li>
<li>React example → _react-example.astro</li>
</ul>
<div
x-data="dropText"
class="flex h-lvh w-screen items-center justify-center overflow-clip pb-[10vh]"
@pointermove="onPointermove"
>
<div class="relative w-max text-center">
<div
class="pointer-events-none mx-20 break-all text-[7vw] leading-[1.15] opacity-10"
x-ref="staticText"
>
</div>
<div
class="absolute inset-0 mx-20 break-all text-[7vw] leading-[1.15]"
x-ref="hoverText"
:style="{ 'color': guiParams.textColor }"
>
</div>
</div>
</div>
<p class="absolute bottom-0 left-0 px-20 pb-15 text-black-primary/80">
Sound effects: <a href="https://snd.dev/" target="_blank" class="underline hover:no-underline"
>https://snd.dev/</a
>
</p>
{/* contents end */}
</main>
</Layout>

<style>
[x-ref='hoverText'] > div {
will-change: transform;
}
</style>
Loading
Loading