✨ 未加载时骨架 与 样式小改

This commit is contained in:
2026-06-19 22:08:36 +08:00
parent e70e2358e8
commit 155eba16d1
6 changed files with 37 additions and 25 deletions
+6
View File
@@ -31,6 +31,12 @@ onMounted(() => {
:model-value="eraseHeaderMarkdown" :model-value="eraseHeaderMarkdown"
class="max-w-full" class="max-w-full"
/> />
<div v-else class="w-5/6">
<USkeleton class="h-4 mb-3 w-full bg-old-neutral-600"/>
<USkeleton class="h-4 mb-3 w-full bg-old-neutral-600"/>
<USkeleton class="h-4 mb-3 w-full bg-old-neutral-600"/>
<USkeleton class="h-4 mb-3 w-full bg-old-neutral-600"/>
</div>
</div> </div>
</template> </template>
+4 -4
View File
@@ -67,11 +67,11 @@ onMounted(() => {
</script> </script>
<template> <template>
<div class="bg-old-neutral-50 dark:bg-[#0b0d0d] w-full min-h-[100vh] h-full"> <div class="bg-old-neutral-50 dark:bg-[#0b0d0d] w-full min-h-screen h-full">
<UApp> <UApp>
<div <div
:class=" (collapsed ? 'h-[20vh]': 'h-[40vh]')" :class=" (collapsed ? 'h-[20vh]': 'h-[40vh]')"
class="flex flex-col relative transition-[height] duration-500 max-h-80"> class="flex flex-col relative transition-[height] duration-500 max-h-80 min-h-40">
<!-- header --> <!-- header -->
<div <div
v-if="mounted" v-if="mounted"
@@ -94,10 +94,10 @@ onMounted(() => {
<div v-if="isScrollDown"> <div v-if="isScrollDown">
<div <div
v-if="colorMode === 'light'" v-if="colorMode === 'light'"
class="opacity-80 max-h-[48px] flex w-full h-full fixed bg-[url('/79d52228c770808810a310115567e6790380823a.webp')] bg-cover bg-top"/> class="opacity-80 max-h-12 flex w-full h-full fixed bg-[url('/79d52228c770808810a310115567e6790380823a.webp')] bg-cover bg-top"/>
<div <div
v-else v-else
class="opacity-20 max-h-[48px] flex w-full h-full fixed bg-[url('/anime-8788959.webp')] bg-cover bg-center"/> class="opacity-20 max-h-12 flex w-full h-full fixed bg-[url('/anime-8788959.webp')] bg-cover bg-center"/>
</div> </div>
</div> </div>
<!-- navbar --> <!-- navbar -->
+3 -2
View File
@@ -26,6 +26,7 @@
"nuxt": "^4.1.2", "nuxt": "^4.1.2",
"overlayscrollbars-vue": "^0.5.9", "overlayscrollbars-vue": "^0.5.9",
"pinia": "^3.0.3", "pinia": "^3.0.3",
"serve": "^14.2.5",
"tailwind-scrollbar": "^4.0.2", "tailwind-scrollbar": "^4.0.2",
"tailwindcss": "^4.1.11", "tailwindcss": "^4.1.11",
"typescript": "^5.6.3", "typescript": "^5.6.3",
@@ -33,7 +34,6 @@
"vue-router": "^4.5.1", "vue-router": "^4.5.1",
"word-count": "^0.3.1" "word-count": "^0.3.1"
}, },
"packageManager": "pnpm@10.22.0",
"devDependencies": { "devDependencies": {
"@iconify-json/clarity": "^1.2.4", "@iconify-json/clarity": "^1.2.4",
"@iconify-json/codicon": "^1.2.32", "@iconify-json/codicon": "^1.2.32",
@@ -59,5 +59,6 @@
"unrs-resolver", "unrs-resolver",
"vue-demi" "vue-demi"
] ]
} },
"packageManager": "pnpm@11.8.0+sha512.c1f5e7c4cb241c8f174b743851d82f42b802324afc8b0f116b96adb15aa06664948dde36960a3ba1079ba5b4b29dd0140135b94b5b5f5263592249d68e555f26"
} }
+14 -9
View File
@@ -95,18 +95,23 @@ onMounted(() => {
</div> </div>
<div class="flex mt-2 justify-between h-28"> <div class="flex mt-2 justify-between h-28">
<overlay-scrollbars-component> <overlay-scrollbars-component v-if="mounted">
{{ metaData?.description }} {{ metaData?.description }}
</overlay-scrollbars-component> </overlay-scrollbars-component>
<div v-else class="w-4/5">
<USkeleton class="h-4 mb-3 w-full bg-old-neutral-600"/>
<USkeleton class="h-4 mb-3 w-full bg-old-neutral-600"/>
<USkeleton class="h-4 mb-3 w-full bg-old-neutral-600"/>
</div>
<div v-if="mounted" class=""> <div v-if="mounted" class="">
<TechStackCard <TechStackCard
:async-key="'stack:' + metaData?.id" :async-key="'stack:' + metaData?.id"
:tech-stack="metaData?.tech_stack" :tech-stack="metaData?.tech_stack"
:tech-stack-icon-names="metaData?.tech_stack_icon_names" :tech-stack-icon-names="metaData?.tech_stack_icon_names"
:tech-stack-theme-colors="metaData?.tech_stack_theme_colors" :tech-stack-theme-colors="metaData?.tech_stack_theme_colors"
:tech-stack-percent="metaData?.tech_stack_percent" :tech-stack-percent="metaData?.tech_stack_percent"
class="lg:w-64 w-0 transition-[width] duration-500" class="lg:w-64 w-0 transition-[width] duration-500"
/> />
</div> </div>
<div v-else class="min-w-64"/> <div v-else class="min-w-64"/>
</div> </div>
+3 -3
View File
@@ -115,13 +115,13 @@ function reverseCollapsed() {
</div> </div>
<div <div
class="relative flex mt-2 justify-between overflow-hidden duration-300 ease-in-out min-h-[8.5rem]" class="relative flex mt-2 justify-between overflow-hidden duration-300 ease-in-out min-h-34"
:class="{'max-h-[8.5rem]' : collapsed, 'max-h-[100vh]':!collapsed}"> :class="{'max-h-34' : collapsed, 'max-h-screen':!collapsed}">
<ReadonlyMdEditor <ReadonlyMdEditor
v-if="rawbody" :editor-id="safeEditorId" :markdown="rawbody!" v-if="rawbody" :editor-id="safeEditorId" :markdown="rawbody!"
class="w-full"/> class="w-full"/>
<div <div
class="absolute bottom-0 left-0 right-0 h-14 bg-gradient-to-t from-old-neutral-200 dark:from-old-neutral-800 to-transparent pointer-events-none transition-opacity duration-300" class="absolute bottom-0 left-0 right-0 h-14 bg-linear-to-t from-old-neutral-200 dark:from-old-neutral-800 to-transparent pointer-events-none transition-opacity duration-300"
:class="collapsed && showShadow?'opacity-100':'opacity-0'" :class="collapsed && showShadow?'opacity-100':'opacity-0'"
/> />
</div> </div>
+7 -7
View File
@@ -59,18 +59,18 @@ function filterRuleChange(rule: (data: PostMetaData) => boolean) {
<div v-else-if="post.draft"> <div v-else-if="post.draft">
</div> </div>
<div v-else> <div v-else>
{{post}} {{ post }}
</div> </div>
</div> </div>
<div v-if="postsMetaData.length === 0" class="w-full"> <div v-if="postsMetaData.length === 0" class="w-full">
<div <div
class="w-full light:bg-old-neutral-200 dark:bg-old-neutral-800 transition-shadow duration-300 shadow-lg hover:shadow-old-neutral-600 hover:cursor-pointer"> class="w-full light:bg-old-neutral-200 dark:bg-old-neutral-800 transition-shadow duration-300 shadow-lg hover:shadow-old-neutral-600 hover:cursor-pointer">
<div class="pt-5 text-center text-2xl"> <div class="pt-5 text-center text-2xl">
没有找到符合条件的文章 没有找到符合条件的文章
</div> </div>
<div class="pt-3 pb-3 text-center text-sm text-old-neutral-500"> <div class="pt-3 pb-3 text-center text-sm text-old-neutral-500">
tips:类型、分类、标签间的关系为且,一类筛选下各个选项间的关系为或 tips:类型、分类、标签间的关系为且,一类筛选下各个选项间的关系为或
</div> </div>
</div> </div>
</div> </div>
</div> </div>