소스 검색

feat: 在文章间添加虚线分割线

Co-authored-by: aider (deepseek/deepseek-v4-pro) <aider@aider.chat>
Your Name 3 일 전
부모
커밋
a052c36856
2개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 14 0
      static/css/style.css
  2. 3 0
      templates/index.html

+ 14 - 0
static/css/style.css

@@ -171,6 +171,13 @@ body {
     color: #000;
 }
 
+/* ==================== 文章分割线 ==================== */
+.post-separator {
+    border: none;
+    border-top: 2px dashed #aaa;
+    margin: 1rem 0 0.5rem 0;
+}
+
 /* ==================== 空状态 ==================== */
 .empty-state {
     text-align: center;
@@ -331,3 +338,10 @@ body {
 .post-content p {
     font-weight: 500;
 }
+
+/* ==================== 分割线样式 ==================== */
+.post-separator {
+    border: none;
+    border-top: 2px dashed #aaa;
+    margin: 1rem 0 0.5rem 0;
+}

+ 3 - 0
templates/index.html

@@ -24,6 +24,9 @@
                 <a href="{{ url_for('view_post', post_id=post.id) }}" class="card-link">阅读全文 →</a>
             </div>
         </article>
+        {% if not loop.last %}
+        <hr class="post-separator">
+        {% endif %}
         {% endfor %}
     {% else %}
         <div class="empty-state">