Banner.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <LayoutContainer>
  3. <v-row>
  4. <v-col cols="12">
  5. <div class="banner-container">
  6. <img
  7. :src="imageSrc"
  8. :alt="imageAlt"
  9. class="cover-image"
  10. />
  11. <div class="details-square">
  12. <v-row>
  13. <div class="content-row">
  14. <img
  15. src="/images/logiciels/icons/la-musique.svg"
  16. alt="icon instrument de musique"
  17. class="custom-icon"
  18. />
  19. <p class="description">
  20. {{ squareText }}
  21. </p>
  22. </div>
  23. </v-row>
  24. </div>
  25. <div :class="'logo-square' + (logoAltTheme ? ' alt-theme' : '')">
  26. <img :src="logoSrc" :alt="logoAlt"/>
  27. </div>
  28. </div>
  29. </v-col>
  30. </v-row>
  31. </LayoutContainer>
  32. </template>
  33. <script setup>
  34. const props = defineProps({
  35. imageSrc: {
  36. type: String,
  37. required: true
  38. },
  39. imageAlt: {
  40. type: String,
  41. default: ""
  42. },
  43. squareText: {
  44. type: String,
  45. default: "École de musique, d'art, de danse, de cirque, conservatoires et MJC"
  46. },
  47. logoSrc: {
  48. type: String,
  49. required: true
  50. },
  51. logoAlt: {
  52. type: String,
  53. default: ""
  54. },
  55. logoAltTheme: {
  56. type: Boolean,
  57. default: false
  58. }
  59. });
  60. </script>
  61. <style scoped lang="scss">
  62. .banner-container {
  63. position: relative;
  64. overflow: hidden;
  65. }
  66. .cover-image {
  67. width: 100%;
  68. min-height: 400px;
  69. max-height: 400px;
  70. object-fit: cover;
  71. object-position: center 20%;
  72. transition: transform 0.2s;
  73. margin: 0 auto;
  74. transform: scaleX(-1);
  75. }
  76. .custom-icon {
  77. width: 3rem;
  78. height: 3rem;
  79. margin-top: .5rem;
  80. }
  81. .details-square {
  82. position: absolute;
  83. bottom: 0.4rem;
  84. right: 0;
  85. width: 13rem;
  86. height: 10rem;
  87. background: var(--secondary-color);
  88. }
  89. .logo-square {
  90. position: absolute;
  91. bottom: 0.4rem;
  92. right: 13rem;
  93. width: 13rem;
  94. height: 10rem;
  95. img {
  96. width: 100%;
  97. height: 50%;
  98. margin-top: 2.5rem;
  99. }
  100. }
  101. .logo-square:not(.alt-theme) {
  102. background: var(--primary-color);
  103. }
  104. .description {
  105. color: var(--on-secondary-color);
  106. font-weight: 300;
  107. font-size: 0.8rem;
  108. text-align: center;
  109. display: flex;
  110. align-items: center;
  111. margin: 0.5rem 2rem 1rem;
  112. }
  113. .content-row {
  114. margin-top: 2rem;
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: space-around;
  118. align-items: center;
  119. height: 100%;
  120. }
  121. .icon {
  122. margin-left: 2rem;
  123. margin-right: 2rem;
  124. }
  125. </style>