You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.5 KiB

2 years ago
  1. <template>
  2. <section
  3. class="featured-exhibiton-themes tw-grid tw-grid-cols-1 tw-gap-[20px] md:tw-gap-[30px] xl:tw-grid-cols-2 xl:tw-max-w-[1246px] xl:tw-mx-auto">
  4. <div class="card tw-rounded-[20px] tw-overflow-hidden tw-h-full" v-for="(item, index) in themes" :key="index">
  5. <a :href="localePath(item.url)" class="tw-relative tw-w-full tw-h-full tw-text-center">
  6. <img :src="item.image"
  7. class="tw-transition tw-duration-200 tw-ease-in-out tw-accent-base-hint xl:hover:tw-scale-110" />
  8. <div
  9. class="tw-absolute tw-m-auto tw-left-0 tw-right-0 tw-top-0 tw-bottom-0 t16 tw-font-normal tw-text-white tw-pointer-events-none md:t24">
  10. {{ item.name }}
  11. </div>
  12. </a>
  13. </div>
  14. </section>
  15. </template>
  16. <script>
  17. export default {
  18. props: {
  19. themes: {
  20. type: Array,
  21. },
  22. title: {
  23. type: String,
  24. },
  25. },
  26. created() {
  27. if (this.$props.themes.length > 4) {
  28. this.$props.themes = this.$props.themes.slice(0, 4);
  29. }
  30. },
  31. };
  32. </script>
  33. <style lang="scss" scoped>
  34. .featured-exhibiton-themes .card {
  35. -webkit-mask-image: -webkit-radial-gradient(white, black);
  36. }
  37. img {
  38. filter: brightness(0.5);
  39. }
  40. .row1 {
  41. position: relative;
  42. }
  43. .right-arrow {
  44. position: absolute;
  45. top: 20%;
  46. right: -20px;
  47. border: 2px solid;
  48. padding: 10px 15px;
  49. border-radius: 10px;
  50. }
  51. .card-text {
  52. position: absolute;
  53. color: white;
  54. width: 100%;
  55. top: 40%;
  56. }
  57. .zoom {
  58. transition: transform 0.2s;
  59. }
  60. .zoom-event:hover .zoom {
  61. transform: scale(1.5);
  62. }
  63. </style>