Add Q-mark logo and version footer per style guide
The style guide requires a 16×16 Q-mark SVG (rounded square + three
horizontal strokes + dashed circle overlay) in front of the wordmark,
and the footer's left side reserved for the version string. Inline the
SVG with currentColor so it inherits the palette's ink, and expose the
package version through a templates::pkg_version helper called from
each template's footer slot.
Assisted-by: Claude Opus 4.7 via Claude Code
diff --git a/src/quire/web/templates.rs b/src/quire/web/templates.rs
index 495e3ca..4c1fe75 100644
--- a/src/quire/web/templates.rs
+++ b/src/quire/web/templates.rs
@@ -4,6 +4,11 @@ use askama::Template;
use super::format;
+/// The package version, exposed to every template for the footer.
+fn pkg_version() -> &'static str {
+ env!("CARGO_PKG_VERSION")
+}
+
// ── Run list ───────────────────────────────────────────────────────
#[derive(Template)]
@@ -14,6 +19,12 @@ pub struct RunListTemplate {
pub runs: Vec<RunListRow>,
}
+impl RunListTemplate {
+ pub fn version(&self) -> &'static str {
+ pkg_version()
+ }
+}
+
pub struct RunListRow {
pub id: String,
pub state: String,
@@ -65,6 +76,12 @@ pub struct RunDetailTemplate {
pub jobs: Vec<DetailJob>,
}
+impl RunDetailTemplate {
+ pub fn version(&self) -> &'static str {
+ pkg_version()
+ }
+}
+
pub struct DetailRun {
pub state: String,
pub sha: String,
@@ -198,3 +215,9 @@ pub struct ErrorTemplate {
pub title: String,
pub detail: String,
}
+
+impl ErrorTemplate {
+ pub fn version(&self) -> &'static str {
+ pkg_version()
+ }
+}
diff --git a/templates/_css.html b/templates/_css.html
index cb4ba99..dd2782d 100644
--- a/templates/_css.html
+++ b/templates/_css.html
@@ -41,7 +41,8 @@ pre { white-space: pre-wrap; word-break: break-word; }
.page-nav .nav-bar { display: flex; align-items: center; gap: 6px; }
.page-nav .nav-wordmark,
-.page-nav .nav-repo { color: var(--ink); text-decoration: none; }
+.page-nav .nav-repo { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
+.page-nav .q-mark { color: var(--ink); display: block; }
.page-nav .nav-crumb { color: var(--muted); }
.page-nav .sep { color: var(--rule2); }
.page-nav .shortcuts { font-size: 11px; color: var(--mutedFaint); }
diff --git a/templates/_footer.html b/templates/_footer.html
index 0bb35d0..20d8835 100644
--- a/templates/_footer.html
+++ b/templates/_footer.html
@@ -1,4 +1,4 @@
<footer class="page-footer">
- <span>quire</span>
+ <span>v{{ self.version() }}</span>
<span>?</span>
</footer>
diff --git a/templates/_nav.html b/templates/_nav.html
index e672171..c3085e9 100644
--- a/templates/_nav.html
+++ b/templates/_nav.html
@@ -1,6 +1,15 @@
<nav class="page-nav">
<div class="nav-bar">
- <a class="nav-wordmark" href="/">quire</a>
+ <a class="nav-wordmark" href="/" aria-label="quire home">
+ <svg class="q-mark" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
+ <rect x="2" y="2" width="12" height="12" rx="1.2" fill="none" stroke="currentColor" stroke-width="1.2"/>
+ <line x1="4.5" y1="6" x2="11.5" y2="6" stroke="currentColor" stroke-width="0.8"/>
+ <line x1="4.5" y1="8" x2="11.5" y2="8" stroke="currentColor" stroke-width="0.8"/>
+ <line x1="4.5" y1="10" x2="9" y2="10" stroke="currentColor" stroke-width="0.8"/>
+ <circle cx="11" cy="11" r="3" fill="none" stroke="currentColor" stroke-width="0.8" stroke-dasharray="1.2 1.2" opacity="0.35"/>
+ </svg>
+ <span class="nav-wordmark-text">quire</span>
+ </a>
<span class="sep">/</span>
<a class="nav-repo" href="/{{ repo }}/ci">{{ repo }}</a>
{% for crumb in crumbs %}