调整总结卡片为上大下小并恢复模板截图宽度780
This commit is contained in:
@@ -23,6 +23,6 @@ summary_image_template_path = "plugins/message_summary/templates/gemini_summary_
|
||||
# 1. 这里可以覆盖 md2image 默认 780 宽;
|
||||
# 2. 模板卡片宽度约 420,截图建议 460~520 区间;
|
||||
# 3. scale 提高后字体与线条会更清晰。
|
||||
template_viewport_width = 500
|
||||
template_viewport_width = 780
|
||||
template_viewport_height = 960
|
||||
template_device_scale_factor = 2.0
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
.report-container {
|
||||
width: 420px;
|
||||
width: 520px;
|
||||
margin: 0 auto;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
|
||||
@@ -26,12 +26,12 @@
|
||||
}
|
||||
|
||||
.label-tiny {
|
||||
font-size: 9px;
|
||||
font-size: 8px;
|
||||
font-weight: 800;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
color: #94a3b8;
|
||||
margin-bottom: 2px;
|
||||
margin-bottom: 1px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -40,67 +40,67 @@
|
||||
.card-inner {
|
||||
border: 1px solid #f1f5f9;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
padding: 6px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.conclusion-area {
|
||||
background-color: #f0fdf4;
|
||||
border-left: 2px solid #22c55e;
|
||||
padding: 8px;
|
||||
padding: 6px;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="py-4">
|
||||
<body class="py-3">
|
||||
<div class="report-container">
|
||||
<header class="p-4 border-b border-slate-100">
|
||||
<header class="p-3 border-b border-slate-100">
|
||||
<div class="flex justify-between items-start mb-3 gap-2">
|
||||
<div>
|
||||
<h1 class="text-[15px] font-black text-slate-900 tracking-tight">CHAT INSIGHTS <span class="text-blue-600 font-medium">REPORT</span></h1>
|
||||
<p class="text-[10px] text-slate-400 font-medium mono uppercase">ID: {{ generated_at }}</p>
|
||||
<h1 class="text-[18px] font-black text-slate-900 tracking-tight">CHAT INSIGHTS <span class="text-blue-600 font-medium">REPORT</span></h1>
|
||||
<p class="text-[9px] text-slate-400 font-medium mono uppercase">ID: {{ generated_at }}</p>
|
||||
</div>
|
||||
<div class="px-2 py-1 bg-slate-100 rounded text-[9px] font-bold text-slate-500 uppercase">{{ summary_metrics.activity_badge or "Daily Archive" }}</div>
|
||||
<div class="px-2 py-1 bg-slate-100 rounded text-[10px] font-bold text-slate-500 uppercase">{{ summary_metrics.activity_badge or "Daily Archive" }}</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-4 gap-2 text-center">
|
||||
{% for card in summary_metrics.kpi_cards|default([]) %}
|
||||
<div class="bg-slate-50 py-2 rounded border border-slate-100">
|
||||
<div class="bg-slate-50 py-2.5 rounded border border-slate-100">
|
||||
<span class="label-tiny">{{ card.label }}</span>
|
||||
<span class="text-xs font-bold {% if card.tone == 'blue' %}text-blue-600{% elif card.tone == 'violet' %}text-indigo-600{% elif card.tone == 'emerald' %}text-emerald-600{% else %}text-slate-700{% endif %}">{{ card.value }}</span>
|
||||
<span class="text-[13px] font-bold {% if card.tone == 'blue' %}text-blue-600{% elif card.tone == 'violet' %}text-indigo-600{% elif card.tone == 'emerald' %}text-emerald-600{% else %}text-slate-700{% endif %}">{{ card.value }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="p-4 border-b border-slate-100">
|
||||
<div class="p-3 border-b border-slate-100">
|
||||
<span class="label-tiny mb-2"># Personal Interest Radar</span>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% for tag in summary_metrics.topic_tags|default([]) %}
|
||||
<span class="text-[10px] px-2 py-0.5 rounded font-bold {% if loop.index0 % 4 == 0 %}bg-blue-50 text-blue-600 border border-blue-100 italic{% elif loop.index0 % 4 == 1 %}bg-indigo-50 text-indigo-600 border border-indigo-100 italic{% elif loop.index0 % 4 == 2 %}bg-emerald-50 text-emerald-600 border border-emerald-100 italic{% else %}bg-slate-100 text-slate-500{% endif %}">{{ tag }}</span>
|
||||
<span class="text-[9px] px-2 py-0.5 rounded font-bold {% if loop.index0 % 4 == 0 %}bg-blue-50 text-blue-600 border border-blue-100 italic{% elif loop.index0 % 4 == 1 %}bg-indigo-50 text-indigo-600 border border-indigo-100 italic{% elif loop.index0 % 4 == 2 %}bg-emerald-50 text-emerald-600 border border-emerald-100 italic{% else %}bg-slate-100 text-slate-500{% endif %}">{{ tag }}</span>
|
||||
{% endfor %}
|
||||
{% if not (summary_metrics.topic_tags|default([])) %}
|
||||
<span class="text-[10px] px-2 py-0.5 bg-slate-100 text-slate-500 rounded">暂无热点标签</span>
|
||||
<span class="text-[9px] px-2 py-0.5 bg-slate-100 text-slate-500 rounded">暂无热点标签</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-4 space-y-4">
|
||||
<div class="p-3 space-y-3">
|
||||
<span class="label-tiny"># {{ summary_doc_title or title }}</span>
|
||||
<div class="conclusion-area">
|
||||
<p class="text-[11px] font-bold text-emerald-800 leading-relaxed">{{ summary_lead or "暂无总结内容。" }}</p>
|
||||
<p class="text-[10px] font-bold text-emerald-800 leading-relaxed">{{ summary_lead or "暂无总结内容。" }}</p>
|
||||
</div>
|
||||
|
||||
<span class="label-tiny"># Key Discussions</span>
|
||||
{% for topic in summary_topics|default([]) %}
|
||||
<div class="space-y-2 card-inner">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-[11px] font-bold text-slate-900">{{ "%02d"|format(loop.index) }}. {{ topic["title"] }}</span>
|
||||
<span class="text-[10px] font-bold text-slate-900">{{ "%02d"|format(loop.index) }}. {{ topic["title"] }}</span>
|
||||
<div class="h-[1px] flex-grow bg-slate-100"></div>
|
||||
</div>
|
||||
|
||||
{% if topic["time_range"] or topic["participants"] %}
|
||||
<div class="text-[10px] text-slate-500 bg-slate-50 border border-slate-100 rounded px-2 py-1 leading-relaxed">
|
||||
<div class="text-[9px] text-slate-500 bg-slate-50 border border-slate-100 rounded px-2 py-1 leading-relaxed">
|
||||
{% if topic["time_range"] %}<div>时段:{{ topic["time_range"] }}</div>{% endif %}
|
||||
{% if topic["participants"] %}<div>参与人数:{{ topic["participants"] }}</div>{% endif %}
|
||||
</div>
|
||||
@@ -109,14 +109,14 @@
|
||||
{% if topic["analysis_points"]|default([]) %}
|
||||
<div>
|
||||
<span class="label-tiny text-slate-400">Background</span>
|
||||
<p class="text-[11px] text-slate-600 leading-relaxed">{{ topic["analysis_points"][0] }}</p>
|
||||
<p class="text-[10px] text-slate-600 leading-relaxed">{{ topic["analysis_points"][0] }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if topic["overview_points"]|default([]) %}
|
||||
<div>
|
||||
<span class="label-tiny text-slate-400">Key Points</span>
|
||||
<ul class="text-[11px] text-slate-600 list-disc pl-3 space-y-0.5">
|
||||
<ul class="text-[10px] text-slate-600 list-disc pl-3 space-y-0.5">
|
||||
{% for line in topic["overview_points"] %}
|
||||
<li>{{ line }}</li>
|
||||
{% endfor %}
|
||||
@@ -127,26 +127,26 @@
|
||||
{% if topic["quote_text"] %}
|
||||
<div class="conclusion-area">
|
||||
<span class="label-tiny !text-emerald-600">Conclusion</span>
|
||||
<p class="text-[11px] font-bold text-emerald-800 italic leading-relaxed">{{ topic["quote_text"] }}</p>
|
||||
<p class="text-[10px] font-bold text-emerald-800 italic leading-relaxed">{{ topic["quote_text"] }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if not (summary_topics|default([])) %}
|
||||
<p class="text-[11px] text-slate-500">{{ summary_fallback_text }}</p>
|
||||
<p class="text-[10px] text-slate-500">{{ summary_fallback_text }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if summary_resource_hub|default([]) %}
|
||||
<div class="p-4 bg-slate-50/60 border-y border-slate-100">
|
||||
<div class="p-3 bg-slate-50/60 border-y border-slate-100">
|
||||
<span class="label-tiny mb-2"># Shared Resources</span>
|
||||
<div class="space-y-1">
|
||||
{% for item in summary_resource_hub %}
|
||||
<div class="card-inner flex justify-between items-center py-1.5">
|
||||
<div class="flex items-center gap-2 overflow-hidden">
|
||||
<i class="text-slate-300 text-[12px]">{{ item.icon }}</i>
|
||||
<span class="text-[10px] font-medium text-slate-600 truncate">{{ item.title }}</span>
|
||||
<span class="text-[9px] font-medium text-slate-600 truncate">{{ item.title }}</span>
|
||||
</div>
|
||||
<i class="fas fa-chevron-right text-[8px] text-slate-300"></i>
|
||||
</div>
|
||||
@@ -155,10 +155,10 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="p-4 grid grid-cols-2 gap-3">
|
||||
<div class="p-3 grid grid-cols-2 gap-2">
|
||||
<div>
|
||||
<span class="label-tiny mb-2"># Marketplace</span>
|
||||
<div class="space-y-1 text-[10px]">
|
||||
<div class="space-y-1 text-[9px]">
|
||||
{% for line in summary_marketplace|default([]) %}
|
||||
<p class="text-rose-500 font-bold leading-tight border-b border-slate-100 pb-1">{{ line }}</p>
|
||||
{% endfor %}
|
||||
@@ -169,7 +169,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<span class="label-tiny mb-2"># Unresolved Pool</span>
|
||||
<div class="space-y-1 text-[10px]">
|
||||
<div class="space-y-1 text-[9px]">
|
||||
{% for line in summary_unresolved_pool|default([]) %}
|
||||
<p class="text-slate-500 leading-tight border-l-2 border-amber-200 pl-2">{{ line }}</p>
|
||||
{% endfor %}
|
||||
@@ -180,19 +180,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="px-4 pb-4">
|
||||
<div class="px-3 pb-3">
|
||||
<div class="card-inner bg-slate-900 text-white border-none p-3">
|
||||
<span class="label-tiny text-slate-500 mb-1"># Core Knowledge Points</span>
|
||||
{% for line in summary_core_points|default([]) %}
|
||||
<p class="text-[10px] leading-relaxed text-slate-300 mb-1 last:mb-0">{{ line }}</p>
|
||||
<p class="text-[9px] leading-relaxed text-slate-300 mb-1 last:mb-0">{{ line }}</p>
|
||||
{% endfor %}
|
||||
{% if not (summary_core_points|default([])) %}
|
||||
<p class="text-[10px] leading-relaxed text-slate-400">暂无核心知识点</p>
|
||||
<p class="text-[9px] leading-relaxed text-slate-400">暂无核心知识点</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="p-4 bg-slate-50 border-t border-slate-100 flex justify-between items-center">
|
||||
<footer class="p-3 bg-slate-50 border-t border-slate-100 flex justify-between items-center">
|
||||
<span class="label-tiny">Top Contributors</span>
|
||||
<div class="flex -space-x-2">
|
||||
{% for name in summary_top_contributors|default([]) %}
|
||||
@@ -207,7 +207,7 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-3 text-[9px] text-slate-400 uppercase tracking-wide">
|
||||
<div class="text-center mt-2 text-[8px] text-slate-400 uppercase tracking-wide">
|
||||
Engine: Playwright · Tokens: {{ summary_metrics.token_total }} · Latency: {{ summary_metrics.latency_text }}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user