mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
feat: 新增模板 ”BlueArchive“ 蔚蓝档案 (#196)
* feat: 新增渲染模板”BlueArchive“(蔚蓝档案) * 修复图片无法显示
This commit is contained in:
@@ -56,6 +56,10 @@ _✨ 一个基于 AstrBot 的智能群聊分析插件,支持 **QQ (OneBot)**
|
||||
<p><b>ATRI</b></p>
|
||||
<img src="https://fastly.jsdelivr.net/gh/SXP-Simon/astrbot_plugin_qq_group_daily_analysis@main/assets/ATRI-demo.jpg" alt="ATRI" width="100%">
|
||||
</td>
|
||||
<td align="center" width="33.3%" valign="top">
|
||||
<p><b>BlueArchive</b></p>
|
||||
<img src="https://fastly.jsdelivr.net/gh/VanillaNahida/astrbot_plugin_qq_group_daily_analysis@main/assets/BlueArchive-demo.jpg" alt="BlueArchive" width="100%">
|
||||
</td>
|
||||
<td align="center" width="33.3%" valign="top">
|
||||
<p><b>Simple</b></p>
|
||||
<img src="https://fastly.jsdelivr.net/gh/SXP-Simon/astrbot_plugin_qq_group_daily_analysis@main/assets/format-demo.jpg" alt="simple" width="100%">
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
"description": "报告模板",
|
||||
"options": [
|
||||
"ATRI",
|
||||
"BlueArchive",
|
||||
"scrapbook",
|
||||
"retro_futurism",
|
||||
"HatsuneMiku",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.3 MiB |
@@ -0,0 +1,40 @@
|
||||
<div class="chart-section-horizontal">
|
||||
{% for item in chart_data %}
|
||||
{% set bar_percentage = item.percentage | float %}
|
||||
{% if bar_percentage < 0 %}
|
||||
{% set bar_percentage = 0 %}
|
||||
{% elif bar_percentage > 100 %}
|
||||
{% set bar_percentage = 100 %}
|
||||
{% endif %}
|
||||
|
||||
{% set bar_bg = 'var(--ba-blue)' %}
|
||||
{% set bar_height = '4px' %}
|
||||
{% set bar_opacity = '1' %}
|
||||
|
||||
{% if item.count == 0 %}
|
||||
{% set bar_bg = 'var(--ba-text-muted)' %}
|
||||
{% set bar_height = '4px' %}
|
||||
{% set bar_opacity = '0.15' %}
|
||||
{% elif bar_percentage >= 70 %}
|
||||
{% set bar_bg = 'var(--ba-accent-orange)' %}
|
||||
{% set bar_height = bar_percentage ~ '%' %}
|
||||
{% elif bar_percentage >= 30 %}
|
||||
{% set bar_bg = 'var(--ba-accent-green)' %}
|
||||
{% set bar_height = bar_percentage ~ '%' %}
|
||||
{% else %}
|
||||
{% set bar_bg = 'var(--ba-blue)' %}
|
||||
{% set bar_height = bar_percentage ~ '%' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="chart-column">
|
||||
{% if item.count > 0 %}
|
||||
<div class="chart-value-top">{{ item.count }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% set style_str = 'height: ' ~ bar_height ~ '; background: ' ~ bar_bg ~ '; opacity: ' ~ bar_opacity ~ ';' %}
|
||||
<div class="chart-bar-vertical" style="{{ style_str }}"></div>
|
||||
|
||||
<div class="chart-label-xaxis">{{ "%02d" | format(item.hour) }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<div class="quality-item">
|
||||
<div class="quality-header">
|
||||
<div class="theme-title-badge">{{ title }}</div>
|
||||
<div class="time-range">{{ subtitle }}</div>
|
||||
</div>
|
||||
|
||||
<div class="dimension-bar-container">
|
||||
<div class="dimension-bar">
|
||||
{% set colors = ['#3593f3', '#58c3e5', '#7c6ff7', '#f06292', '#ff9800', '#66bb6a', '#ffc107', '#26c6da'] %}
|
||||
{% for dim in dimensions %}
|
||||
{% set safe_percentage = dim.percentage|float %}
|
||||
{% if safe_percentage < 0 %}
|
||||
{% set safe_percentage = 0 %}
|
||||
{% elif safe_percentage > 100 %}
|
||||
{% set safe_percentage = 100 %}
|
||||
{% endif %}
|
||||
{% if safe_percentage > 0 %}
|
||||
<div class="dimension-segment"
|
||||
style="width: {{ safe_percentage }}%; background-color: {{ colors[loop.index0 % colors|length] }};"
|
||||
title="{{ dim.comment }}">
|
||||
<span class="segment-label"
|
||||
style="display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;">
|
||||
{{ dim.name }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimension-comments-grid">
|
||||
{% set colors = ['#3593f3', '#58c3e5', '#7c6ff7', '#f06292', '#ff9800', '#66bb6a', '#ffc107', '#26c6da'] %}
|
||||
{% for dim in dimensions %}
|
||||
{% set safe_percentage = dim.percentage|float %}
|
||||
{% if safe_percentage < 0 %}
|
||||
{% set safe_percentage = 0 %}
|
||||
{% elif safe_percentage > 100 %}
|
||||
{% set safe_percentage = 100 %}
|
||||
{% endif %}
|
||||
{% if safe_percentage > 0 %}
|
||||
<div class="dim-sticker" style="border-color: {{ colors[loop.index0 % colors|length] }};">
|
||||
<div style="margin-bottom: 4px;">
|
||||
<strong class="dim-sticker-title" style="color: {{ colors[loop.index0 % colors|length] }}; border-color: {{ colors[loop.index0 % colors|length] }}; margin-bottom: 2px; display: block;">{{ dim.name }}</strong>
|
||||
<span style="font-size: 0.82rem; font-weight: 700; color: {{ colors[loop.index0 % colors|length] }}; display: block; margin-bottom: 4px;">{{ '%.1f'|format(safe_percentage) }}%</span>
|
||||
</div>
|
||||
<span>{{ dim.comment }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="character-summary-section">
|
||||
<div class="character-container">
|
||||
<img class="character-img"
|
||||
src="https://img.dkdun.cn/v1/2026/17/314653a2aa301144.png"
|
||||
alt="Assistant">
|
||||
</div>
|
||||
<div class="speech-bubble">
|
||||
<div class="summary-text">{{ summary }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,34 @@
|
||||
{% if quotes %}
|
||||
<div class="quotes-section">
|
||||
<div class="section-title" style="justify-content: center;">
|
||||
<div class="section-icon">
|
||||
<svg viewBox="0 0 24 24"><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></svg>
|
||||
</div>
|
||||
群贤毕至 Bible Quotes
|
||||
</div>
|
||||
{% for quote in quotes %}
|
||||
<div class="quote-wrapper avoid-break">
|
||||
<div class="q-flex-container">
|
||||
<div class="q-user-col">
|
||||
{% if quote.avatar_url %}
|
||||
<div class="q-avatar-box">
|
||||
<img src="{{ quote.avatar_url }}" class="q-avatar">
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="q-content-col">
|
||||
<div class="q-sender-name">{{ quote.sender }}</div>
|
||||
<div class="q-bubble">
|
||||
<div class="q-content">{{ quote.content }}</div>
|
||||
</div>
|
||||
<div class="q-analysis-note">
|
||||
<span class="note-label">🤣👉 AI 锐评:</span>
|
||||
{{ quote.reason | safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,20 @@
|
||||
{% if topics %}
|
||||
<div class="topic-section">
|
||||
<div class="section-title">
|
||||
<div class="section-icon">
|
||||
<svg viewBox="0 0 24 24"><path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"/></svg>
|
||||
</div>
|
||||
今日话题 Topics
|
||||
</div>
|
||||
{% for topic in topics %}
|
||||
<div class="topic-item avoid-break">
|
||||
<div class="topic-index">{{ "%02d" | format(topic.index) }}</div>
|
||||
<div class="topic-content">
|
||||
<div class="topic-title">{{ topic.topic.topic }}</div>
|
||||
<div class="topic-contributors">🙋♀️ 参与者: {{ topic.contributors }}</div>
|
||||
<div class="topic-detail">{{ topic.detail | safe }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,40 @@
|
||||
{% if titles %}
|
||||
<div class="user-section">
|
||||
<div class="section-title" style="justify-content: center;">
|
||||
<div class="section-icon">
|
||||
<svg viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
||||
</div>
|
||||
群友画像 Portraits
|
||||
</div>
|
||||
<div class="masonry-grid">
|
||||
{% for title in titles %}
|
||||
<div class="user-card avoid-break" style="position: relative; overflow: hidden;">
|
||||
<div class="user-header">
|
||||
<div class="u-avatar">
|
||||
{% if title.avatar_data %}
|
||||
<img src="{{ title.avatar_data }}" alt="头像" style="width: 100%; height: 100%; object-fit: cover;">
|
||||
{% else %}
|
||||
<svg class="doodle" style="font-size: 2rem;" viewBox="0 0 24 24">
|
||||
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
|
||||
</svg>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="u-info">
|
||||
<div class="u-name">{{ title.name }}</div>
|
||||
<div class="badges">
|
||||
<span class="badge title">{{ title.title }}</span>
|
||||
<span class="badge mbti">{{ title.profile_display or title.mbti }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="u-reason">
|
||||
{{ title.reason }}
|
||||
</div>
|
||||
{% if title.profile_image %}
|
||||
<img src="{{ title.profile_image }}" alt="" style="position: absolute; right: 8px; bottom: 8px; width: 38%; max-height: 80%; object-fit: {{ title.profile_image_size_mode or 'contain' }}; opacity: {{ title.profile_image_opacity or 0.12 }}; pointer-events: none; z-index: 1;">
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user