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.

123 lines
2.4 KiB

2 years ago
2 years ago
  1. <template>
  2. <v-spacer class="wrapper width-100vw align-center py-7 mb-13 neutrals darken-1" height="100%">
  3. <v-carousel hide-delimiters class="py-5" width="100%" height="100%">
  4. <template v-for="(video, idx) in exhibition.videos">
  5. <v-carousel-item v-if="exhibition.videos.length > 0" :key="'video' + idx">
  6. <v-row align="center" justify="center">
  7. <iframe :width="$vuetify.breakpoint.smAndUp ? 640 : 320" :height="$vuetify.breakpoint.smAndUp ? 360 : 180"
  8. :src="video.VideoLink" title="YouTube video player" frameborder="0"
  9. allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  10. allowfullscreen>
  11. </iframe>
  12. </v-row>
  13. </v-carousel-item>
  14. </template>
  15. <template v-for="(image, index) in exhibition.gallery">
  16. <v-carousel-item v-if="exhibition.gallery" :key="'image' + index">
  17. <v-row align="center" justify="center">
  18. <v-img :src="image.ImageLink" contain :width="$vuetify.breakpoint.smAndUp ? 640 : 320"
  19. :height="$vuetify.breakpoint.smAndUp ? 360 : 180"></v-img>
  20. </v-row>
  21. </v-carousel-item>
  22. </template>
  23. </v-carousel>
  24. </v-spacer>
  25. </template>
  26. <script>
  27. export default {
  28. name: "ExhibitionPhotoVideoGallery",
  29. props: {
  30. exhibition: {
  31. type: Object,
  32. default: () => ({
  33. gallery: {
  34. videos: [],
  35. images: [],
  36. },
  37. }),
  38. },
  39. },
  40. };
  41. </script>
  42. <style lang="scss" scoped>
  43. :deep() {
  44. .wrapper {
  45. padding: 0 27px;
  46. }
  47. .v-responsive {
  48. &__content {
  49. display: flex;
  50. }
  51. }
  52. .v-carousel {
  53. position: initial;
  54. padding-left: 20px;
  55. padding-right: 20px;
  56. }
  57. .v-window {
  58. &__container {
  59. position: initial;
  60. }
  61. &__prev {
  62. margin: 0;
  63. }
  64. &__next {
  65. margin: 0;
  66. }
  67. }
  68. }
  69. iframe {
  70. width: 100% !important;
  71. height: 50vw !important;
  72. min-height: 180px;
  73. }
  74. @media (min-width: 768px) {
  75. :deep() {
  76. .wrapper {
  77. padding: 0 44px;
  78. }
  79. .v-window {
  80. &__prev {
  81. left: 12px;
  82. }
  83. &__next {
  84. right: 12px;
  85. }
  86. }
  87. }
  88. }
  89. @media (min-width: 1366px) {
  90. :deep() {
  91. .wrapper {
  92. padding: 0 71px;
  93. }
  94. .v-window {
  95. &__prev {
  96. left: 39px;
  97. }
  98. &__next {
  99. right: 39px;
  100. }
  101. }
  102. iframe {
  103. width: 640px !important;
  104. height: 360px !important;
  105. }
  106. }
  107. }
  108. </style>