I guess DaisyUI has rotating text now... awesome!
All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m25s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m25s
This commit is contained in:
@@ -8,13 +8,10 @@ const isDev = process.env.NODE_ENV === "development";
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
output: "server",
|
output: "server",
|
||||||
prefetch: true,
|
|
||||||
build: {
|
build: {
|
||||||
inlineStylesheets: "auto",
|
inlineStylesheets: "auto",
|
||||||
},
|
},
|
||||||
integrations: [
|
integrations: [vue()],
|
||||||
vue(),
|
|
||||||
],
|
|
||||||
|
|
||||||
security: {
|
security: {
|
||||||
checkOrigin: true,
|
checkOrigin: true,
|
||||||
@@ -24,10 +21,7 @@ export default defineConfig({
|
|||||||
: {
|
: {
|
||||||
algorithm: "SHA-512",
|
algorithm: "SHA-512",
|
||||||
scriptDirective: {
|
scriptDirective: {
|
||||||
resources: [
|
resources: ["'self'", "https://analytics.atri.dad"],
|
||||||
"'self'",
|
|
||||||
"https://analytics.atri.dad",
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
directives: [
|
directives: [
|
||||||
"connect-src 'self' https://analytics.atri.dad",
|
"connect-src 'self' https://analytics.atri.dad",
|
||||||
|
|||||||
22
src/components/RotatingText.astro
Normal file
22
src/components/RotatingText.astro
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
interface Props {
|
||||||
|
items: Array<{
|
||||||
|
text: string;
|
||||||
|
className: string;
|
||||||
|
}>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { items } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<span class="text-rotate duration-9000">
|
||||||
|
<span>
|
||||||
|
{
|
||||||
|
items.map((item) => (
|
||||||
|
<span class:list={["mx-auto text-center", item.className]}>
|
||||||
|
{item.text}
|
||||||
|
</span>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<template>
|
|
||||||
<span class="block w-full my-2">
|
|
||||||
<span class="text-rotate">
|
|
||||||
<span class="justify-items-center">
|
|
||||||
<span
|
|
||||||
v-for="(item, index) in items"
|
|
||||||
:key="index"
|
|
||||||
:class="item.className"
|
|
||||||
>
|
|
||||||
{{ item.text }}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
interface RotatingTextItem {
|
|
||||||
text: string;
|
|
||||||
className: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
defineProps<{
|
|
||||||
items: RotatingTextItem[];
|
|
||||||
}>();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.text-rotate:hover,
|
|
||||||
.text-rotate:hover * {
|
|
||||||
animation-play-state: running !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
import { siteConfig } from "../../config/site";
|
import { siteConfig } from "../../config/site";
|
||||||
import Icon from "../Icon.astro";
|
import Icon from "../Icon.astro";
|
||||||
import Section from "../Section.astro";
|
import Section from "../Section.astro";
|
||||||
import RotatingText from "../RotatingText.vue";
|
import RotatingText from "../RotatingText.astro";
|
||||||
import StatusIndicator from "../StatusIndicator.vue";
|
import StatusIndicator from "../StatusIndicator.vue";
|
||||||
|
|
||||||
const rotatingText = (siteConfig.hero as any).rotatingText as
|
const rotatingText = (siteConfig.hero as any).rotatingText as
|
||||||
|
|||||||
Reference in New Issue
Block a user