新增文章库

This commit is contained in:
MasonLiu committed 2026-09-06 15:20:48 +08:00
1 parent 90bd40ffde
commit 4e6d6e5307
12 files changed
+1119 -4

No files matched your search

+163 -1
View File
@@ -200,7 +200,7 @@ a.quick-chip[data-note]:hover::after { opacity: 1; transform: translateX(-50%) t
.board-icon img.icon-img { width: 30px; height: 30px; }
.board-section .section-title { text-align: center; font-size: 22px; margin-bottom: 6px; }
.board-section .section-sub { text-align: center; color: var(--text-3); font-size: 14px; margin-bottom: 18px; }
.boards { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.boards { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.board-card {
position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 12px; background-color: var(--card); background-image: var(--board-tint);
@@ -499,3 +499,165 @@ a.nav-btn[data-note]:hover::after { opacity: 1; transform: translateX(-50%) tran
.nav-block-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
.nav-btn { justify-content: flex-start; padding: 8px 12px; }
}
/* ============ 文章库(第五板块:三栏阅读区) ============ */
.art-app { display: flex; flex-direction: column; height: 100vh; min-height: 0; }
.art-topbar {
display: flex; align-items: center; gap: 8px;
padding: 10px 14px; background: var(--card);
border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.art-topbar-nav { display: flex; gap: 6px; flex: 0 0 auto; min-width: 0; }
.art-topbar-nav .btn { white-space: nowrap; }
.art-topbar-title {
flex: 1 1 auto; text-align: center; font-size: 17px; font-weight: 600;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%;
}
.art-topbar-acts { display: flex; gap: 6px; flex: 0 0 auto; min-width: 0; }
.art-topbar-acts .btn.active {
background: var(--accent-soft); border-color: var(--brand); color: var(--brand);
}
.art-note {
flex: 0 0 auto; padding: 8px 16px; text-align: center;
background: var(--accent-soft); color: var(--text-2); font-size: 13.5px;
border-bottom: 1px solid var(--line);
}
.art-frame {
flex: 1 1 auto; min-height: 0; display: flex;
--w-title: 15%; --w-toc: 15%; position: relative;
}
.art-col {
display: flex; flex-direction: column; min-height: 0;
background: var(--card); min-width: 0;
}
.art-col-title { flex: 0 0 var(--w-title, 15%); border-right: 1px solid var(--line); }
.art-col-toc { flex: 0 0 var(--w-toc, 15%); border-right: 1px solid var(--line); }
.art-col.art-col-hidden { display: none; }
/* 窄屏浮层显示态 */
@media (max-width: 860px) {
.art-col-title, .art-col-toc {
position: absolute; top: 0; bottom: 0; z-index: 40;
width: min(80%, 300px); box-shadow: var(--shadow); display: none;
}
.art-col-title { left: 0; border-right: 1px solid var(--line); }
.art-col-toc { right: 0; border-left: 1px solid var(--line); }
.art-col-title.art-col-show-mobile, .art-col-toc.art-col-show-mobile { display: flex; }
.art-gutter { display: none !important; }
}
.art-col-head {
display: flex; align-items: center; justify-content: space-between; gap: 6px;
padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--text-2);
border-bottom: 1px solid var(--line); background: var(--bg-2); flex: 0 0 auto;
}
.art-mini {
border: none; background: transparent; cursor: pointer; color: var(--text-3);
font-size: 13px; line-height: 1; padding: 3px 6px; border-radius: 5px;
}
.art-mini:hover { background: var(--hover-bg); color: var(--danger); }
.art-nav, .art-toc { overflow-y: auto; flex: 1 1 auto; min-height: 0; padding: 6px 0; }
.art-nav-part { margin: 4px 0; }
.art-nav-part-name {
padding: 5px 12px 3px; font-size: 12px; color: var(--text-3);
position: sticky; top: 0; background: var(--card); font-weight: 600;
}
.art-nav-item {
display: block; padding: 6px 12px 6px 16px; font-size: 13.5px;
color: var(--text-2); border-left: 2px solid transparent;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.art-nav-item:hover { background: var(--hover-bg); color: var(--brand); }
.art-nav-item.active {
background: var(--accent-soft); color: var(--brand); border-left-color: var(--brand);
}
.art-toc-link {
display: block; padding: 5px 14px 5px 20px; font-size: 13px; color: var(--text-2);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative;
}
.art-toc-link:hover { color: var(--brand); background: var(--hover-bg); }
.art-toc-link.lv2 { padding-left: 30px; font-size: 12.5px; }
.art-toc-link.lv3 { padding-left: 42px; font-size: 12px; }
.art-toc-link.lv4 { padding-left: 54px; font-size: 11.5px; }
.art-gutter {
flex: 0 0 7px; cursor: col-resize; background: transparent;
position: relative; z-index: 5;
}
.art-gutter:hover, .art-gutter.dragging { background: var(--brand); opacity: .35; }
.art-body {
flex: 1 1 auto; min-width: 0; min-height: 0; overflow-y: auto;
background: var(--bg);
}
/* 正文排版(Markdown 渲染区) */
.art-article { max-width: 1000px; margin: 0 auto; padding: 26px 34px 60px; }
.art-article-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.art-article-part {
display: inline-block; font-size: 12px; color: var(--brand);
background: var(--accent-soft); border-radius: 6px; padding: 2px 9px; margin-bottom: 8px;
}
.art-article-title { font-size: 26px; margin: 0 0 6px; line-height: 1.35; }
.art-article-sum { color: var(--text-3); font-size: 14px; margin: 0 0 8px; }
.art-article-meta { color: var(--text-3); font-size: 12px; }
.art-md { line-height: 1.75; font-size: 15px; color: var(--text); overflow-wrap: break-word; }
.art-md h1, .art-md h2, .art-md h3, .art-md h4, .art-md h5, .art-md h6 {
margin: 1.3em 0 .5em; line-height: 1.4;
}
.art-md h1 { font-size: 1.6em; border-bottom: 1px solid var(--line); padding-bottom: .25em; }
.art-md h2 { font-size: 1.4em; border-bottom: 1px solid var(--line); padding-bottom: .2em; }
.art-md h3 { font-size: 1.22em; }
.art-md h4 { font-size: 1.1em; }
.art-md p { margin: .6em 0; }
.art-md ul, .art-md ol { padding-left: 1.6em; margin: .5em 0; }
.art-md li { margin: .2em 0; }
.art-md blockquote {
margin: .8em 0; padding: 8px 14px; color: var(--text-2);
border-left: 4px solid var(--brand); background: var(--accent-soft); border-radius: 0 8px 8px 0;
}
.art-md code {
font-family: Consolas, Menlo, Monaco, monospace; font-size: .92em;
background: var(--code-bg); color: var(--code-text); border-radius: 4px; padding: 2px 6px;
}
.art-md pre {
background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;
padding: 14px 16px; overflow-x: auto; line-height: 1.6;
}
.art-md pre code { background: none; padding: 0; color: var(--code-text); }
.art-md img { max-width: 100%; border-radius: 8px; margin: .4em 0; }
.art-md a { text-decoration: underline; text-underline-offset: 2px; }
.art-md table {
border-collapse: collapse; margin: .8em 0; max-width: 100%; display: block; overflow-x: auto;
}
.art-md th, .art-md td { border: 1px solid var(--line-2); padding: 6px 12px; font-size: 14px; }
.art-md th { background: var(--bg-2); }
.art-md hr { border: none; border-top: 1px solid var(--line); margin: 1.6em 0; }
/* 列表视图(先列表后阅读) */
.art-list { max-width: 1000px; margin: 0 auto; padding: 24px 26px 60px; }
.art-list-head h1 { font-size: 24px; margin: 0 0 4px; }
.art-list-head .tip { margin: 0 0 10px; }
.art-part-block { margin-top: 18px; }
.art-part-title {
font-size: 17px; color: var(--text-2); margin: 0 0 10px;
padding-left: 10px; border-left: 4px solid var(--brand);
}
.art-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.art-card {
display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
background: var(--card); border: 1px solid var(--line); border-radius: 12px;
color: var(--text); transition: all .15s ease; min-width: 0;
}
.art-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.art-card-title { font-weight: 600; font-size: 15px; }
.art-card:hover .art-card-title { color: var(--brand); }
.art-card-sum { color: var(--text-3); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-card-date { color: var(--text-3); font-size: 12px; }
@media (max-width: 600px) {
.art-cards { grid-template-columns: 1fr; }
.art-article { padding: 18px 18px 48px; }
.art-list { padding: 16px 14px 48px; }
.art-article-title { font-size: 21px; }
.art-topbar { gap: 5px; padding: 8px 8px; }
.art-topbar .btn { padding: 4px 8px; font-size: 12px; }
.art-topbar-title { font-size: 14px; }
.art-tg-txt { display: none; }
.art-topbar-nav { gap: 4px; }
}