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,46 @@
|
||||
<!-- 單頁摘要:窄欄、重點框,適合議題摘要與會議結論,印出來剛好一頁 -->
|
||||
<!doctype html>
|
||||
<html lang="zh-Hant" data-layout="{{LAYOUT}}" data-style="{{STYLE_NAME}}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{TITLE}}</title>
|
||||
<style>{{BASE}}</style>
|
||||
<style>{{STYLE}}</style>
|
||||
<style>
|
||||
.shell { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
|
||||
.page-head { padding-top: 2rem; }
|
||||
.content { font-size: .97rem; }
|
||||
.content h2 { font-size: 1.15rem; margin-top: 1.4rem; }
|
||||
.content h3 { font-size: 1rem; }
|
||||
.content ul { padding-left: 1.2rem; }
|
||||
/* 待辦清單獨立成框,一眼看得到還有什麼沒做 */
|
||||
.content li:has(input[type="checkbox"]) { list-style: none; margin-left: -1.2rem; }
|
||||
.content blockquote { font-size: .95rem; }
|
||||
.jsc-section + .jsc-section { border-top: 1px dashed var(--border); padding-top: .75rem; }
|
||||
@media print { body { font-size: 13px; } .page-foot { display: none; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="shell">
|
||||
<header class="page-head">
|
||||
<h1>{{TITLE}}</h1>
|
||||
<p class="subtitle">{{SUBTITLE}}</p>
|
||||
<p class="meta">{{SOURCE}}<span class="generated">產生時間:{{GENERATED}}</span></p>
|
||||
</header>
|
||||
<main class="content" id="content">{{CONTENT}}</main>
|
||||
<footer class="page-foot">
|
||||
<span class="badge">{{LAYOUT}}/{{STYLE_NAME}}</span>
|
||||
<span>本頁由 jsc-gitea:html-export 產生</span>
|
||||
</footer>
|
||||
</div>
|
||||
<script>{{BASE_JS}}</script>
|
||||
<script>
|
||||
(function () {
|
||||
var content = document.getElementById('content');
|
||||
jsc.wrapTables(content);
|
||||
jsc.splitBySection(content);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user