feat: restore sablog browse modes and clean imported HTML
Build and Deploy / verify (push) Successful in 40s
Build and Deploy / deploy (push) Successful in 36s

Keep the public site readable after import (nbsp, highlighter, wrapping code, compact pager) and finish the admin extras already in this tree: sticky levels, preview, page cache, and live llms.txt.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
gouki
2026-09-18 21:33:02 +00:00
co-authored by Cursor
parent 469160dc3f
commit ae47447062
98 changed files with 8618 additions and 901 deletions
+509 -105
View File
@@ -1,40 +1,112 @@
/* ============ LaraLog 默认主题 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
font-size: 16px;
line-height: 1.7;
color: #333;
background: #f5f6f8;
}
a { color: #2d6cdf; text-decoration: none; }
a:hover { color: #1a4fa8; }
a {
color: #2d6cdf;
text-decoration: none;
}
a:hover {
color: #1a4fa8;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 16px;
}
/* Header */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 18px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-title { font-size: 26px; font-weight: 800; color: #111; }
.site-desc { font-size: 13px; color: #888; margin-top: 2px; }
.site-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.site-nav a.active { color: #2d6cdf; font-weight: 600; }
.site-search input { padding: 6px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; width: 150px; }
.inline-form { display: inline; }
.link-btn { background: none; border: none; color: #2d6cdf; cursor: pointer; font-size: 15px; padding: 0; }
.site-header {
background: #fff;
border-bottom: 1px solid #e5e7eb;
padding: 18px 0;
}
.site-header .container {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
}
.site-title {
font-size: 26px;
font-weight: 800;
color: #111;
}
.site-desc {
font-size: 13px;
color: #888;
margin-top: 2px;
}
.site-nav {
display: flex;
align-items: center;
gap: 16px;
flex-wrap: wrap;
font-size: 15px;
}
.site-nav a.active {
color: #2d6cdf;
font-weight: 600;
}
.site-search input {
padding: 6px 10px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 14px;
width: 150px;
}
.inline-form {
display: inline;
}
.link-btn {
background: none;
border: none;
color: #2d6cdf;
cursor: pointer;
font-size: 15px;
padding: 0;
}
/* Layout */
.main-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 24px 16px; align-items: start; }
.main-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
gap: 24px;
padding: 24px 16px;
align-items: start;
}
@media (max-width: 860px) {
.main-layout { grid-template-columns: 1fr; }
.main-layout {
grid-template-columns: 1fr;
}
}
/* Content */
.content { min-width: 0; }
.content {
min-width: 0;
}
.post-card, .post-full, .widget, .auth-box, .profile-box, .links-list {
.post-card,
.post-full,
.widget,
.auth-box,
.profile-box,
.links-list {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 10px;
@@ -42,114 +114,446 @@ a:hover { color: #1a4fa8; }
margin-bottom: 20px;
}
.post-card.sticky { border-left: 4px solid #f59e0b; }
.post-card.sticky {
border-left: 4px solid #f59e0b;
}
.post-title { font-size: 20px; line-height: 1.4; margin-bottom: 8px; }
.post-card .post-title a { color: #111; }
.post-card .post-title a:hover { color: #2d6cdf; }
.badge { background: #f59e0b; color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.post-title {
font-size: 20px;
line-height: 1.4;
margin-bottom: 8px;
}
.post-card .post-title a {
color: #111;
}
.post-card .post-title a:hover {
color: #2d6cdf;
}
.badge {
background: #f59e0b;
color: #fff;
font-size: 12px;
padding: 2px 6px;
border-radius: 4px;
margin-right: 6px;
vertical-align: middle;
}
.post-meta { font-size: 13px; color: #888; margin-bottom: 10px; }
.post-excerpt { color: #555; margin-bottom: 10px; }
.post-footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.read-more { font-weight: 600; }
.post-meta {
font-size: 13px;
color: #888;
margin-bottom: 10px;
}
.post-excerpt {
color: #555;
margin-bottom: 10px;
}
.post-footer {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
font-size: 14px;
}
.read-more {
font-weight: 600;
}
.post-full .post-title { font-size: 28px; }
.post-cover { margin: -20px -24px 16px; border-radius: 10px 10px 0 0; overflow: hidden; }
.post-cover img { width: 100%; height: auto; display: block; max-height: 420px; object-fit: cover; }
.post-card .post-cover { margin: -20px -24px 12px; border-radius: 10px 10px 0 0; }
.post-card .post-cover img { max-height: 260px; }
.post-content { margin-top: 16px; font-size: 16.5px; }
.post-content img { max-width: 100%; height: auto; border-radius: 6px; }
.post-content pre { background: #1e1e2e; color: #e6e6e6; padding: 14px; border-radius: 8px; overflow-x: auto; margin: 12px 0; }
.post-content code { background: #f0f1f3; padding: 2px 5px; border-radius: 4px; font-size: 14px; }
.post-content pre code { background: none; padding: 0; }
.post-content blockquote { border-left: 4px solid #2d6cdf; padding-left: 14px; color: #666; margin: 12px 0; }
.post-content h1, .post-content h2, .post-content h3 { margin: 18px 0 8px; line-height: 1.3; }
.post-content ul, .post-content ol { padding-left: 24px; margin: 8px 0; }
.post-content table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.post-content th, .post-content td { border: 1px solid #ddd; padding: 6px 10px; }
.post-full .post-title {
font-size: 28px;
}
.post-cover {
margin: -20px -24px 16px;
border-radius: 10px 10px 0 0;
overflow: hidden;
}
.post-cover img {
width: 100%;
height: auto;
display: block;
max-height: 420px;
object-fit: cover;
}
.post-card .post-cover {
margin: -20px -24px 12px;
border-radius: 10px 10px 0 0;
}
.post-card .post-cover img {
max-height: 260px;
}
.post-content {
margin-top: 16px;
font-size: 16.5px;
max-width: 100%;
overflow-wrap: anywhere;
word-break: break-word;
}
.post-content img {
max-width: 100%;
height: auto;
border-radius: 6px;
}
.post-content pre,
.post-content .codeText,
.post-content ol[class^="dp-"] {
background: #1e1e2e;
color: #e6e6e6;
padding: 14px;
border-radius: 8px;
overflow-x: auto;
max-width: 100%;
margin: 12px 0;
white-space: pre-wrap;
word-break: break-word;
}
.post-content code {
background: #f0f1f3;
padding: 2px 5px;
border-radius: 4px;
font-size: 14px;
word-break: break-all;
overflow-wrap: anywhere;
white-space: break-spaces;
}
.post-content pre code {
display: block;
background: none;
padding: 0;
white-space: pre-wrap;
word-break: break-word;
}
.post-content blockquote {
border-left: 4px solid #2d6cdf;
padding-left: 14px;
color: #666;
margin: 12px 0;
}
.post-content h1,
.post-content h2,
.post-content h3 {
margin: 18px 0 8px;
line-height: 1.3;
}
.post-content ul,
.post-content ol {
padding-left: 24px;
margin: 8px 0;
}
.post-content table {
border-collapse: collapse;
width: 100%;
margin: 12px 0;
}
.post-content th,
.post-content td {
border: 1px solid #ddd;
padding: 6px 10px;
}
.post-tags { margin-top: 16px; }
.tag-link { display: inline-block; background: #eef2ff; color: #3b5bdb; border-radius: 4px; padding: 2px 8px; font-size: 13px; margin: 2px 4px 2px 0; }
.tag-link:hover { background: #dbe4ff; }
.post-tags {
margin-top: 16px;
}
.tag-link {
display: inline-block;
background: #eef2ff;
color: #3b5bdb;
border-radius: 4px;
padding: 2px 8px;
font-size: 13px;
margin: 2px 4px 2px 0;
}
.tag-link:hover {
background: #dbe4ff;
}
/* Comments */
.comments-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 20px 24px; margin-bottom: 20px; }
.section-title { font-size: 18px; margin-bottom: 14px; }
.comment { padding: 12px 0; border-bottom: 1px solid #f0f1f3; }
.comment:last-of-type { border-bottom: none; }
.comment-head { font-size: 14px; margin-bottom: 4px; }
.comment-time { color: #999; }
.comment-body { font-size: 15px; color: #444; }
.comments-section {
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 10px;
padding: 20px 24px;
margin-bottom: 20px;
}
.section-title {
font-size: 18px;
margin-bottom: 14px;
}
.comment {
padding: 12px 0;
border-bottom: 1px solid #f0f1f3;
}
.comment:last-of-type {
border-bottom: none;
}
.comment-head {
font-size: 14px;
margin-bottom: 4px;
}
.comment-time {
color: #999;
}
.comment-body {
font-size: 15px;
color: #444;
}
.comment-form { margin-top: 16px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 14px; margin-bottom: 4px; }
.form-row input, .form-row textarea {
width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; font-family: inherit;
.comment-form {
margin-top: 16px;
}
.form-row {
margin-bottom: 12px;
}
.form-row label {
display: block;
font-size: 14px;
margin-bottom: 4px;
}
.form-row input,
.form-row textarea {
width: 100%;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 15px;
font-family: inherit;
}
.honeypot {
position: absolute;
left: -9999px;
opacity: 0;
}
.error {
color: #e03131;
font-size: 13px;
margin-top: 4px;
}
.honeypot { position: absolute; left: -9999px; opacity: 0; }
.error { color: #e03131; font-size: 13px; margin-top: 4px; }
.btn {
background: #2d6cdf; color: #fff; border: none; padding: 9px 20px; border-radius: 6px;
font-size: 15px; cursor: pointer;
background: #2d6cdf;
color: #fff;
border: none;
padding: 9px 20px;
border-radius: 6px;
font-size: 15px;
cursor: pointer;
}
.btn:hover {
background: #1a4fa8;
}
.btn-primary {
background: #2d6cdf;
}
.btn:hover { background: #1a4fa8; }
.btn-primary { background: #2d6cdf; }
.alert { padding: 10px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-success { background: #d3f9d8; color: #2b8a3e; }
.alert-error { background: #ffe3e3; color: #c92a2a; }
.alert {
padding: 10px 16px;
border-radius: 8px;
margin-bottom: 14px;
font-size: 14px;
}
.alert-success {
background: #d3f9d8;
color: #2b8a3e;
}
.alert-error {
background: #ffe3e3;
color: #c92a2a;
}
.alert-warning {
background: #fff3bf;
color: #8a6d00;
}
/* Sidebar */
.sidebar { position: sticky; top: 20px; }
.widget { padding: 16px 20px; }
.widget-title { font-size: 15px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #2d6cdf; }
.widget-list { list-style: none; }
.widget-list li { font-size: 14px; padding: 4px 0; }
.count { color: #aaa; font-size: 13px; }
.tag-cloud { line-height: 2; }
.tag-cloud.big { line-height: 2.4; }
.sidebar {
position: sticky;
top: 20px;
}
.widget {
padding: 16px 20px;
}
.widget-title {
font-size: 15px;
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 2px solid #2d6cdf;
}
.widget-list {
list-style: none;
}
.widget-list li {
font-size: 14px;
padding: 4px 0;
}
.count {
color: #aaa;
font-size: 13px;
}
.tag-cloud {
line-height: 2;
}
.tag-cloud.big {
line-height: 2.4;
}
/* Misc */
.empty { color: #999; text-align: center; padding: 30px 0; }
.list-title { font-size: 22px; margin-bottom: 16px; }
.archive-year { font-size: 17px; margin: 14px 0 6px; }
.archive-list { list-style: none; }
.archive-posts { margin: 4px 0 10px 22px; }
.archive-posts time { color: #aaa; font-size: 13px; }
.pagination { margin: 16px 0; }
.pagination-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pagination-links a, .pagination-links .current, .pagination-links .disabled {
padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff;
.empty {
color: #999;
text-align: center;
padding: 30px 0;
}
.list-title {
font-size: 22px;
margin-bottom: 16px;
}
.archive-year {
font-size: 17px;
margin: 14px 0 6px;
}
.archive-list {
list-style: none;
}
.archive-posts {
margin: 4px 0 10px 22px;
}
.archive-posts time {
color: #aaa;
font-size: 13px;
}
.pagination-links .current { background: #2d6cdf; color: #fff; border-color: #2d6cdf; }
.pagination-links .disabled { color: #bbb; }
.auth-layout { display: flex; justify-content: center; padding: 40px 16px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-alt { margin-top: 14px; font-size: 14px; color: #666; text-align: center; }
.view-mode-switcher {
font-size: 13px;
color: #888;
margin-bottom: 14px;
}
.view-mode-switcher a.active {
font-weight: 700;
color: #2d6cdf;
}
.links-list { list-style: none; }
.links-list li { padding: 6px 0; }
.link-note { color: #999; font-size: 14px; }
.pagination {
width: 100%;
max-width: 100%;
min-width: 0;
margin: 16px 0;
}
.pagination-links {
display: flex;
gap: 6px;
flex-wrap: wrap;
align-items: center;
max-width: 100%;
}
.pagination-info {
color: #888;
font-size: 13px;
margin-right: 6px;
white-space: nowrap;
}
.pagination-links a,
.pagination-links .current,
.pagination-links .disabled {
padding: 6px 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 14px;
background: #fff;
}
.pagination-links .current {
background: #2d6cdf;
color: #fff;
border-color: #2d6cdf;
}
.pagination-links .disabled {
color: #bbb;
}
.site-footer { background: #fff; border-top: 1px solid #e5e7eb; padding: 20px 0; margin-top: 24px; text-align: center; font-size: 13px; color: #888; }
.powered { margin-top: 4px; }
.auth-layout {
display: flex;
justify-content: center;
padding: 40px 16px;
}
.auth-box {
width: 100%;
max-width: 420px;
}
.auth-alt {
margin-top: 14px;
font-size: 14px;
color: #666;
text-align: center;
}
.links-list {
list-style: none;
}
.links-list li {
padding: 6px 0;
}
.link-note {
color: #999;
font-size: 14px;
}
.site-footer {
background: #fff;
border-top: 1px solid #e5e7eb;
padding: 20px 0;
margin-top: 24px;
text-align: center;
font-size: 13px;
color: #888;
}
.powered {
margin-top: 4px;
}
/* TOC */
.toc { background: #f8f9fa; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 16px; margin: 0 0 18px; font-size: 14px; }
.toc summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.toc-list { list-style: none; }
.toc-list li { padding: 2px 0; }
.toc-list a { color: #555; }
.toc-list a:hover { color: #2d6cdf; }
.toc-level-2 { padding-left: 0; }
.toc-level-3 { padding-left: 14px; }
.toc-level-4, .toc-level-5, .toc-level-6 { padding-left: 28px; }
.toc {
background: #f8f9fa;
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 12px 16px;
margin: 0 0 18px;
font-size: 14px;
}
.toc summary {
cursor: pointer;
font-weight: 600;
margin-bottom: 6px;
}
.toc-list {
list-style: none;
}
.toc-list li {
padding: 2px 0;
}
.toc-list a {
color: #555;
}
.toc-list a:hover {
color: #2d6cdf;
}
.toc-level-2 {
padding-left: 0;
}
.toc-level-3 {
padding-left: 14px;
}
.toc-level-4,
.toc-level-5,
.toc-level-6 {
padding-left: 28px;
}
/* 屏幕阅读器专用(SEO h1 隐藏) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
}