feat(gitea): 新增 HTML 匯出與範本風格設定
What:新增 html-export 與 html-style 兩支技能、tools/html-render.sh 與 tools/html-style.sh 兩支工具,以及六種版型乘五種風格的 HTML 範本。 Why:wiki 頁與議題要拿給 Gitea 以外的人看時,只能複製 markdown;不同類型的文件也該有各自的版面,不是每份都長一樣。 How:版型(report、slide、dashboard、spec、timeline、onepager)決定內容怎麼排,風格(minimal、corporate、dark、print、vivid)決定看起來長怎樣,兩者自由搭配。哪一種頁面套哪一組由設定決定:專案的 .jsc/html-styles 優先,其次 $JSC_HOME/html-styles.conf,對不到退 DEFAULT,再對不到才用內建的 report/minimal。產出是單一 HTML 檔,CSS 與腳本全部內嵌。 Who:需要把 wiki 頁或議題寄給客戶、主管或跨團隊同事的人。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/* 商務:深藍主色、表頭反白、正式對外用 */
|
||||
:root {
|
||||
--bg: #ffffff;
|
||||
--fg: #22272e;
|
||||
--head-fg: #0b3358;
|
||||
--muted: #5c6b7a;
|
||||
--accent: #0b5fa5;
|
||||
--border: #c9d6e2;
|
||||
--card: #eef4fa;
|
||||
--code-bg: #eef2f6;
|
||||
--table-head-bg: #0b3358;
|
||||
--stripe: #f4f8fc;
|
||||
--radius: 6px;
|
||||
--shadow: 0 1px 2px rgba(11, 51, 88, .12);
|
||||
--font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
|
||||
--font-head: var(--font);
|
||||
--font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
|
||||
}
|
||||
|
||||
.page-head { border-bottom-width: 3px; }
|
||||
.content th { color: #ffffff; letter-spacing: .03em; }
|
||||
.content h2 { border-left: 5px solid var(--accent); padding-left: .6rem; }
|
||||
.content table { box-shadow: var(--shadow); }
|
||||
@@ -0,0 +1,21 @@
|
||||
/* 深色:深底亮字,長時間閱讀與投影機環境 */
|
||||
:root {
|
||||
--bg: #11161c;
|
||||
--fg: #d7dee6;
|
||||
--head-fg: #f2f6fa;
|
||||
--muted: #8b98a6;
|
||||
--accent: #56a8f5;
|
||||
--border: #2b3540;
|
||||
--card: #1a2129;
|
||||
--code-bg: #1c242d;
|
||||
--table-head-bg: #1f2932;
|
||||
--stripe: #161d24;
|
||||
--radius: 6px;
|
||||
--shadow: 0 1px 3px rgba(0, 0, 0, .5);
|
||||
--font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
|
||||
--font-head: var(--font);
|
||||
--font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
|
||||
}
|
||||
|
||||
.content pre { border-color: #2b3540; }
|
||||
.content h2 { border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
|
||||
@@ -0,0 +1,21 @@
|
||||
/* 極簡:白底、細線、無襯線,資訊密度優先 */
|
||||
:root {
|
||||
--bg: #ffffff;
|
||||
--fg: #1f2328;
|
||||
--head-fg: #0d1117;
|
||||
--muted: #6a737d;
|
||||
--accent: #2f6f9f;
|
||||
--border: #d8dee4;
|
||||
--card: #f6f8fa;
|
||||
--code-bg: #f2f4f7;
|
||||
--table-head-bg: #f6f8fa;
|
||||
--stripe: #fbfcfd;
|
||||
--radius: 4px;
|
||||
--shadow: none;
|
||||
--font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
|
||||
--font-head: var(--font);
|
||||
--font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
|
||||
}
|
||||
|
||||
.page-head { border-bottom-width: 1px; }
|
||||
.content h2 { border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
|
||||
@@ -0,0 +1,30 @@
|
||||
/* 印刷:襯線字、A4 邊界、去掉陰影,列印或轉 PDF 用 */
|
||||
:root {
|
||||
--bg: #ffffff;
|
||||
--fg: #1b1b1b;
|
||||
--head-fg: #000000;
|
||||
--muted: #55555f;
|
||||
--accent: #4a4a4a;
|
||||
--border: #b8b8b8;
|
||||
--card: #f4f4f2;
|
||||
--code-bg: #f2f2f0;
|
||||
--table-head-bg: #ececeb;
|
||||
--stripe: #f9f9f8;
|
||||
--radius: 0;
|
||||
--shadow: none;
|
||||
--font: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
|
||||
--font-head: var(--font);
|
||||
--font-mono: "JetBrains Mono", Consolas, monospace;
|
||||
}
|
||||
|
||||
@page { size: A4; margin: 20mm 18mm; }
|
||||
|
||||
body { font-size: 15px; line-height: 1.85; }
|
||||
.page-head { border-bottom: 1px solid var(--border); }
|
||||
.content h2 { page-break-after: avoid; }
|
||||
.content table, .content pre, .content blockquote { page-break-inside: avoid; }
|
||||
|
||||
@media print {
|
||||
.meta a.source { color: var(--fg); }
|
||||
.page-foot { border-top: 1px solid var(--border); }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/* 明亮:高彩度、圓角卡片、漸層標題,簡報與對內宣達用 */
|
||||
:root {
|
||||
--bg: #fdfbff;
|
||||
--fg: #241f2e;
|
||||
--head-fg: #4c1d95;
|
||||
--muted: #6d6480;
|
||||
--accent: #7c3aed;
|
||||
--border: #e2d9f5;
|
||||
--card: #f6f1ff;
|
||||
--code-bg: #f1ecfd;
|
||||
--table-head-bg: #ede4ff;
|
||||
--stripe: #faf7ff;
|
||||
--radius: 12px;
|
||||
--shadow: 0 2px 10px rgba(124, 58, 237, .12);
|
||||
--font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
|
||||
--font-head: var(--font);
|
||||
--font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
border-bottom: 0;
|
||||
background: linear-gradient(135deg, #7c3aed 0%, #e0378f 100%);
|
||||
color: #ffffff;
|
||||
border-radius: var(--radius);
|
||||
padding: 2rem 1.5rem;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.page-head h1, .page-head .subtitle, .page-head .meta { color: #ffffff; }
|
||||
.page-head .meta a.source { color: #ffffff; text-decoration: underline; }
|
||||
|
||||
.content h2 { border-left: 6px solid var(--accent); padding-left: .6rem; }
|
||||
.content table { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
|
||||
.content blockquote { border-radius: var(--radius); }
|
||||
Reference in New Issue
Block a user