- 文章列表:会员插件注入「付费」徽章列(会员/付费¥xx,停插件即消失) - 分类:真实文章数(withCount)、名称点击跳文章列表并按分类筛选(ListPosts booted 预置筛选) - 分类:新增封面(medialibrary)+ 介绍(description 字段/表单);前台分类页顶部展示介绍区;SEO description + BreadcrumbList 结构化数据(GEO) - 文章编辑:MarkdownEditor 内容区加大(26rem);文章编辑页新增「评论」关系管理页(可审/拒) - 评论列表:文章列带摘要 - 三套主题补 .category-intro 样式 - 测试更新(付费徽章列)
176 lines
8.8 KiB
CSS
176 lines
8.8 KiB
CSS
/* ============ Sablog 经典主题 ============ */
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
background: #eef2f5 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==) repeat-x top;
|
|
font-family: Verdana, "PingFang SC", "Microsoft YaHei", sans-serif;
|
|
font-size: 13px;
|
|
color: #333;
|
|
line-height: 1.7;
|
|
}
|
|
|
|
a { color: #1c62b0; text-decoration: none; }
|
|
a:hover { color: #f60; text-decoration: underline; }
|
|
|
|
#outmain { width: 960px; margin: 0 auto; }
|
|
|
|
#header { padding: 22px 10px 8px; }
|
|
.logo a { font-size: 30px; font-weight: bold; color: #1c62b0; font-family: Georgia, serif; }
|
|
.logo .description { color: #888; font-size: 12px; }
|
|
|
|
#nav { margin-top: 14px; border-top: 1px solid #d8dfe6; border-bottom: 1px solid #d8dfe6; background: #f7f9fb; }
|
|
#nav ul { list-style: none; display: flex; flex-wrap: wrap; }
|
|
#nav li { border-right: 1px solid #d8dfe6; }
|
|
#nav a { display: block; padding: 7px 18px; color: #333; font-weight: bold; font-size: 13px; }
|
|
#nav a:hover { background: #1c62b0; color: #fff; text-decoration: none; }
|
|
#nav .current_page_item a { background: #1c62b0; color: #fff; }
|
|
|
|
#page { padding: 14px 10px; display: flex; gap: 18px; align-items: flex-start; }
|
|
|
|
#content { flex: 1; min-width: 0; }
|
|
|
|
.post-card, .post-full, .comments-section, .auth-box, .profile-box, .links-list {
|
|
background: #fff;
|
|
border: 1px solid #d8dfe6;
|
|
padding: 18px 20px;
|
|
margin-bottom: 16px;
|
|
}
|
|
.post-card.sticky { border-left: 4px solid #f60; }
|
|
.post-title { font-size: 17px; margin-bottom: 6px; line-height: 1.4; }
|
|
.post-card .post-title a { color: #1c62b0; }
|
|
.badge { background: #f60; color: #fff; font-size: 11px; padding: 1px 5px; margin-right: 5px; }
|
|
.post-meta { color: #999; font-size: 12px; margin-bottom: 8px; }
|
|
.post-excerpt { color: #555; margin-bottom: 8px; }
|
|
.post-footer { font-size: 12px; }
|
|
.tag-link { color: #1c62b0; margin-right: 8px; }
|
|
|
|
.post-full .post-title { font-size: 22px; color: #1c62b0; }
|
|
.post-content { margin-top: 10px; font-size: 14px; }
|
|
.post-content img { max-width: 100%; }
|
|
.post-content pre { background: #f4f4f4; border: 1px solid #ddd; padding: 10px; overflow: auto; margin: 10px 0; }
|
|
.post-content blockquote { border-left: 4px solid #1c62b0; padding-left: 12px; color: #666; margin: 10px 0; }
|
|
.post-content h1, .post-content h2, .post-content h3 { margin: 14px 0 6px; }
|
|
|
|
.post-cover { margin: -18px -20px 12px; }
|
|
.post-cover img { width: 100%; display: block; max-height: 320px; object-fit: cover; }
|
|
|
|
.comment { padding: 10px 0; border-bottom: 1px dashed #ddd; }
|
|
.comment-head { font-size: 12px; margin-bottom: 3px; }
|
|
.comment-time { color: #999; }
|
|
.comment-body { font-size: 13px; }
|
|
.comment-form { margin-top: 12px; }
|
|
.form-row { margin-bottom: 8px; }
|
|
.form-row label { display: block; font-size: 12px; margin-bottom: 3px; }
|
|
.form-row input, .form-row textarea { width: 100%; padding: 6px 8px; border: 1px solid #ccc; font-size: 13px; font-family: inherit; }
|
|
.honeypot { position: absolute; left: -9999px; opacity: 0; }
|
|
.btn { background: #1c62b0; color: #fff; border: none; padding: 7px 18px; font-size: 13px; cursor: pointer; }
|
|
.btn:hover { background: #f60; }
|
|
.error { color: #c00; font-size: 12px; }
|
|
.alert { padding: 8px 12px; margin-bottom: 12px; border: 1px solid; }
|
|
.alert-success { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
|
|
.alert-error { background: #fdecea; border-color: #f5c6cb; color: #c62828; }
|
|
.empty { color: #999; text-align: center; padding: 20px 0; }
|
|
.list-title { font-size: 18px; margin-bottom: 12px; color: #1c62b0; }
|
|
|
|
/* Sidebar */
|
|
.sidebar { width: 280px; flex-shrink: 0; }
|
|
.sidebar .searchbox { background: #fff; border: 1px solid #d8dfe6; padding: 10px; margin-bottom: 14px; }
|
|
.sidebar .searchbox input[type=search] { width: 180px; padding: 4px; border: 1px solid #ccc; }
|
|
.sidebar .widget { background: #fff; border: 1px solid #d8dfe6; margin-bottom: 14px; }
|
|
.sidebar .widget h3 { background: #f7f9fb; border-bottom: 1px solid #d8dfe6; font-size: 13px; padding: 7px 12px; color: #1c62b0; }
|
|
.sidebar .widget ul { list-style: none; padding: 6px 12px; }
|
|
.sidebar .widget li { padding: 3px 0; font-size: 12px; border-bottom: 1px dotted #eee; }
|
|
.sidebar .tagcloud { padding: 8px 12px; }
|
|
.sidebar .tagcloud a { color: #1c62b0; margin-right: 6px; }
|
|
|
|
/* 兜底页面(归档/标签云/友链/评论/登录等使用默认布局) */
|
|
.container.main-layout { max-width: 960px; margin: 0 auto; }
|
|
.main-layout { display: flex; gap: 18px; align-items: flex-start; padding: 14px 10px; }
|
|
.main-layout .content { flex: 1; min-width: 0; }
|
|
.main-layout .sidebar { width: 280px; }
|
|
|
|
.pagination-links { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
|
|
.pagination-links a, .pagination-links .current, .pagination-links .disabled { padding: 4px 10px; border: 1px solid #d8dfe6; background: #fff; font-size: 12px; }
|
|
.pagination-links .current { background: #1c62b0; color: #fff; }
|
|
|
|
#footer { clear: both; text-align: center; padding: 14px 0 24px; color: #888; font-size: 12px; }
|
|
#footer a { color: #1c62b0; }
|
|
|
|
.archive-year { font-size: 15px; margin: 12px 0 4px; color: #1c62b0; }
|
|
.archive-list { list-style: none; }
|
|
.archive-posts { margin: 4px 0 10px 20px; }
|
|
|
|
.links-list { list-style: none; }
|
|
.links-list li { padding: 5px 0; }
|
|
.link-note { color: #999; }
|
|
|
|
.tag-cloud.big { line-height: 2.4; }
|
|
|
|
.auth-layout { display: flex; justify-content: center; padding: 30px 10px; }
|
|
.auth-box { width: 100%; max-width: 420px; }
|
|
.auth-alt { margin-top: 12px; font-size: 12px; }
|
|
.search-form { margin-bottom: 12px; }
|
|
.search-form input { padding: 5px; border: 1px solid #ccc; width: 220px; }
|
|
|
|
.inline-form { display: inline; }
|
|
.link-btn { background: none; border: none; color: #1c62b0; cursor: pointer; font-size: 13px; padding: 0; font-weight: bold; }
|
|
|
|
/* ============ 移动端适配 ============ */
|
|
@media (max-width: 768px) {
|
|
#outmain { width: 100%; }
|
|
#header { padding: 14px 10px; }
|
|
.logo a { font-size: 24px; }
|
|
#nav ul { flex-wrap: wrap; }
|
|
#nav a { padding: 8px 12px; font-size: 13px; }
|
|
#page { flex-direction: column; }
|
|
#content { width: 100%; }
|
|
.sidebar { width: 100%; }
|
|
.main-layout { flex-direction: column; }
|
|
.main-layout .content { width: 100%; }
|
|
.main-layout .sidebar { width: 100%; }
|
|
.sidebar .searchbox input[type=search] { width: 70%; }
|
|
.post-card, .post-full, .comments-section { padding: 14px 16px; }
|
|
.post-cover { margin: -14px -16px 12px; }
|
|
.post-full .post-title { font-size: 22px; }
|
|
.archive-posts { margin-left: 10px; }
|
|
}
|
|
|
|
/* TOC */
|
|
.toc { background: #f7f9fb; border: 1px solid #d8dfe6; padding: 10px 14px; margin: 0 0 14px; font-size: 13px; }
|
|
.toc summary { cursor: pointer; font-weight: bold; margin-bottom: 4px; }
|
|
.toc-list { list-style: none; }
|
|
.toc-list li { padding: 2px 0; }
|
|
.toc-level-3 { padding-left: 14px; }
|
|
.toc-level-4, .toc-level-5, .toc-level-6 { padding-left: 28px; }
|
|
|
|
.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; }
|
|
|
|
/* Paywall */
|
|
.paywall { border: 1px solid #e0e0e0; border-radius: 8px; padding: 24px 20px; background: #fafafa; text-align: center; }
|
|
.paywall-cover img { max-width: 100%; border-radius: 6px; margin-bottom: 14px; }
|
|
.paywall-title { font-size: 20px; margin: 0 0 10px; }
|
|
.paywall-excerpt { color: #666; font-size: 14px; margin: 0 0 14px; }
|
|
.paywall-price { font-size: 22px; font-weight: 800; color: #f60; margin: 0 0 8px; }
|
|
.paywall-hint { color: #888; font-size: 13px; margin: 0 0 16px; }
|
|
.paywall-actions .btn { margin: 0 6px; }
|
|
.paid-teaser { border: 1px dashed #f5c6cb; background: #fdecea; color: #c62828; border-radius: 6px; padding: 12px 14px; margin: 12px 0; font-size: 14px; }
|
|
.paid-teaser .btn { margin-left: 8px; }
|
|
|
|
/* 阅读全文链接 */
|
|
.read-more { display: inline-block; margin-top: 8px; font-size: 13px; color: #1c62b0; }
|
|
.read-more:hover { color: #f60; }
|
|
|
|
/* 社交账号:横向胶囊列表 */
|
|
.social-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
|
|
.social-links li { font-size: 12px; background: #f7f9fb; border: 1px solid #d8dfe6; border-radius: 999px; padding: 3px 10px; }
|
|
|
|
/* 已解锁的付费内容块 */
|
|
.paid-content { border: 1px dashed #f5c6cb; border-left: 4px solid #f60; background: #fff8f0; border-radius: 6px; padding: 12px 14px; margin: 12px 0; }
|
|
.paid-content-label { font-size: 12px; color: #f60; font-weight: 700; margin-bottom: 6px; }
|
|
|
|
/* 分类页介绍区 */
|
|
.category-intro { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
|
|
.category-cover { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
|
|
.category-description { margin: 0 0 6px; font-size: 14px; color: #555; line-height: 1.7; }
|
|
.category-meta { margin: 0; font-size: 12px; color: #999; }
|