Navbar.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <va-navbar class="app-layout-navbar">
  3. <template #left>
  4. <div class="left">
  5. <va-icon-menu-collapsed
  6. :class="{ 'x-flip': isSidebarMinimized }"
  7. class="va-navbar__item"
  8. :color="colors.primary"
  9. @click="isSidebarMinimized = !isSidebarMinimized"
  10. />
  11. <router-link to="/">
  12. <vuestic-logo class="logo" />
  13. </router-link>
  14. </div>
  15. </template>
  16. <!-- <div class="app-navbar-center">-->
  17. <!-- <span class="hidden md:block mr-2">{{ t('navbar.messageUs') }}</span>-->
  18. <!-- <a class="hidden md:block mr-2" href="mailto:hello@epicmax.co" target="_blank" :style="{ color: colors.primary }">-->
  19. <!-- hello@epicmax.co-->
  20. <!-- </a>-->
  21. <!-- <va-button-->
  22. <!-- href="https://github.com/epicmaxco/vuestic-admin"-->
  23. <!-- color="#000000"-->
  24. <!-- class="hidden lg:block"-->
  25. <!-- icon="github"-->
  26. <!-- target="_blank"-->
  27. <!-- >-->
  28. <!-- {{ t('navbar.repository') }}-->
  29. <!-- </va-button>-->
  30. <!-- </div>-->
  31. <template #right>
  32. <app-navbar-actions class="app-navbar__actions" :user-name="userName" />
  33. </template>
  34. </va-navbar>
  35. </template>
  36. <script setup>
  37. import { computed } from 'vue'
  38. import { storeToRefs } from 'pinia'
  39. import { useGlobalStore } from '../../stores/global-store'
  40. import { useI18n } from 'vue-i18n'
  41. import { useColors } from 'vuestic-ui'
  42. import VuesticLogo from '../VuesticLogo.vue'
  43. import VaIconMenuCollapsed from '../icons/VaIconMenuCollapsed.vue'
  44. import AppNavbarActions from './components/AppNavbarActions.vue'
  45. const GlobalStore = useGlobalStore()
  46. const { t } = useI18n()
  47. const { isSidebarMinimized, userName } = storeToRefs(GlobalStore)
  48. const { getColors } = useColors()
  49. const colors = computed(() => getColors())
  50. </script>
  51. <style lang="scss" scoped>
  52. .va-navbar {
  53. box-shadow: var(--va-box-shadow);
  54. z-index: 2;
  55. @media screen and (max-width: 950px) {
  56. .left {
  57. width: 100%;
  58. }
  59. .app-navbar__actions {
  60. width: 100%;
  61. display: flex;
  62. justify-content: space-between;
  63. }
  64. }
  65. }
  66. .left {
  67. display: flex;
  68. align-items: center;
  69. & > * {
  70. margin-right: 1.5rem;
  71. }
  72. & > *:last-child {
  73. margin-right: 0;
  74. }
  75. }
  76. .x-flip {
  77. transform: scaleX(-100%);
  78. }
  79. .app-navbar-center {
  80. display: flex;
  81. align-items: center;
  82. height: 1rem;
  83. @media screen and (max-width: 1200px) {
  84. &__github-button {
  85. display: none;
  86. }
  87. }
  88. @media screen and (max-width: 950px) {
  89. &__text {
  90. display: none;
  91. }
  92. }
  93. }
  94. </style>