重做文章详情页:拾光阅读版式与目录/代码/灯箱交互
- 新增内容页外壳 base_content.html 与 reading.css / reading.js - 重写 post_detail.html:分类胶囊、阅读进度、首字下沉、代码块复制、 侧栏目录、上下篇、图片灯箱、明暗主题 - post_detail 视图补充上下篇、字数与阅读时长 - base.html 补 extra_css / extra_js block,修复脑图详情页样式不加载 - 加入 mindmaps、api、首页静态资源与模板 - 忽略 __pycache__ / *.pyc / *.back,并将已跟踪的 .pyc 移出版本库
This commit is contained in:
@@ -42,6 +42,13 @@
|
||||
padding: 0 1.5rem;
|
||||
}
|
||||
|
||||
|
||||
.container-wide {
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1.5rem;
|
||||
}
|
||||
|
||||
/* ===== 头部 ===== */
|
||||
header {
|
||||
padding: 3rem 0 2rem;
|
||||
@@ -256,6 +263,7 @@
|
||||
article h1 { font-size: 1.35rem; }
|
||||
}
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -264,6 +272,7 @@
|
||||
<nav>
|
||||
<a href="/">首页</a>
|
||||
<a href="/archive/">归档</a>
|
||||
<a href="/mindmaps/">脑图</a>
|
||||
<a href="/about/">关于</a>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -276,6 +285,9 @@
|
||||
<p>© 2024 郭安的小站 · 用 Django 构建</p>
|
||||
</footer>
|
||||
</div>
|
||||
<div class="container-wide">
|
||||
{% block wide_content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<!-- highlight.js 核心脚本 -->
|
||||
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script>
|
||||
@@ -286,5 +298,6 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user