app-header.vue 806 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <header class="header">
  3. <h1 class="header__title">
  4. <NuxtLink class="header__link" to="/">{{ siteTitle }}</NuxtLink>
  5. </h1>
  6. <div class="header__desc">{{ siteDescription }}</div>
  7. </header>
  8. </template>
  9. <script setup>
  10. const appConfig = useAppConfig()
  11. const siteTitle = appConfig.title
  12. const siteDescription = appConfig.description
  13. </script>
  14. <style lang="stylus">
  15. .header
  16. text-align: center
  17. margin-bottom: 15px
  18. position: sticky
  19. padding: 12px 0
  20. width: 100%
  21. top: 0
  22. z-index: 999
  23. border-bottom: 1px solid var(--border-gray-color)
  24. background-color: rgba(255, 255, 255, .88)
  25. backdrop-filter: blur(5px)
  26. &__title
  27. margin: 0
  28. font-size: 22px
  29. &__link
  30. text-decoration: none
  31. &__desc
  32. font-size: 12px
  33. color: var(--text-secondary-color)
  34. </style>