|
| 1 | +<script setup lang="ts"> |
| 2 | +import background from '@voidzero-dev/vitepress-theme/src/assets/vite/footer-background.jpg' |
| 3 | +import event1 from '../../../images/events/viteconf_2022.jpg' |
| 4 | +import event2 from '../../../images/events/viteconf_2023.jpg' |
| 5 | +import event3 from '../../../images/events/viteconf_2024.jpg' |
| 6 | +import event4 from '../../../images/events/viteconf_2025.jpg' |
| 7 | +
|
| 8 | +const EVENTS = [ |
| 9 | + { |
| 10 | + date: '2025', |
| 11 | + title: 'ViteConf 2025', |
| 12 | + image: event4, |
| 13 | + url: 'https://www.youtube.com/watch?v=x7Jsmt_o9ek&list=PLqGQbXn_GDmkJaoykvHCUmXUPjhgH2bVr', |
| 14 | + }, |
| 15 | + { |
| 16 | + date: '2024', |
| 17 | + title: 'ViteConf 2024', |
| 18 | + image: event3, |
| 19 | + url: 'https://www.youtube.com/watch?v=mWK3Y_1kmaM&list=PLqGQbXn_GDmnObDzgjUF4Krsfl6OUKxtp', |
| 20 | + }, |
| 21 | + { |
| 22 | + date: '2023', |
| 23 | + title: 'ViteConf 2023', |
| 24 | + image: event2, |
| 25 | + url: 'https://www.youtube.com/watch?v=veCxKeLl35A&list=PLqGQbXn_GDmkOsHI7-Wrbv1GgAA4tJZhg', |
| 26 | + }, |
| 27 | + { |
| 28 | + date: '2022', |
| 29 | + title: 'ViteConf 2022', |
| 30 | + image: event1, |
| 31 | + url: 'https://www.youtube.com/watch?v=Znd11rVHQOE&list=PLqGQbXn_GDmkI_lwbq5LsVYMEoX2ilKfI', |
| 32 | + }, |
| 33 | +] |
| 34 | +</script> |
| 35 | + |
| 36 | +<template> |
| 37 | + <div class="wrapper wrapper--ticks w-full text-center md:text-left"> |
| 38 | + <h2 |
| 39 | + class="text-white text-2xl px-10 py-5 text-pretty border-nickel border-y" |
| 40 | + > |
| 41 | + Eventos anteriores |
| 42 | + </h2> |
| 43 | + <div class="relative grid md:grid-cols-2 xl:grid-cols-4 wrapper--ticks"> |
| 44 | + <a |
| 45 | + v-for="event in EVENTS" |
| 46 | + :key="event.date" |
| 47 | + class="group event-card block p-0.5" |
| 48 | + :style="`background-image: url(${background});`" |
| 49 | + :href="event.url" |
| 50 | + target="_blank" |
| 51 | + rel="noopener noreferrer" |
| 52 | + > |
| 53 | + <img |
| 54 | + :src="event.image" |
| 55 | + :alt="event.title" |
| 56 | + class="w-full aspect-video object-cover" |
| 57 | + /> |
| 58 | + <div class="bg-primary group-hover:bg-primary/95 bg-blur-lg"> |
| 59 | + <h3 class="text-white text-xl px-10 py-3 text-pretty"> |
| 60 | + {{ event.title }} |
| 61 | + </h3> |
| 62 | + </div> |
| 63 | + </a> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | +</template> |
| 67 | + |
| 68 | +<style> |
| 69 | +.event-card { |
| 70 | + background-size: 200% 200%; |
| 71 | + background-position: 100% 200%; |
| 72 | + background-blend-mode: overlay; |
| 73 | + background-color: rgba(0, 0, 0, 0.5); |
| 74 | +} |
| 75 | +.event-card:hover { |
| 76 | + animation: event-card-hover 10s ease-in-out infinite; |
| 77 | + background-color: transparent; |
| 78 | +} |
| 79 | +@keyframes event-card-hover { |
| 80 | + 0% { |
| 81 | + background-position: 100% 200%; |
| 82 | + } |
| 83 | + 50% { |
| 84 | + background-position: -100% 200%; |
| 85 | + } |
| 86 | + 100% { |
| 87 | + background-position: 100% 200%; |
| 88 | + } |
| 89 | +} |
| 90 | +</style> |
0 commit comments