feat: 侧边栏分组图标与导航样式优化
- 分组支持 icon 字段,可按名称自动匹配或手动选择 - 左侧导航与总览卡片显示彩色 SVG 图标 - 优化侧栏链接圆角与选中态样式 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+13
-4
@@ -1,4 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% from "macros/group_icon.html" import render as group_icon %}
|
||||
{% block title %}导航 · 本地导航{% endblock %}
|
||||
{% block body %}
|
||||
<div class="app-shell">
|
||||
@@ -35,7 +36,11 @@
|
||||
</div>
|
||||
{% for group, services in grouped %}
|
||||
<div class="sidebar-section">
|
||||
<h2>{{ group.name }}</h2>
|
||||
<h2 class="sidebar-group-title">
|
||||
{{ group_icon(group.resolve_icon_key()) }}
|
||||
<span class="sidebar-group-name">{{ group.name }}</span>
|
||||
</h2>
|
||||
<div class="sidebar-links">
|
||||
{% for svc in services %}
|
||||
<a
|
||||
href="#"
|
||||
@@ -48,11 +53,12 @@
|
||||
data-embed-kind="{{ (svc.embed_kind or '')|e }}"
|
||||
data-service-id="{{ svc.id }}"
|
||||
data-name="{{ svc.name | e }}"
|
||||
>{{ svc.name }}</a
|
||||
><span class="nav-link-text">{{ svc.name }}</span></a
|
||||
>
|
||||
{% else %}
|
||||
<div class="hint" style="padding: 0 1rem">该分组下暂无服务</div>
|
||||
<div class="hint sidebar-empty">该分组下暂无服务</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="hint" style="padding: 1rem">
|
||||
@@ -74,7 +80,10 @@
|
||||
<div class="service-dashboard" id="service-dashboard">
|
||||
{% for group, services in grouped %}
|
||||
<section class="dash-section">
|
||||
<h3 class="dash-section-title">{{ group.name }}</h3>
|
||||
<h3 class="dash-section-title">
|
||||
{{ group_icon(group.resolve_icon_key()) }}
|
||||
<span>{{ group.name }}</span>
|
||||
</h3>
|
||||
<div class="service-card-grid">
|
||||
{% for svc in services %}
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user