完成wordpress到django站点的数据迁移,下一届阶段完成前端样式的轻度编写
This commit is contained in:
@@ -0,0 +1,268 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}郭安的小站{% endblock %}</title>
|
||||
<style>
|
||||
/* ===== Reset ===== */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
/* ===== 基础变量 ===== */
|
||||
:root {
|
||||
--bg: #fefefe;
|
||||
--text: #1a1a1a;
|
||||
--text-light: #6b6b6b;
|
||||
--text-muted: #9b9b9b;
|
||||
--accent: #333333;
|
||||
--border: #e8e8e8;
|
||||
--code-bg: #f6f6f6;
|
||||
--radius: 4px;
|
||||
}
|
||||
|
||||
/* ===== 全局 ===== */
|
||||
body {
|
||||
font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
|
||||
"STSong", "Times New Roman", serif;
|
||||
font-size: 17px;
|
||||
line-height: 1.85;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* ===== 布局 ===== */
|
||||
.container {
|
||||
max-width: 680px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1.5rem;
|
||||
}
|
||||
|
||||
/* ===== 头部 ===== */
|
||||
header {
|
||||
padding: 3rem 0 2rem;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid var(--border);
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
header h1 a {
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
nav {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
nav a {
|
||||
color: var(--text-light);
|
||||
text-decoration: none;
|
||||
margin: 0 0.8rem;
|
||||
font-size: 0.9rem;
|
||||
font-family: -apple-system, "Noto Sans SC", sans-serif;
|
||||
}
|
||||
|
||||
nav a:hover {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
/* ===== 文章列表 ===== */
|
||||
.post-item {
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.post-item h2 {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
.post-item h2 a {
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-item h2 a:hover {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 1px;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
.post-date {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
font-family: -apple-system, "Noto Sans SC", sans-serif;
|
||||
}
|
||||
|
||||
.post-summary {
|
||||
margin-top: 0.5rem;
|
||||
color: var(--text-light);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* ===== 文章详情 ===== */
|
||||
article h1 {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.article-meta {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 2.5rem;
|
||||
font-family: -apple-system, "Noto Sans SC", sans-serif;
|
||||
}
|
||||
|
||||
.article-meta span {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
/* 正文排版 */
|
||||
.post-body {
|
||||
font-size: 17px;
|
||||
line-height: 1.9;
|
||||
}
|
||||
|
||||
.post-body h2 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
margin: 2.2em 0 0.8em;
|
||||
}
|
||||
|
||||
.post-body h3 {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
margin: 1.8em 0 0.6em;
|
||||
}
|
||||
|
||||
.post-body p {
|
||||
margin-bottom: 1.3em;
|
||||
}
|
||||
|
||||
.post-body a {
|
||||
color: var(--text);
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--text-muted);
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
.post-body a:hover {
|
||||
text-decoration-color: var(--text);
|
||||
}
|
||||
|
||||
.post-body img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: 1.5em 0;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.post-body blockquote {
|
||||
border-left: 3px solid var(--text-muted);
|
||||
padding: 0.5em 0 0.5em 1.2em;
|
||||
margin: 1.5em 0;
|
||||
color: var(--text-light);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.post-body ul, .post-body ol {
|
||||
margin-bottom: 1.3em;
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
|
||||
.post-body li {
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
|
||||
.post-body pre {
|
||||
background: var(--code-bg);
|
||||
padding: 1.2em;
|
||||
border-radius: var(--radius);
|
||||
overflow-x: auto;
|
||||
margin: 1.5em 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.post-body code {
|
||||
font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.post-body p code, .post-body li code {
|
||||
background: var(--code-bg);
|
||||
padding: 0.15em 0.4em;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* ===== 分类/标签 ===== */
|
||||
.tags, .categories {
|
||||
margin-top: 3rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 1px solid var(--border);
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-light);
|
||||
font-family: -apple-system, "Noto Sans SC", sans-serif;
|
||||
}
|
||||
|
||||
.tags a, .categories a {
|
||||
color: var(--text-light);
|
||||
text-decoration: none;
|
||||
margin-right: 0.8rem;
|
||||
}
|
||||
|
||||
.tags a:hover, .categories a:hover {
|
||||
color: var(--text);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ===== 页脚 ===== */
|
||||
footer {
|
||||
margin-top: 5rem;
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
border-top: 1px solid var(--border);
|
||||
font-family: -apple-system, "Noto Sans SC", sans-serif;
|
||||
}
|
||||
|
||||
/* ===== 响应式 ===== */
|
||||
@media (max-width: 768px) {
|
||||
body { font-size: 16px; }
|
||||
header { padding: 2rem 0 1.5rem; margin-bottom: 2rem; }
|
||||
.post-body { font-size: 16px; }
|
||||
article h1 { font-size: 1.35rem; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1><a href="/">郭安的小站</a></h1>
|
||||
<nav>
|
||||
<a href="/">首页</a>
|
||||
<a href="/archive/">归档</a>
|
||||
<a href="/about/">关于</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>© 2024 郭安的小站 · 用 Django 构建</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user