Skip to content

Commit a0e5cd7

Browse files
authored
Merge pull request #11 from AndyWang505/feature/ux-enhancements
Feature/ux enhancements
2 parents b6c9276 + ed36463 commit a0e5cd7

5 files changed

Lines changed: 7 additions & 156 deletions

File tree

src/components/ToC.astro

Lines changed: 0 additions & 144 deletions
This file was deleted.

src/layouts/Aside.astro

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import PersonalInfo from '../components/PersonalInfo.astro';
33
import CategoryAside from '../components/CategoryAside.astro';
44
import TagCloud from '../components/TagCloud.astro';
55
import RecentPosts from '../components/RecentPosts.astro';
6-
import ToC from '../components/ToC.astro';
76
8-
const { headings = [] } = Astro.props;
97
const isPost = Astro.url.pathname.includes('/post/');
108
---
119

@@ -18,9 +16,6 @@ const isPost = Astro.url.pathname.includes('/post/');
1816
isPost ? (
1917
<div class="transition-all duration-700 flex flex-col w-full gap-4">
2018
<RecentPosts />
21-
<div class="sticky top-4">
22-
<ToC headings={headings} />
23-
</div>
2419
</div>
2520
) : (
2621
<div class="transition-all duration-700 flex flex-col w-full gap-4">

src/layouts/Post.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ const { headings } = await entry.render();
3030
<div class="relative max-w-[var(--page-width)] mx-auto">
3131
<div class="w-full grid grid-cols-[17.5rem_auto] grid-rows-[auto_1fr_auto] lg:grid-rows-[auto] mx-auto gap-4">
3232
<Aside headings={headings} />
33-
<main class="col-span-2 lg:col-span-1 p-0 overflow-hidden">
33+
<main class="col-span-2 lg:col-span-1 p-0 rounded-xl border border-gray-100/50 dark:border-zinc-700/50 overflow-hidden">
3434
<div class="onload-animation">
35-
<article class="bg-white shadow-lg rounded-xl dark:bg-zinc-900 border border-gray-100/50 dark:border-zinc-700/50 px-2 py-3 sm:px-4 sm:py-4 md:px-8 md:py-8">
35+
<article class="bg-white shadow-lg dark:bg-zinc-900 px-2 py-3 sm:px-4 sm:py-4 md:px-8 md:py-8">
3636
<h1 class="text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold mb-3 sm:mb-4 md:mb-6 dark:text-zinc-100 bg-gradient-to-r from-gray-900 to-gray-700 dark:from-zinc-100 dark:to-zinc-300 bg-clip-text text-transparent leading-tight">{title}</h1>
3737
<!-- metadata - 使用 CardItem 的樣式 -->
3838
<div class="flex flex-wrap text-gray-500 dark:text-gray-400 items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-5 mb-3 sm:mb-4 md:mb-6 lg:mb-8 p-2 sm:p-3 md:p-4 bg-gray-100/70 dark:bg-zinc-800/30 rounded-lg border border-gray-300/50 dark:border-zinc-700/30 shadow-sm text-xs sm:text-sm md:text-base">

src/pages/archive/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function formatDate(date: Date) {
3838
<!-- mobile nav -->
3939
<main class="col-span-2 lg:col-span-1 p-0 overflow-hidden">
4040
<div class="onload-animation">
41-
<section class="dark:bg-zinc-900 bg-white shadow-md rounded-lg overflow-hidden py-3 sm:py-6">
41+
<section class="dark:bg-zinc-900 bg-white rounded-xl overflow-hidden py-3 sm:py-6">
4242
<div class="mb-4 sm:mb-8 ml-3 sm:ml-6 md:ml-12 dark:text-neutral-200">
4343
<h2 class="text-lg sm:text-xl md:text-2xl">Archive</h2>
4444
<h3 class="text-sm sm:text-base md:text-xl">共 {posts.length} 筆文章</h3>

src/styles/base.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
/* 代碼塊 */
4040
--codeblock-bg: #0b0b0c;
41-
--codeblock-topbar-bg: #111827;
41+
--codeblock-topbar-bg: #0f1e4e;
4242
}
4343

4444
body {
@@ -485,8 +485,8 @@ h6 {
485485
}
486486

487487
blockquote {
488-
background-color: #f7f7f7;
489-
border-left: 4px solid #e4e4e7;
488+
background-color: #f0f0f0;
489+
border-left: 4px solid #c9c9ce;
490490
padding: 10px 0 10px 20px;
491491
margin: 0px 0 1.2rem;
492492
}
@@ -496,7 +496,7 @@ blockquote p {
496496
}
497497

498498
.dark blockquote {
499-
background-color: rgb(24 24 27 / var(--tw-bg-opacity, 1));
499+
background-color: #0d121a;
500500
border-left-color: #3b82f6;
501501
}
502502

0 commit comments

Comments
 (0)