Commit

Author:

Hash:

Timestamp:

+30 -15 +/-4 browse

Kevin Schoon [me@kevinschoon.com]

c9dd02ca921cc6a8f5b10f97608cdb89b49669b0

Wed, 06 Aug 2025 11:17:46 +0000 (3 months ago)

a few style updates
1diff --git a/ayllu/src/web2/template.rs b/ayllu/src/web2/template.rs
2index d54d0fc..eecfcaf 100644
3--- a/ayllu/src/web2/template.rs
4+++ b/ayllu/src/web2/template.rs
5 @@ -123,6 +123,17 @@ pub mod filters {
6 Ok(util::human_bytes(*bytes as f64))
7 }
8
9+ pub fn verified_class_name(
10+ verified: &Option<bool>,
11+ _: &dyn askama::Values,
12+ ) -> askama::Result<String> {
13+ if verified.is_some_and(|verified| verified) {
14+ Ok(String::from("positive"))
15+ } else {
16+ Ok(String::from("negative"))
17+ }
18+ }
19+
20 pub fn make_object_url(
21 filename: &str,
22 _: &dyn askama::Values,
23 diff --git a/ayllu/templates/macros.html b/ayllu/templates/macros.html
24index d8885e9..83b7472 100644
25--- a/ayllu/templates/macros.html
26+++ b/ayllu/templates/macros.html
27 @@ -12,7 +12,10 @@
28 </ul>
29 </nav>
30 {% endmacro navigation %}
31- {% macro commit_badge(commit, extended=false) %}
32+ {% macro commit_badge(commit_id, verified) %}
33+ <section class="selectable-text {{ verified | verified_class_name }}">
34+ <span class="protocol-badge">commit</span><span class="selectable" aria-label="commit {{ commit_id }}">{{ commit_id }}</span>
35+ </section>
36 {% endmacro commit_badge %}
37 {% macro selectable_text(proto, text) %}
38 <section class="selectable-text">
39 diff --git a/ayllu/templates/repo.html b/ayllu/templates/repo.html
40index fac29ae..c92d92e 100644
41--- a/ayllu/templates/repo.html
42+++ b/ayllu/templates/repo.html
43 @@ -58,20 +58,14 @@
44 </p>
45 <section class="badge-group">
46 {% call macros::selectable_text("ref", refname) %}
47- {% if let Some(_) = latest_commit.is_verified %}
48- <div class="positive">
49- {% else %}
50- <div class="negative">
51- {% endif %}
52- {% call macros::selectable_text("commit", latest_commit.id) %}
53- </section>
54- <pre>{{ latest_commit.message }} </pre>
55- {% endif %}
56+ {% call macros::commit_badge(latest_commit.id, latest_commit.is_verified) %}
57+ <pre>{{ latest_commit.message }} </pre>
58+ {% endif %}
59+ </section>
60+ </section>
61 </section>
62- </section>
63- </section>
64- <section class="scrollable lower-half">
65- <table class="data-table">
66+ <section class="scrollable">
67+ <table class="data-table file-tree">
68 <thead>
69 <tr>
70 <th scope="col">File</th>
71 diff --git a/ayllu/themes/base.css b/ayllu/themes/base.css
72index 06c3c56..7b2a607 100644
73--- a/ayllu/themes/base.css
74+++ b/ayllu/themes/base.css
75 @@ -78,7 +78,9 @@ header {
76 section.info-bar {
77 margin-top: 8px;
78 border-radius: revert;
79- border: 2px outset;
80+ border-top: 2px solid;
81+ border-right: 2px solid;
82+ border-left: 2px solid;
83 padding: 5px;
84 font-family: monospace;
85 }
86 @@ -120,6 +122,7 @@ span#ref-badge {
87 }
88
89 section#commit-summary {
90+ overflow: scroll;
91 padding: 1em;
92 border-radius: 5px;
93 }
94 @@ -160,6 +163,10 @@ section#rss-links > section#rss-link-items {
95 align-items: center;
96 }
97
98+ section#readme {
99+ padding: 1em;
100+ }
101+
102 section#readme > header {
103 margin: 5px;
104 }