Banner.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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="black-square" :style="{ backgroundColor: squareColor }">
  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-square" :style="{ color: textColor }">
  20. {{ squareText }}
  21. </p>
  22. </div>
  23. </v-row>
  24. </div>
  25. <div class="blue-square" :style="{ backgroundColor: blueSquareColor }">
  26. <img
  27. :src="logoSrc"
  28. :alt="logoAlt"
  29. class="logo-image"
  30. />
  31. </div>
  32. </div>
  33. </v-col>
  34. </v-row>
  35. </LayoutContainer>
  36. </template>
  37. <script setup>
  38. import { defineProps } from 'vue';
  39. const props = defineProps({
  40. imageSrc: {
  41. type: String,
  42. required: true
  43. },
  44. imageAlt: {
  45. type: String,
  46. default: ""
  47. },
  48. squareColor: {
  49. type: String,
  50. default: "#9edbdd"
  51. },
  52. textColor: {
  53. type: String,
  54. default: "#091d20"
  55. },
  56. squareText: {
  57. type: String,
  58. default: "École de musique, d'art, de danse, de cirque, conservatoires et MJC"
  59. },
  60. blueSquareColor: {
  61. type: String,
  62. default: "#0e2d32"
  63. },
  64. logoSrc: {
  65. type: String,
  66. required: true
  67. },
  68. logoAlt: {
  69. type: String,
  70. default: ""
  71. }
  72. });
  73. </script>
  74. <style scoped>
  75. .custom-icon {
  76. width: 3rem;
  77. height: 3rem;
  78. margin-top: .5rem;
  79. }
  80. .black-square {
  81. position: absolute;
  82. bottom: 0.4rem;
  83. right: 0;
  84. width: 13rem;
  85. height: 10rem;
  86. background-color: black;
  87. background: #9edbdd;
  88. }
  89. .blue-square {
  90. position: absolute;
  91. bottom: 0.4rem;
  92. right: 13rem;
  93. width: 13rem;
  94. height: 10rem;
  95. background: #0e2d32;
  96. }
  97. .description-square {
  98. font-weight: 300;
  99. font-size: 0.8rem;
  100. text-align: center;
  101. color: #091d20;
  102. display: flex;
  103. align-items: center;
  104. text-align: center;
  105. margin-top: 0.5rem;
  106. margin-left: 2rem;
  107. margin-right: 2rem;
  108. margin-bottom: 1rem;
  109. }
  110. .content-row {
  111. margin-top: 2rem;
  112. display: flex;
  113. flex-direction: column;
  114. justify-content: space-around;
  115. align-items: center;
  116. height: 100%;
  117. }
  118. .icon {
  119. margin-left: 2rem;
  120. margin-right: 2rem;
  121. }
  122. .logo-image {
  123. width: 100%;
  124. height: 50%;
  125. margin-top: 2.5rem;
  126. }
  127. .banner-container {
  128. position: relative;
  129. overflow: hidden;
  130. }
  131. .cover-image {
  132. width: 100%;
  133. min-height: 400px;
  134. max-height: 400px;
  135. object-fit: cover;
  136. object-position: center 20%;
  137. transition: transform 0.2s;
  138. margin: 0 auto;
  139. transform: scaleX(-1);
  140. }
  141. </style>