Banner.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 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. });
  56. </script>
  57. <style scoped lang="scss">
  58. .banner-container {
  59. position: relative;
  60. overflow: hidden;
  61. }
  62. .cover-image {
  63. width: 100%;
  64. min-height: 400px;
  65. max-height: 400px;
  66. object-fit: cover;
  67. object-position: center 20%;
  68. transition: transform 0.2s;
  69. margin: 0 auto;
  70. transform: scaleX(-1);
  71. }
  72. .custom-icon {
  73. width: 3rem;
  74. height: 3rem;
  75. margin-top: .5rem;
  76. }
  77. .details-square {
  78. position: absolute;
  79. bottom: 0.4rem;
  80. right: 0;
  81. width: 13rem;
  82. height: 10rem;
  83. background: var(--secondary-color);
  84. }
  85. .logo-square {
  86. position: absolute;
  87. bottom: 0.4rem;
  88. right: 13rem;
  89. width: 13rem;
  90. height: 10rem;
  91. img {
  92. width: 100%;
  93. height: 50%;
  94. margin-top: 2.5rem;
  95. }
  96. }
  97. .description {
  98. color: var(--on-secondary-color);
  99. font-weight: 300;
  100. font-size: 0.8rem;
  101. text-align: center;
  102. display: flex;
  103. align-items: center;
  104. margin: 0.5rem 2rem 1rem;
  105. }
  106. .content-row {
  107. margin-top: 2rem;
  108. display: flex;
  109. flex-direction: column;
  110. justify-content: space-around;
  111. align-items: center;
  112. height: 100%;
  113. }
  114. .icon {
  115. margin-left: 2rem;
  116. margin-right: 2rem;
  117. }
  118. </style>