Hanye官网
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

terms.vue 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <div class="min-h-screen bg-stone-950">
  3. <div class="w-full h-[45px] sm:h-[55px] md:h-[65px] lg:h-[72px]"></div>
  4. <!-- 面包屑导航 -->
  5. <div class="max-w-screen-2xl mx-auto px-4 pt-8">
  6. <nav class="flex items-center space-x-2 text-sm text-zinc-400">
  7. <NuxtLink :to="homepagePath" class="hover:text-white transition">{{
  8. t("common.breadcrumb.home")
  9. }}</NuxtLink>
  10. <span class="text-zinc-600">/</span>
  11. <span class="text-white">{{ t("common.breadcrumb.terms") }}</span>
  12. </nav>
  13. </div>
  14. <!-- 主要内容 -->
  15. <div class="max-w-screen-2xl mx-auto px-4 py-8">
  16. <!-- 页面标题 -->
  17. <div class="mb-8">
  18. <h1 class="text-4xl font-bold text-white mb-4">
  19. {{ t("common.terms.title") }}
  20. </h1>
  21. <p class="text-zinc-400">{{ t("common.terms.description") }}</p>
  22. </div>
  23. <!-- 内容区域 -->
  24. <div class="bg-stone-900 rounded-lg p-8 shadow-lg">
  25. <div class="prose prose-invert max-w-none">
  26. <ContentRenderer v-if="page" :value="page" />
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </template>
  32. <script setup lang="ts">
  33. /**
  34. * 利用規約ページ
  35. * ウェブサイトの利用規約を表示
  36. */
  37. import { useI18n } from 'vue-i18n'
  38. import { computed } from 'vue'
  39. const { t, locale } = useI18n()
  40. const homepagePath = computed(() => {
  41. return locale.value === "zh" ? "/" : `/${locale.value}`
  42. })
  43. // 计算内容路径
  44. const contentPath = computed(() => {
  45. return `/${locale.value}/terms`
  46. })
  47. const { data: page } = await useAsyncData(contentPath.value, () => {
  48. return queryCollection("content").path(contentPath.value).first()
  49. })
  50. // 设置页面元数据
  51. useHead({
  52. title: t("common.meta.terms.title"),
  53. meta: [
  54. {
  55. name: "description",
  56. content: t("common.meta.terms.description"),
  57. },
  58. ],
  59. })
  60. </script>