3 changed files with 131 additions and 23 deletions
|
After Width: | Height: | Size: 7.2 KiB |
@ -0,0 +1,121 @@ |
|||
<script setup lang="ts"> |
|||
import meditationImg from '@/assets/images/meditation.svg' |
|||
|
|||
defineProps<{ |
|||
isTraining: boolean |
|||
}>() |
|||
</script> |
|||
|
|||
<template> |
|||
<div class="meditation-icon" :class="{ training: isTraining }"> |
|||
<div class="aura-ring ring-1"></div> |
|||
<div class="aura-ring ring-2"></div> |
|||
<div class="aura-ring ring-3"></div> |
|||
<div class="aura-ring ring-4"></div> |
|||
<img :src="meditationImg" class="person" alt="meditation" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
.meditation-icon { |
|||
position: relative; |
|||
width: 120px; |
|||
height: 120px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.person { |
|||
width: 80px; |
|||
height: 80px; |
|||
z-index: 2; |
|||
object-fit: contain; |
|||
} |
|||
|
|||
.meditation-icon:not(.training) .person { |
|||
opacity: 0.3; |
|||
} |
|||
|
|||
.meditation-icon:not(.training) .aura-ring { |
|||
display: none; |
|||
} |
|||
|
|||
.aura-ring { |
|||
position: absolute; |
|||
border-radius: 50%; |
|||
border: 2px solid transparent; |
|||
animation: aura-pulse 3s ease-in-out infinite; |
|||
} |
|||
|
|||
.ring-1 { |
|||
width: 100px; |
|||
height: 100px; |
|||
animation-delay: 0s; |
|||
} |
|||
|
|||
.ring-2 { |
|||
width: 110px; |
|||
height: 110px; |
|||
animation-delay: 0.5s; |
|||
animation-direction: reverse; |
|||
} |
|||
|
|||
.ring-3 { |
|||
width: 120px; |
|||
height: 120px; |
|||
animation-delay: 1s; |
|||
} |
|||
|
|||
.ring-4 { |
|||
width: 130px; |
|||
height: 130px; |
|||
animation-delay: 1.5s; |
|||
animation-direction: reverse; |
|||
} |
|||
|
|||
.meditation-icon.training .aura-ring { |
|||
animation: color-shift 4s linear infinite, ring-pulse 2s ease-in-out infinite; |
|||
} |
|||
|
|||
@keyframes color-shift { |
|||
0% { |
|||
border-color: #ffd700; |
|||
box-shadow: 0 0 20px #ffd700, 0 0 40px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(255, 215, 0, 0.3); |
|||
} |
|||
33% { |
|||
border-color: #00ffff; |
|||
box-shadow: 0 0 20px #00ffff, 0 0 40px rgba(0, 255, 255, 0.5), inset 0 0 15px rgba(0, 255, 255, 0.3); |
|||
} |
|||
66% { |
|||
border-color: #9932cc; |
|||
box-shadow: 0 0 20px #9932cc, 0 0 40px rgba(153, 50, 204, 0.5), inset 0 0 15px rgba(153, 50, 204, 0.3); |
|||
} |
|||
100% { |
|||
border-color: #ffd700; |
|||
box-shadow: 0 0 20px #ffd700, 0 0 40px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(255, 215, 0, 0.3); |
|||
} |
|||
} |
|||
|
|||
@keyframes ring-pulse { |
|||
0%, 100% { |
|||
transform: scale(1) rotate(0deg); |
|||
opacity: 0.8; |
|||
} |
|||
50% { |
|||
transform: scale(1.05) rotate(180deg); |
|||
opacity: 1; |
|||
} |
|||
} |
|||
|
|||
@keyframes aura-pulse { |
|||
0%, 100% { |
|||
transform: scale(1); |
|||
opacity: 0.6; |
|||
} |
|||
50% { |
|||
transform: scale(1.1); |
|||
opacity: 1; |
|||
} |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue