Banner.vue 2.6 KB

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