StickyMenu.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <div :class="stickyClass" >
  3. <v-row class="outil-row" >
  4. <v-col cols="12">
  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. color: white;
  31. font-weight: 500;
  32. font-size: 0.7rem;
  33. line-height: 15px;
  34. text-align: center;
  35. letter-spacing: 0.2em;
  36. text-transform: uppercase;
  37. }
  38. .red-square,
  39. .yellow-square,
  40. .blue-square,
  41. .darkblue-square {
  42. position: relative;
  43. font-family: "Barlow";
  44. width: 10rem;
  45. padding: 1rem;
  46. }
  47. .yellow-square {
  48. background: #f9d648;
  49. color: #0e2d32;
  50. }
  51. .red-square {
  52. background: #d8050b;
  53. }
  54. .blue-square {
  55. background: rgb(166, 206, 208);
  56. }
  57. .darkblue-square {
  58. background: #0e2d32;
  59. }
  60. .text-square {
  61. margin: 0.5rem 2rem;
  62. }
  63. </style>