🐛 修复主题切换首次显示并整理页面样式与类型
This commit is contained in:
@@ -148,7 +148,7 @@ function updateRule() {
|
||||
<Icon class="mr-2" name="material-symbols:category"/>
|
||||
类型
|
||||
</div>
|
||||
<hr class="border-0 h-[1px] bg-old-neutral-600 mt-3 mb-1"/>
|
||||
<hr class="border-0 h-px bg-old-neutral-600 mt-3 mb-1"/>
|
||||
<div class="flex mt-4">
|
||||
<div
|
||||
v-for="(data, index) of typeGroup"
|
||||
@@ -167,7 +167,7 @@ function updateRule() {
|
||||
<Icon class="mr-2" name="material-symbols:book"/>
|
||||
分类
|
||||
</div>
|
||||
<hr class="border-0 h-[1px] bg-old-neutral-600 mt-3 mb-1"/>
|
||||
<hr class="border-0 h-px bg-old-neutral-600 mt-3 mb-1"/>
|
||||
<div
|
||||
v-for="([name,count],index) of categories" :key="index"
|
||||
class="flex justify-between pl-4 pr-4 hover:text-sky-400 dark:hover:text-[#cccaff] transition-colors duration-300"
|
||||
@@ -190,7 +190,7 @@ function updateRule() {
|
||||
<Icon class="mr-2" name="material-symbols:bookmarks"/>
|
||||
标签
|
||||
</div>
|
||||
<hr class="border-0 h-[1px] bg-old-neutral-600 mt-3 mb-1"/>
|
||||
<hr class="border-0 h-px bg-old-neutral-600 mt-3 mb-1"/>
|
||||
<div class="flex flex-wrap">
|
||||
<div
|
||||
v-for="([name,count],index) of tags" :key="index"
|
||||
|
||||
@@ -58,12 +58,12 @@ function dateFormatToDate(date: Date | DataAnomaly) {
|
||||
v-for="(article,index) of articles" :key="article.id"
|
||||
class="border-l-2 border-l-old-neutral-400 dark:border-l-old-neutral-500 pl-4">
|
||||
<div
|
||||
v-if="currentChoice==='time' && (index == 0 || getYear(article) != getYear(articles[index-1]))"
|
||||
v-if="currentChoice==='time' && (index == 0 || getYear(article) != getYear(articles[index-1]!))"
|
||||
class="year-marker relative text-indigo-300 text-2xl pt-3 pb-3">
|
||||
{{ getYear(article) }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="currentChoice==='category' && (index == 0 || article.category != articles[index-1].category)"
|
||||
v-else-if="currentChoice==='category' && (index == 0 || article.category != articles[index-1]!.category)"
|
||||
class="year-marker relative text-indigo-300 text-2xl pt-3 pb-3">
|
||||
{{ article.category }}
|
||||
</div>
|
||||
|
||||
@@ -43,6 +43,7 @@ function revealToggle(e?: MouseEvent) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ClientOnly>
|
||||
<Transition
|
||||
mode="out-in"
|
||||
enter-active-class="transition-opacity duration-300 ease-in-out"
|
||||
@@ -67,6 +68,10 @@ function revealToggle(e?: MouseEvent) {
|
||||
@click="revealToggle($event)"
|
||||
/>
|
||||
</Transition>
|
||||
<template #fallback>
|
||||
<span class="inline-block size-6 mr-5" />
|
||||
</template>
|
||||
</ClientOnly>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user