完善了首页和关于前端页面,以及解决了图片存储方案问题
This commit is contained in:
@@ -3,14 +3,18 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}郭安的小站{% endblock %}</title>
|
||||
<title>{% block title %}人,是一根会思考的芦苇{% endblock %}</title>
|
||||
|
||||
<!-- highlight.js 样式(护眼低对比主题) -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css">
|
||||
|
||||
<style>
|
||||
/* ===== Reset ===== */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
/* ===== 基础变量 ===== */
|
||||
/* ===== 基础变量(✅ 背景改为米黄色) ===== */
|
||||
:root {
|
||||
--bg: #fefefe;
|
||||
--bg: #fdfaf3; /* ✅ 米黄色背景 */
|
||||
--text: #1a1a1a;
|
||||
--text-light: #6b6b6b;
|
||||
--text-muted: #9b9b9b;
|
||||
@@ -183,8 +187,9 @@
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
|
||||
/* ===== 代码块(✅ 优化 + highlight.js 兼容) ===== */
|
||||
.post-body pre {
|
||||
background: var(--code-bg);
|
||||
background: #f4f4f4;
|
||||
padding: 1.2em;
|
||||
border-radius: var(--radius);
|
||||
overflow-x: auto;
|
||||
@@ -198,12 +203,19 @@
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.post-body p code, .post-body li code {
|
||||
.post-body p code,
|
||||
.post-body li code {
|
||||
background: var(--code-bg);
|
||||
padding: 0.15em 0.4em;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
/* highlight.js 代码块微调 */
|
||||
.post-body pre code.hljs {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* ===== 分类/标签 ===== */
|
||||
.tags, .categories {
|
||||
margin-top: 3rem;
|
||||
@@ -248,7 +260,7 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1><a href="/">郭安的小站</a></h1>
|
||||
<h1><a href="/">人,是一根会思考的芦苇</a></h1>
|
||||
<nav>
|
||||
<a href="/">首页</a>
|
||||
<a href="/archive/">归档</a>
|
||||
@@ -264,5 +276,15 @@
|
||||
<p>© 2024 郭安的小站 · 用 Django 构建</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- highlight.js 核心脚本 -->
|
||||
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.querySelectorAll('pre code').forEach(function (block) {
|
||||
hljs.highlightElement(block);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user