feat: 归档页面

This commit is contained in:
2026-08-15 22:23:32 +08:00
parent 390437b4bb
commit 4a224b58f4
10 changed files with 215 additions and 117 deletions

View File

@@ -1,11 +1,7 @@
---
import {siteConfig} from "@/consts.ts";
import PostList from "@/components/Post/List.astro";
import Pagination from "@/components/Post/Pagination.astro";
import type {Post} from "@/types";
import PageHeader from "@/components/PageHeader.astro";
const {siteTitle} = siteConfig;
interface Props {
posts: Post[]
@@ -15,42 +11,18 @@ interface Props {
const {posts, page, totalPage} = Astro.props
---
<div class="page-content">
<PageHeader/>
<main>
<div class="intro">
<p>did you stand too close to the fire?<br>
like a liar looking for forgiveness from a stone.</p>
</div>
<main>
<PostList posts={posts}/>
<Pagination page={page} totalPage={totalPage}/>
</main>
<PostList posts={posts}/>
<Pagination page={page} totalPage={totalPage}/>
</main>
<footer>
<div>© 2026 Uroboros</div>
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">备案号:鄂ICP备2023000060号-2</a>
</footer>
</div>
<style>
.page-content {
min-height: 100%;
height: 100%;
display: flex;
flex-direction: column;
gap: 24px;
}
nav {
display: flex;
gap: 12px;
font-size: 14px;
color: var(--text-secondary);
}
.intro {
border-bottom: var(--border-secondary);
line-height: 2;
@@ -60,33 +32,9 @@ const {posts, page, totalPage} = Astro.props
margin-bottom: 12px;
}
main {
flex: 1;
flex-shrink: 0;
margin-bottom: 24px;
}
footer {
flex-shrink: 0;
min-height: 0;
height: 84px;
padding-bottom: 24px;
display: flex;
justify-content: center;
align-items: center;
font-size: 13px;
gap: 12px;
color: var(--text-tertiary);
}
@media (max-width: 640px) {
.intro{
padding-bottom: 24px;
}
footer {
height: 64px;
padding-bottom: 0;
}
}
</style>

View File

@@ -1,38 +0,0 @@
---
import {siteConfig} from "@/consts.ts";
const {siteTitle} = siteConfig;
---
<header>
<a href="/"><h1>{siteTitle}</h1></a>
<!--<nav>-->
<!-- <span>归档</span>-->
<!-- <span>/</span>-->
<!-- <span>标签</span>-->
<!-- <span>/</span>-->
<!-- <span>关于</span>-->
<!--</nav>-->
</header>
<style>
header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: var(--border-primary);
margin-top: 32px;
padding-bottom: 24px;
}
h1 {
font-size: 24px;
font-weight: 600;
}
@media (max-width: 640px) {
header {
margin-top: 12px;
margin-bottom: 0;
}
}
</style>

View File

@@ -67,4 +67,10 @@ const {posts} = Astro.props
.post:hover .arrow {
color: #334155;
}
@media (max-width: 640px) {
.post .d {
min-width: 64px;
}
}
</style>