fix: 调整排版

- feat(template): scrapbook footer 使用更全面的 token 描述
- chore(template): 仓库名称
This commit is contained in:
SXP-Simon
2026-01-13 15:22:01 +08:00
parent 3e62f5d879
commit 3f1e406670
7 changed files with 116 additions and 34 deletions
+2 -2
View File
@@ -135,7 +135,7 @@ async def debug_render(
reason="总能精准接住每一个冷笑话,让群里充满快活的气息。", reason="总能精准接住每一个冷笑话,让群里充满快活的气息。",
), ),
UserTitle( UserTitle(
name="王五", name="https://www.example.com/very/long/url/that/might/overflow/the/container/if/word/break/is/not/set/correctly/and/it/keeps/going/and/going/forever",
qq=112233445, qq=112233445,
title="深夜潜水员", title="深夜潜水员",
mbti="INFP", mbti="INFP",
@@ -178,7 +178,7 @@ async def debug_render(
def main() -> None: def main() -> None:
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="Debug render tool for astrbot-qq-group-daily-analysis report templates." description="Debug render tool for astrbot_plugin_qq_group_daily_analysis report templates."
) )
parser.add_argument( parser.add_argument(
"-t", "-t",
@@ -523,7 +523,7 @@
{{quotes_html}} {{quotes_html}}
</div> </div>
<div class="footer"> <div class="footer">
由 AstrBot QQ群日常分析插件 生成 | {{current_datetime}} | SXP-Simon/astrbot-qq-group-daily-analysis<br> 由 AstrBot QQ群日常分析插件 生成 | {{current_datetime}} | SXP-Simon/astrbot_plugin_qq_group_daily_analysis<br>
<small style="opacity: 0.8; font-size: 0.9em; margin-top: 8px; display: block;">AI分析消耗:{{total_tokens}} <small style="opacity: 0.8; font-size: 0.9em; margin-top: 8px; display: block;">AI分析消耗:{{total_tokens}}
tokens (输入: {{prompt_tokens}}, 输出: {{completion_tokens}})</small> tokens (输入: {{prompt_tokens}}, 输出: {{completion_tokens}})</small>
</div> </div>
@@ -523,7 +523,7 @@
{{quotes_html}} {{quotes_html}}
</div> </div>
<div class="footer"> <div class="footer">
由 AstrBot QQ群日常分析插件 生成 | {{current_datetime}} | SXP-Simon/astrbot-qq-group-daily-analysis<br> 由 AstrBot QQ群日常分析插件 生成 | {{current_datetime}} | SXP-Simon/astrbot_plugin_qq_group_daily_analysis<br>
<small style="opacity: 0.8; font-size: 0.9em; margin-top: 8px; display: block;">AI分析消耗:{{total_tokens}} <small style="opacity: 0.8; font-size: 0.9em; margin-top: 8px; display: block;">AI分析消耗:{{total_tokens}}
tokens (输入: {{prompt_tokens}}, 输出: {{completion_tokens}})</small> tokens (输入: {{prompt_tokens}}, 输出: {{completion_tokens}})</small>
</div> </div>
@@ -92,9 +92,17 @@
height: 5px; height: 5px;
} }
.cb-1 { background: var(--c-dec-1); } .cb-1 {
.cb-2 { background: var(--c-dec-2); } background: var(--c-dec-1);
.cb-3 { background: var(--c-dec-3); } }
.cb-2 {
background: var(--c-dec-2);
}
.cb-3 {
background: var(--c-dec-3);
}
/* Header */ /* Header */
header { header {
@@ -214,9 +222,17 @@
flex-shrink: 0; flex-shrink: 0;
} }
.crt-btn-1 { background: var(--c-dec-1); } .crt-btn-1 {
.crt-btn-2 { background: var(--c-dec-2); } background: var(--c-dec-1);
.crt-btn-3 { background: var(--c-dec-3); } }
.crt-btn-2 {
background: var(--c-dec-2);
}
.crt-btn-3 {
background: var(--c-dec-3);
}
.crt-title { .crt-title {
margin-left: 12px; margin-left: 12px;
@@ -771,17 +787,20 @@
<div class="header-icons"> <div class="header-icons">
<div class="header-icon"> <div class="header-icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/> <path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" />
</svg> </svg>
</div> </div>
<div class="header-icon"> <div class="header-icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/> <path
d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z" />
</svg> </svg>
</div> </div>
<div class="header-icon"> <div class="header-icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/> <path
d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" />
</svg> </svg>
</div> </div>
</div> </div>
@@ -888,10 +907,10 @@
<span>Prompt // {{prompt_tokens}}</span> <span>Prompt // {{prompt_tokens}}</span>
<span>Completion // {{completion_tokens}}</span> <span>Completion // {{completion_tokens}}</span>
</div> </div>
<div class="footer-author">SXP-Simon / astrbot-qq-group-daily-analysis</div> <div class="footer-author">SXP-Simon / astrbot_plugin_qq_group_daily_analysis</div>
<div>END_OF_LINE_</div> <div>END_OF_LINE_</div>
</footer> </footer>
</div> </div>
</body> </body>
</html> </html>
@@ -92,9 +92,17 @@
height: 5px; height: 5px;
} }
.cb-1 { background: var(--c-dec-1); } .cb-1 {
.cb-2 { background: var(--c-dec-2); } background: var(--c-dec-1);
.cb-3 { background: var(--c-dec-3); } }
.cb-2 {
background: var(--c-dec-2);
}
.cb-3 {
background: var(--c-dec-3);
}
/* Header */ /* Header */
header { header {
@@ -214,9 +222,17 @@
flex-shrink: 0; flex-shrink: 0;
} }
.crt-btn-1 { background: var(--c-dec-1); } .crt-btn-1 {
.crt-btn-2 { background: var(--c-dec-2); } background: var(--c-dec-1);
.crt-btn-3 { background: var(--c-dec-3); } }
.crt-btn-2 {
background: var(--c-dec-2);
}
.crt-btn-3 {
background: var(--c-dec-3);
}
.crt-title { .crt-title {
margin-left: 12px; margin-left: 12px;
@@ -739,17 +755,20 @@
<div class="header-icons"> <div class="header-icons">
<div class="header-icon"> <div class="header-icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/> <path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" />
</svg> </svg>
</div> </div>
<div class="header-icon"> <div class="header-icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/> <path
d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z" />
</svg> </svg>
</div> </div>
<div class="header-icon"> <div class="header-icon">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/> <path
d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" />
</svg> </svg>
</div> </div>
</div> </div>
@@ -856,10 +875,10 @@
<span>Prompt // {{prompt_tokens}}</span> <span>Prompt // {{prompt_tokens}}</span>
<span>Completion // {{completion_tokens}}</span> <span>Completion // {{completion_tokens}}</span>
</div> </div>
<div class="footer-author">SXP-Simon / astrbot-qq-group-daily-analysis</div> <div class="footer-author">SXP-Simon / astrbot_plugin_qq_group_daily_analysis</div>
<div>END_OF_LINE_</div> <div>END_OF_LINE_</div>
</footer> </footer>
</div> </div>
</body> </body>
</html> </html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long