StickyMenu.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div :class="stickyClass" >
  3. <v-row class="outil-row" justify="end">
  4. <v-col cols="3">
  5. <div class="container-square">
  6. <v-row v-for="square in squares" :key="square.id" :class="square.bgColor">
  7. <div>
  8. <v-icon :class="square.iconClass" />
  9. <p class="text-square">{{ square.text }}</p>
  10. </div>
  11. </v-row>
  12. </div>
  13. </v-col>
  14. </v-row>
  15. </div>
  16. </template>
  17. <script setup lang="ts">
  18. import { ref, defineProps } from "vue";
  19. const props = defineProps({
  20. shouldShowStickyMenu: Boolean,
  21. squaresData: Array,
  22. });
  23. const stickyClass = ref("sticky-scroll");
  24. const squares = ref(props.squaresData);
  25. </script>
  26. <style scoped>
  27. .container-square {
  28. display: flex;
  29. flex-direction: column;
  30. justify-content: space between;
  31. color: white;
  32. font-weight: 500;
  33. font-size: 0.7rem;
  34. line-height: 15px;
  35. text-align: center;
  36. letter-spacing: 0.2em;
  37. text-transform: uppercase;
  38. }
  39. .red-square,
  40. .yellow-square,
  41. .blue-square,
  42. .darkblue-square {
  43. display: flex;
  44. justify-content: center;
  45. align-items: center;
  46. font-family: "Barlow";
  47. width: 10rem;
  48. height: 7rem;
  49. margin-left: 14rem;
  50. padding: 1rem;
  51. }
  52. .yellow-square {
  53. background: #f9d648;
  54. color: #0e2d32;
  55. }
  56. .red-square {
  57. background: #d8050b;
  58. }
  59. .blue-square {
  60. background: rgba(32, 147, 190);
  61. }
  62. .darkblue-square {
  63. background: #0e2d32;
  64. }
  65. .text-square {
  66. margin: 0.5rem 2rem;
  67. }
  68. .icon {
  69. margin-right: 1rem;
  70. }
  71. .icon-logiciel {
  72. color: rgba(32, 147, 190);
  73. margin-right: 1rem;
  74. }
  75. .outil-row {
  76. margin: 5rem 0;
  77. }
  78. #sticky-menu {
  79. position: sticky;
  80. top: 10rem;
  81. z-index: 10;
  82. right: 0;
  83. margin-bottom: -40rem;
  84. }
  85. </style>