按5话题结构重排总结渲染并优化模板适配
- 新增话题卡片聚合逻辑:从结构化分节中提取并合并为最多5个话题\n- 在渲染阶段识别并归并时段/参与人数/核心观点/客观分析/亮点瞬间,避免详情平铺\n- 新增辅助区块抽取(交易/资源/荣誉榜等),以独立模块展示减少正文拥挤\n- 调整Gemini模板为固定5话题卡片布局,控制单话题条目上限,降低超长截图风险\n- 修正统计展示口径兜底:限制Text和Active不超过Msgs,避免出现反直觉指标\n- 保留旧字段兼容,确保非Gemini模板仍可回退渲染
This commit is contained in:
@@ -146,30 +146,48 @@
|
||||
line-height: 1.78;
|
||||
color: #166534;
|
||||
}
|
||||
.sections {
|
||||
.topics {
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
.section-card {
|
||||
.topic-card {
|
||||
border: 1px solid #e5eaf1;
|
||||
background: #ffffff;
|
||||
border-radius: 8px;
|
||||
padding: 10px 11px;
|
||||
}
|
||||
.section-title {
|
||||
.topic-title {
|
||||
margin: 0 0 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
color: var(--title);
|
||||
letter-spacing: -.01em;
|
||||
}
|
||||
.section-items {
|
||||
.topic-meta {
|
||||
margin: 0 0 8px;
|
||||
padding: 8px 9px;
|
||||
border-radius: 6px;
|
||||
background: #f8fafc;
|
||||
border: 1px dashed #dbe4f2;
|
||||
font-size: 11px;
|
||||
line-height: 1.65;
|
||||
color: #5b6b84;
|
||||
}
|
||||
.topic-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.topic-subtitle {
|
||||
margin: 0;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .08em;
|
||||
color: #94a3b8;
|
||||
font-weight: 800;
|
||||
}
|
||||
.item-paragraph {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
@@ -256,6 +274,30 @@
|
||||
gap: 10px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.aux-sections {
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
.aux-card {
|
||||
border: 1px solid #e8edf5;
|
||||
border-radius: 7px;
|
||||
padding: 9px 10px;
|
||||
background: #fff;
|
||||
}
|
||||
.aux-title {
|
||||
margin: 0 0 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
color: #334155;
|
||||
}
|
||||
.aux-item {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.68;
|
||||
color: #475569;
|
||||
}
|
||||
.mini-card {
|
||||
border: 1px solid #e5eaf1;
|
||||
border-radius: 8px;
|
||||
@@ -357,29 +399,54 @@
|
||||
<div class="lead-callout">
|
||||
{{ summary_lead or "暂无总结内容。" }}
|
||||
</div>
|
||||
<div class="sections">
|
||||
{% for section in summary_sections %}
|
||||
<article class="section-card">
|
||||
<h3 class="section-title">{{ section["title"] }}</h3>
|
||||
<div class="section-items">
|
||||
{% for item in section["items"] %}
|
||||
{% if item["kind"] == "bullet" %}
|
||||
<p class="item-bullet">{{ item["text"] }}</p>
|
||||
{% elif item["kind"] == "quote" %}
|
||||
<blockquote class="item-quote">{{ item["text"] }}</blockquote>
|
||||
{% elif item["kind"] == "code" %}
|
||||
<pre class="item-code">{{ item["text"] }}</pre>
|
||||
{% else %}
|
||||
<p class="item-paragraph">{{ item["text"] }}</p>
|
||||
{% endif %}
|
||||
<div class="topics">
|
||||
{% for topic in summary_topics %}
|
||||
<article class="topic-card">
|
||||
<h3 class="topic-title">{{ loop.index }}. {{ topic["title"] }}</h3>
|
||||
<div class="topic-meta">
|
||||
{% if topic["time_range"] %}<div>🕒 {{ topic["time_range"] }}</div>{% endif %}
|
||||
{% if topic["participants"] %}<div>👥 {{ topic["participants"] }}</div>{% endif %}
|
||||
</div>
|
||||
{% if topic["overview_points"] %}
|
||||
<div class="topic-block">
|
||||
<p class="topic-subtitle">核心观点</p>
|
||||
{% for line in topic["overview_points"] %}
|
||||
<p class="item-bullet">{{ line }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if topic["analysis_points"] %}
|
||||
<div class="topic-block">
|
||||
<p class="topic-subtitle">客观分析</p>
|
||||
{% for line in topic["analysis_points"] %}
|
||||
<p class="item-paragraph">{{ line }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if topic["quote_text"] %}
|
||||
<div class="topic-block">
|
||||
<p class="topic-subtitle">亮点瞬间</p>
|
||||
<blockquote class="item-quote">{{ topic["quote_text"] }}</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if not summary_sections %}
|
||||
{% if not summary_topics %}
|
||||
<div class="fallback-text">{{ summary_fallback_text }}</div>
|
||||
{% endif %}
|
||||
{% if summary_aux_sections %}
|
||||
<div class="aux-sections">
|
||||
{% for block in summary_aux_sections %}
|
||||
<article class="aux-card">
|
||||
<h4 class="aux-title">{{ block["title"] }}</h4>
|
||||
{% for line in block["items"] %}
|
||||
<p class="aux-item">• {{ line }}</p>
|
||||
{% endfor %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="summary-grid">
|
||||
<div class="mini-card">
|
||||
<h4 class="mini-title"># Deep Stats</h4>
|
||||
|
||||
Reference in New Issue
Block a user