Banner.vue 2.7 KB

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