tangled
alpha
login
or
join now
drac.gay
/
drac-dot-gay
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
use css3 based marquee because the element causes mad cpu usage
Joe
1 year ago
a0a81156
5f2816b1
+38
-17
5 changed files
expand all
collapse all
unified
split
astro.config.mjs
src
components
Marquee.astro
layouts
Layout.astro
pages
index.astro
uno.config.ts
+5
-1
astro.config.mjs
···
4
4
5
5
// https://astro.build/config
6
6
export default defineConfig({
7
7
-
integrations: [UnoCSS()],
7
7
+
integrations: [
8
8
+
UnoCSS({
9
9
+
injectReset: "@unocss/reset/tailwind-compat.css",
10
10
+
}),
11
11
+
],
8
12
});
+20
src/components/Marquee.astro
···
1
1
+
<style>
2
2
+
@keyframes marquee {
3
3
+
from {
4
4
+
transform: translate(0%);
5
5
+
}
6
6
+
7
7
+
to {
8
8
+
transform: translate(-100%);
9
9
+
}
10
10
+
}
11
11
+
</style>
12
12
+
<marquee-container class=":uno: flex whitespace-nowrap overflow-hidden gap-15">
13
13
+
{
14
14
+
[0, 1].map((item) => (
15
15
+
<marquee-item class="animate-[marquee_10s_linear_infinite]">
16
16
+
<slot />
17
17
+
</marquee-item>
18
18
+
))
19
19
+
}
20
20
+
</marquee-container>
-1
src/layouts/Layout.astro
···
1
1
---
2
2
-
import "@unocss/reset/tailwind-compat.css";
3
2
import { getImage } from "astro:assets";
4
3
import backgroundImg from "../assets/draconium.png";
5
4
const background = await getImage({ src: backgroundImg });
+11
-13
src/pages/index.astro
···
1
1
---
2
2
import Layout from "../layouts/Layout.astro";
3
3
+
import Marquee from "../components/Marquee.astro";
3
4
---
4
5
5
6
<Layout>
6
6
-
<marquee
7
7
-
behavior="scroll"
8
8
-
scrolldelay="50"
9
9
-
scrollamount="10"
10
10
-
truespeed
11
11
-
class="text-[5rem] font-mmd"
12
12
-
>Your local <span
13
13
-
class="bg-gradient-to-r from-green-300 via-blue-500 to-purple-600 bg-clip-text text-transparent"
14
14
-
>gay</span
15
15
-
> Dragon</marquee
16
16
-
>
7
7
+
<Marquee>
8
8
+
<span class="text-[5rem] font-mmd text-nowrap">
9
9
+
Your local <span
10
10
+
class=":uno: bg-gradient-to-r from-green-300 via-blue-500 to-purple-600 bg-clip-text text-transparent"
11
11
+
>gay</span
12
12
+
> Dragon
13
13
+
</span>
14
14
+
</Marquee>
17
15
<article class="p-2">
18
16
this is a lil landing page for drac, who is gay. you might know me by a
19
17
few other names.
···
35
33
<li>
36
34
<a
37
35
href="https://cozydsp.space"
38
38
-
class="hover:underline text-cyan"
39
39
-
>VST plugins by cozy dsp</a>
36
36
+
class="hover:underline text-cyan">VST plugins by cozy dsp</a
37
37
+
>
40
38
</li>
41
39
</ul>
42
40
</article>
+2
-2
uno.config.ts
···
1
1
-
import { defineConfig } from "unocss";
1
1
+
import { defineConfig, transformerCompileClass } from "unocss";
2
2
import { presetUno, presetWebFonts, transformerVariantGroup } from "unocss";
3
3
4
4
export default defineConfig({
···
13
13
},
14
14
}),
15
15
],
16
16
-
transformers: [transformerVariantGroup()],
16
16
+
transformers: [transformerVariantGroup(), transformerCompileClass()],
17
17
});