SubTitle.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <LayoutContainer>
  3. <div class="title-container">
  4. <v-icon
  5. :size="iconSize"
  6. :style="{ color: iconColor }"
  7. :class="iconClasses"
  8. />
  9. <h4 class="presentation-title" :style="{ color: titleColor }">
  10. {{ titleText }}
  11. </h4>
  12. </div>
  13. </LayoutContainer>
  14. </template>
  15. <script setup>
  16. const router = useRouter();
  17. const iconColor = ref("#2093BE4D");
  18. const updateIconColor = computed(() => {
  19. const path = router.currentRoute.value.path;
  20. switch (path) {
  21. case "/opentalent_school":
  22. return "#2093BE4D";
  23. case "/opentalent_artist":
  24. return "#FAC20A";
  25. case "/opentalent_manager":
  26. return "#D8050B";
  27. default:
  28. return "#9edbdd";
  29. }
  30. });
  31. watch(
  32. () => router.currentRoute.value,
  33. () => {
  34. iconColor.value = updateIconColor.value;
  35. },
  36. { immediate: true }
  37. );
  38. const props = defineProps({
  39. iconSize: {
  40. type: [String, Number],
  41. default: 5,
  42. },
  43. iconClasses: {
  44. type: String,
  45. default: "fa-solid fa-circle icon-title",
  46. },
  47. titleText: {
  48. type: String,
  49. default: "default title",
  50. },
  51. iconColor: {
  52. type: String,
  53. },
  54. titleColor: {
  55. type: String,
  56. default: "#071b1f",
  57. },
  58. });
  59. </script>
  60. <style scoped>
  61. .title-container {
  62. display: flex;
  63. align-items: center;
  64. gap: 0.5rem;
  65. margin-left: 1rem;
  66. color: #071b1f;
  67. font-size: 10px;
  68. font-weight: 600;
  69. line-height: 15px;
  70. letter-spacing: 1.8px;
  71. text-transform: uppercase;
  72. }
  73. .presentation-title {
  74. font-weight: 500;
  75. color: var(--Vert-90, #0E2D32);
  76. font-size: 1rem;
  77. line-height: 15px;
  78. letter-spacing: 1px;
  79. text-transform: uppercase;
  80. }
  81. </style>