StickyMenu.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. .yellow-square,
  40. .blue-square,
  41. .darkblue-square {
  42. display: flex;
  43. justify-content: center;
  44. align-items: center;
  45. font-family: "Barlow";
  46. width: 10rem;
  47. height: 7rem;
  48. margin-left: 14rem;
  49. padding: 1rem;
  50. }
  51. .yellow-square {
  52. background: #f9d648;
  53. color: #0e2d32;
  54. }
  55. .blue-square {
  56. background: rgba(32, 147, 190);
  57. }
  58. .darkblue-square {
  59. background: #0e2d32;
  60. }
  61. .text-square {
  62. margin: 0.5rem 2rem;
  63. }
  64. .icon {
  65. margin-right: 1rem;
  66. }
  67. .icon-logiciel {
  68. color: rgba(32, 147, 190);
  69. margin-right: 1rem;
  70. }
  71. .outil-row {
  72. margin: 5rem 0;
  73. }
  74. #sticky-menu {
  75. position: sticky;
  76. top: 10rem;
  77. z-index: 10;
  78. right: 0;
  79. margin-bottom: -40rem;
  80. }
  81. </style>