Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

72 rader
3.0 KiB

  1. <template>
  2. <aside class="space-y-5">
  3. <!-- 热门排行 -->
  4. <section v-if="hotList.length" class="rounded-2xl bg-[var(--c-ffffff)] p-5 shadow-[0_8px_28px_var(--sh-34-68-112-50)]">
  5. <h2 class="flex items-center gap-1.5 text-base font-extrabold text-[var(--c-172033)]">
  6. <UIcon name="i-lucide-flame" class="size-4 text-[var(--c-ff681f)]" />
  7. 热门排行
  8. </h2>
  9. <ol class="mt-4 space-y-3">
  10. <li v-for="item in hotList" :key="item.id">
  11. <NuxtLink :to="item.url" class="group flex gap-2.5">
  12. <span
  13. class="mt-0.5 flex size-5 shrink-0 items-center justify-center rounded text-[11px] font-extrabold"
  14. :class="item.rank <= 3 ? 'bg-[var(--c-ff681f)] text-white' : 'bg-[var(--c-f1f5fa)] text-[var(--c-8a97a8)]'"
  15. >{{ item.rank }}</span>
  16. <span class="line-clamp-2 text-sm leading-snug text-[var(--c-4b5b70)] transition-colors group-hover:text-[var(--c-0b8cff)]">
  17. {{ item.title }}
  18. </span>
  19. </NuxtLink>
  20. </li>
  21. </ol>
  22. </section>
  23. <!-- 热门标签 -->
  24. <section v-if="tagList.length" class="rounded-2xl bg-[var(--c-ffffff)] p-5 shadow-[0_8px_28px_var(--sh-34-68-112-50)]">
  25. <h2 class="flex items-center gap-1.5 text-base font-extrabold text-[var(--c-172033)]">
  26. <UIcon name="i-lucide-tags" class="size-4 text-[var(--c-0b8cff)]" />
  27. 热门标签
  28. </h2>
  29. <div class="mt-4 flex flex-wrap gap-2">
  30. <NuxtLink
  31. v-for="tag in tagList"
  32. :key="tag.id"
  33. :to="`/info/tag/${tag.key}.html`"
  34. class="rounded-full bg-[var(--c-f7f9fd)] px-3 py-1.5 text-xs font-bold text-[var(--c-5b6b80)] transition-colors hover:bg-[var(--c-eef7ff)] hover:text-[var(--c-0b8cff)]"
  35. :class="{ '!bg-[var(--c-eef7ff)] !text-[var(--c-0b8cff)]': tag.key === activeTag }"
  36. >
  37. {{ tag.name }}
  38. </NuxtLink>
  39. </div>
  40. </section>
  41. <!-- 工具引导(转化位) -->
  42. <section class="overflow-hidden rounded-2xl bg-gradient-to-br from-[var(--c-0b8cff)] to-[var(--c-20d3a2)] p-5 text-white">
  43. <h2 class="text-base font-extrabold">试试 AI 创作</h2>
  44. <p class="mt-1.5 text-xs leading-relaxed text-white/85">AI 取名、动漫头像,几秒钟出结果。</p>
  45. <div class="mt-4 flex flex-col gap-2">
  46. <NuxtLink
  47. to="/writing/naming/"
  48. class="flex h-9 items-center justify-center rounded-full bg-[var(--c-ffffff)] text-xs font-extrabold text-[var(--c-0b74ea)] transition-opacity hover:opacity-90"
  49. >
  50. AI 取名
  51. </NuxtLink>
  52. <NuxtLink
  53. to="/draw/anime/"
  54. class="flex h-9 items-center justify-center rounded-full bg-white/20 text-xs font-extrabold text-white transition-colors hover:bg-white/30"
  55. >
  56. 动漫头像
  57. </NuxtLink>
  58. </div>
  59. </section>
  60. </aside>
  61. </template>
  62. <script setup>
  63. defineProps({
  64. hotList: { type: Array, default: () => [] },
  65. tagList: { type: Array, default: () => [] },
  66. activeTag: { type: String, default: '' },
  67. })
  68. </script>