mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-02-01 16:29:34 +01:00
Add animated text gradient component and update references in content files
This commit is contained in:
36
app/components/home/Name.vue
Normal file
36
app/components/home/Name.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<script setup lang="ts">
|
||||
const styleVars = {
|
||||
'--animated-speed': '40s',
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span
|
||||
class="text-xl inline-block font-bold animate-gradient"
|
||||
:style="styleVars"
|
||||
>
|
||||
<slot>Arthur Danjou</slot>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.animate-gradient {
|
||||
background-image: linear-gradient(
|
||||
90deg,
|
||||
#f43f5e, #f97316, #f59e0b, #eab308, #84cc16, #22c55e,
|
||||
#10b981, #14b8a6, #06b6d4, #0ea5e9, #3b82f6, #6366f1,
|
||||
#8b5cf6, #a855f7, #d946ef, #ec4899, #f43f5e
|
||||
);
|
||||
background-size: 1400% auto;
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
-webkit-text-fill-color: transparent;
|
||||
animation: gradient-animation var(--animated-speed) linear infinite;
|
||||
}
|
||||
|
||||
@keyframes gradient-animation {
|
||||
0% { background-position: 0% center; }
|
||||
100% { background-position: 200% center; }
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user