gabriel / musehub public
releases.html html
135 lines 5.1 KB
Raw
sha256:e519738f2102d625d47828a17d113283cd744577b43551013cb668fd04f1c3fe chore(mwp8/phase5): tick all RG checkboxes; close-out doc (… Sonnet 4.6 18 days ago
1 {% extends "musehub/base.html" %}
2 {% from "musehub/macros/pagination.html" import pagination %}
3
4 {# ── Body preview: first real prose line, skipping markdown headers/bullets ── #}
5 {% macro body_preview(body, length=200) %}
6 {%- set ns = namespace(found="") -%}
7 {%- for line in body.split("\n") -%}
8 {%- if ns.found == "" and line.strip() and not line.strip().startswith("#") and not line.strip().startswith("-") and not line.strip().startswith("*") -%}
9 {%- set ns.found = line.strip() -%}
10 {%- endif -%}
11 {%- endfor -%}
12 {%- if ns.found -%}{{ ns.found[:length] }}{% if ns.found|length > length %}…{% endif %}
13 {%- elif body -%}{{ body[:length] }}{% if body|length > length %}…{% endif %}
14 {%- endif -%}
15 {% endmacro %}
16
17 {% macro author_bg(name) -%}
18 {%- set colors = ["#58a6ff","#3fb950","#a371f7","#fb8500","#2dd4bf","#d29922","#f85149"] -%}
19 {{ colors[(name|length) % (colors|length)] }}
20 {%- endmacro %}
21
22 {% block title %}Releases · {{ owner }}/{{ repo_slug }}{% endblock %}
23 {% block breadcrumb %}
24 <a href="/{{ owner }}/{{ repo_slug }}">{{ owner }}/{{ repo_slug }}</a> / releases
25 {% endblock %}
26 {% block repo_nav %}{% include "musehub/partials/repo_nav.html" %}{% endblock %}
27
28 {% block content %}
29 <div class="rl-page">
30
31 {# ── Latest release hero ──────────────────────────────────────────────────── #}
32 {% if latest_release %}
33 {% set lr = latest_release %}
34 {% set lr_ch = lr.channel if lr.channel else "stable" %}
35 {% set lr_status = "draft" if lr.is_draft else lr_ch %}
36
37 <div class="rl-hero-shell">
38 <div class="rl-hero-glow"></div>
39
40 <div class="rl-hero-inner">
41
42 <div class="rl-hero-left">
43 <div class="rl-hero-eyebrow">
44 {{ icon("check", 11) }}
45 Latest Release
46 </div>
47
48 <a href="{{ base_url }}/releases/{{ lr.tag | urlencode }}" class="rl-hero-title">{{ lr.title or lr.tag }}</a>
49
50 <div class="rl-hero-meta-row">
51 <span class="rl-pill rl-pill--{{ lr_status }}">{{ lr.tag }}</span>
52 {% if lr.author %}
53 <span class="rl-meta-dot">·</span>
54 <span class="rl-row-author">
55 <span class="rl-avatar" style="background:{{ author_bg(lr.author) }}">{{ lr.author[0] | upper }}</span>
56 {{ lr.author }}
57 </span>
58 {% endif %}
59 <span class="rl-meta-dot">·</span>
60 <span>{{ lr.created_at | fmtrelative }}</span>
61 {% if lr.commit_id %}
62 <span class="rl-meta-dot">·</span>
63 <a href="{{ base_url }}/commits/{{ lr.commit_id }}" class="rl-hero-sha">{{ lr.commit_id | shortsha }}</a>
64 {% endif %}
65 {% if lr.changelog %}
66 <span class="rl-meta-dot">·</span>
67 <span>{{ lr.changelog | length }} commit{{ 's' if lr.changelog | length != 1 else '' }}</span>
68 {% endif %}
69 </div>
70
71 {% if lr.body %}
72 <div class="rl-hero-body-preview">{{ body_preview(lr.body, 240) }}</div>
73 {% endif %}
74
75 <div class="rl-hero-actions">
76 <a href="{{ base_url }}/releases/{{ lr.tag | urlencode }}" class="btn btn-primary btn-sm">Release Notes</a>
77 {% if lr.commit_id %}
78 <a href="{{ base_url }}/commits/{{ lr.commit_id }}" class="btn btn-ghost btn-sm">View commit {{ lr.commit_id | shortsha }}</a>
79 {% endif %}
80 </div>
81 </div>
82
83 <div class="rl-hero-right">
84 <div class="rl-stat-pill">
85 <div class="rl-stat-value">{{ total }}</div>
86 <div class="rl-stat-label">Total Releases</div>
87 </div>
88 {% if stable_count > 0 %}
89 <div class="rl-stat-pill rl-stat-pill--stable">
90 <div class="rl-stat-value rl-stat-value--stable">{{ stable_count }}</div>
91 <div class="rl-stat-label">Stable</div>
92 </div>
93 {% endif %}
94 {% if prerelease_count > 0 %}
95 <div class="rl-stat-pill rl-stat-pill--pre">
96 <div class="rl-stat-value rl-stat-value--pre">{{ prerelease_count }}</div>
97 <div class="rl-stat-label">Pre-release</div>
98 </div>
99 {% endif %}
100 </div>
101
102 </div>
103 </div>
104 {% endif %}
105
106 {# ── Release list card — always rendered so tabs/search are accessible ──────── #}
107 {% if true %}
108 <div class="rl-card">
109 <div class="rl-toolbar">
110 <div class="rl-tabs">
111 <a href="#" class="rl-tab rl-tab--active" data-filter="all">
112 All {% if other_count > 0 %}<span style="font-size:11px;color:var(--text-muted)">({{ other_count }})</span>{% endif %}
113 </a>
114 <a href="#" class="rl-tab" data-filter="stable">Stable</a>
115 <a href="#" class="rl-tab" data-filter="prerelease">Pre-release</a>
116 <a href="#" class="rl-tab" data-filter="draft">Draft</a>
117 </div>
118 <div class="rl-toolbar-right">
119 <label class="rl-search" for="rel-search">
120 {{ icon("search", 13) }}
121 <input id="rel-search" type="text" placeholder="Search releases…" autocomplete="off">
122 </label>
123 </div>
124 </div>
125
126 <div class="rl-list" id="release-rows">
127 {% include "musehub/fragments/release_rows.html" %}
128 </div>
129 </div>
130 {% endif %}
131
132 </div>
133 {% endblock %}
134
135 {% block page_json %}{"page": "release-list"}{% endblock %}
File History 2 commits
sha256:e519738f2102d625d47828a17d113283cd744577b43551013cb668fd04f1c3fe chore(mwp8/phase5): tick all RG checkboxes; close-out doc (… Sonnet 4.6 18 days ago
sha256:0e5174da777684df43b2db71f282079030ef28bacffb93e19c29ee712b2a8bc4 test(mwp8/phase0): audit — repair+force-push leave stale ca… Sonnet 4.6 20 days ago