🐛 修复主题切换首次显示并整理页面样式与类型
This commit is contained in:
@@ -148,7 +148,7 @@ function updateRule() {
|
|||||||
<Icon class="mr-2" name="material-symbols:category"/>
|
<Icon class="mr-2" name="material-symbols:category"/>
|
||||||
类型
|
类型
|
||||||
</div>
|
</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 class="flex mt-4">
|
||||||
<div
|
<div
|
||||||
v-for="(data, index) of typeGroup"
|
v-for="(data, index) of typeGroup"
|
||||||
@@ -167,7 +167,7 @@ function updateRule() {
|
|||||||
<Icon class="mr-2" name="material-symbols:book"/>
|
<Icon class="mr-2" name="material-symbols:book"/>
|
||||||
分类
|
分类
|
||||||
</div>
|
</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
|
<div
|
||||||
v-for="([name,count],index) of categories" :key="index"
|
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"
|
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"/>
|
<Icon class="mr-2" name="material-symbols:bookmarks"/>
|
||||||
标签
|
标签
|
||||||
</div>
|
</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 class="flex flex-wrap">
|
||||||
<div
|
<div
|
||||||
v-for="([name,count],index) of tags" :key="index"
|
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"
|
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">
|
class="border-l-2 border-l-old-neutral-400 dark:border-l-old-neutral-500 pl-4">
|
||||||
<div
|
<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">
|
class="year-marker relative text-indigo-300 text-2xl pt-3 pb-3">
|
||||||
{{ getYear(article) }}
|
{{ getYear(article) }}
|
||||||
</div>
|
</div>
|
||||||
<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">
|
class="year-marker relative text-indigo-300 text-2xl pt-3 pb-3">
|
||||||
{{ article.category }}
|
{{ article.category }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ function revealToggle(e?: MouseEvent) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<ClientOnly>
|
||||||
<Transition
|
<Transition
|
||||||
mode="out-in"
|
mode="out-in"
|
||||||
enter-active-class="transition-opacity duration-300 ease-in-out"
|
enter-active-class="transition-opacity duration-300 ease-in-out"
|
||||||
@@ -67,6 +68,10 @@ function revealToggle(e?: MouseEvent) {
|
|||||||
@click="revealToggle($event)"
|
@click="revealToggle($event)"
|
||||||
/>
|
/>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
<template #fallback>
|
||||||
|
<span class="inline-block size-6 mr-5" />
|
||||||
|
</template>
|
||||||
|
</ClientOnly>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
Reference in New Issue
Block a user