TheHeader.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <script lang="ts" setup>
  2. const route = useRoute()
  3. </script>
  4. <template>
  5. <header
  6. class="w-full h-46px px4 flex items-center justify-between bg-white dark:bg-dark border-b border-base z-10"
  7. border="b base"
  8. >
  9. <div
  10. v-if="route.path === '/'"
  11. class="flex items-center gap-4"
  12. >
  13. <img
  14. src="/logo.svg"
  15. alt="tres logo"
  16. >
  17. <h2 class="text opacity-60 font-bold">
  18. TresJS DevTools
  19. </h2>
  20. </div>
  21. <div
  22. v-else
  23. class="flex items-center gap-4"
  24. >
  25. <UButton
  26. variant="ghost"
  27. size="sm"
  28. icon="i-carbon-arrow-left"
  29. to="/"
  30. />
  31. <h2 class="text opacity-60 font-bold">
  32. {{ route.name }}
  33. </h2>
  34. </div>
  35. <div class="flex items-center gap-2">
  36. <UButton
  37. variant="ghost"
  38. size="sm"
  39. icon="i-carbon-document"
  40. target="_blank"
  41. to="https://docs.tresjs.org/"
  42. />
  43. <UButton
  44. variant="ghost"
  45. size="sm"
  46. icon="i-iconoir-github"
  47. target="_blank"
  48. to="https://github.com/Tresjs/nuxt"
  49. />
  50. </div>
  51. </header>
  52. </template>
  53. <style scoped></style>