App.vue 614 B

1234567891011121314151617181920212223242526272829
  1. <template>
  2. <NavBar
  3. v-if="showNavBar"
  4. :show-nav-icons="$route.path !== '/password'"
  5. :fixed="true"
  6. />
  7. <router-view :key="$route.fullPath" class="page-container" />
  8. </template>
  9. <script setup lang="ts">
  10. import { computed } from 'vue'
  11. import { useRoute } from 'vue-router'
  12. const route = useRoute()
  13. const navBarIgnore = ['/login', '/register']
  14. const showNavBar = computed(() => !navBarIgnore.includes(route.path))
  15. </script>
  16. <style lang="scss">
  17. .page-container {
  18. min-height: 100vh;
  19. padding-bottom: 48px;
  20. overflow: hidden;
  21. .nav-bar-wrap + & {
  22. padding-top: $nav-bar-height;
  23. }
  24. }
  25. </style>