|
| 1 | +<template> |
| 2 | + <div class="HomeContainer"> |
| 3 | + <div class="relative z-10"> |
| 4 | + <slot /> |
| 5 | + </div> |
| 6 | + |
| 7 | + <svg |
| 8 | + class="HomeBackground absolute inset-0 w-full h-full" |
| 9 | + viewBox="0 0 100 100" |
| 10 | + preserveAspectRatio="xMidYMid slice" |
| 11 | + > |
| 12 | + <defs> |
| 13 | + <radialGradient id="Gradient1" cx="50%" cy="50%" fx="10%" fy="50%" r=".5"> |
| 14 | + <animate attributeName="fx" dur="49s" values="0%;3%;0%" repeatCount="indefinite" /> |
| 15 | + <stop offset="0%" stop-color="#faf" /> |
| 16 | + <stop offset="100%" stop-color="#faf0" /> |
| 17 | + </radialGradient> |
| 18 | + <radialGradient id="Gradient2" cx="50%" cy="50%" fx="10%" fy="50%" r=".5"> |
| 19 | + <animate attributeName="fx" dur="38.5s" values="0%;3%;0%" repeatCount="indefinite" /> |
| 20 | + <stop offset="0%" stop-color="#aaf" /> |
| 21 | + <stop offset="100%" stop-color="#aaf0" /> |
| 22 | + </radialGradient> |
| 23 | + <radialGradient id="Gradient3" cx="50%" cy="50%" fx="50%" fy="50%" r=".5"> |
| 24 | + <animate attributeName="fx" dur="36.5s" values="0%;3%;0%" repeatCount="indefinite" /> |
| 25 | + <stop offset="0%" stop-color="#0df" /> |
| 26 | + <stop offset="100%" stop-color="#0df0" /> |
| 27 | + </radialGradient> |
| 28 | + </defs> |
| 29 | + <rect x="0" y="0" width="100%" height="100%" fill="url(#Gradient1)"> |
| 30 | + <animate attributeName="x" dur="35s" values="25%;0%;25%" repeatCount="indefinite" /> |
| 31 | + <animate attributeName="y" dur="36s" values="0%;25%;0%" repeatCount="indefinite" /> |
| 32 | + <animateTransform |
| 33 | + attributeName="transform" |
| 34 | + type="rotate" |
| 35 | + from="0 50 50" |
| 36 | + to="360 50 50" |
| 37 | + dur="22s" |
| 38 | + repeatCount="indefinite" |
| 39 | + /> |
| 40 | + </rect> |
| 41 | + <rect x="0" y="0" width="100%" height="100%" fill="url(#Gradient2)"> |
| 42 | + <animate attributeName="x" dur="38s" values="-25%;0%;-25%" repeatCount="indefinite" /> |
| 43 | + <animate attributeName="y" dur="39s" values="0%;50%;0%" repeatCount="indefinite" /> |
| 44 | + <animateTransform |
| 45 | + attributeName="transform" |
| 46 | + type="rotate" |
| 47 | + from="0 50 50" |
| 48 | + to="360 50 50" |
| 49 | + dur="23s" |
| 50 | + repeatCount="indefinite" |
| 51 | + /> |
| 52 | + </rect> |
| 53 | + <rect x="0" y="0" width="100%" height="100%" fill="url(#Gradient3)"> |
| 54 | + <animate attributeName="x" dur="40s" values="0%;25%;0%" repeatCount="indefinite" /> |
| 55 | + <animate attributeName="y" dur="41s" values="0%;25%;0%" repeatCount="indefinite" /> |
| 56 | + <animateTransform |
| 57 | + attributeName="transform" |
| 58 | + type="rotate" |
| 59 | + from="360 50 50" |
| 60 | + to="0 50 50" |
| 61 | + dur="24s" |
| 62 | + repeatCount="indefinite" |
| 63 | + /> |
| 64 | + </rect> |
| 65 | + </svg> |
| 66 | + </div> |
| 67 | +</template> |
| 68 | + |
| 69 | +<script lang="ts"> |
| 70 | +import Vue from 'vue'; |
| 71 | +
|
| 72 | +export default Vue.extend({ |
| 73 | + name: 'HomeBackground', |
| 74 | +}); |
| 75 | +</script> |
| 76 | + |
| 77 | +<style scoped> |
| 78 | +.HomeContainer { |
| 79 | + @apply relative w-full bg-primary-light dark:bg-dark; |
| 80 | +} |
| 81 | +</style> |
0 commit comments