Commit

Author:

Hash:

Timestamp:

+451 -424 +/-13 browse

Kevin Schoon [me@kevinschoon.com]

0ce6dc6da001004a6eefba89577873f967b9f7ec

Tue, 13 May 2025 10:52:59 +0000 (6 months ago)

run djlint formatter on all templates
1diff --git a/ayllu/templates/base.html b/ayllu/templates/base.html
2index 9768dbf..6e23178 100644
3--- a/ayllu/templates/base.html
4+++ b/ayllu/templates/base.html
5 @@ -24,7 +24,7 @@
6 </div>
7 </main>
8 <footer>
9- Rendered {%- if let Some(render_time) = base.render_time %} in {{ render_time }} (ms){%- endif %} @ {{ base.current_time }}
10+ Rendered {%- if let Some(render_time) = base.render_time %}in {{ render_time }} (ms){%- endif %} @ {{ base.current_time }}
11 </footer>
12 </body>
13 </html>
14 diff --git a/ayllu/templates/blame.html b/ayllu/templates/blame.html
15index 6e53e9a..11fd2a1 100644
16--- a/ayllu/templates/blame.html
17+++ b/ayllu/templates/blame.html
18 @@ -1,8 +1,8 @@
19 {% import "macros.html" as macros %}
20 {% extends "base.html" %}
21 {% block content %}
22- <header>
23- {% call macros::navigation(items=subnav_elements, title="Blame") %}
24+ <header>
25+ {% call macros::navigation(items=subnav_elements, title="Blame") %}
26 </header>
27 <section id="blame">
28 {% if is_renderable %}
29 @@ -25,9 +25,11 @@
30 </tbody>
31 </table>
32 </section>
33- <section id="blame-right">{{ content.1 | safe }}</section>
34+ <section id="blame-right">
35+ {{ content.1 | safe }}
36+ </section>
37 {% else %}
38- <h2>This content is not blameable</h2>
39+ <h2>This content is not blameable</h2>
40 {% endif %}
41 </section>
42- {% endblock %}
43+ {% endblock %}
44 diff --git a/ayllu/templates/blob.html b/ayllu/templates/blob.html
45index a967570..09988f7 100644
46--- a/ayllu/templates/blob.html
47+++ b/ayllu/templates/blob.html
48 @@ -1,58 +1,53 @@
49 {% import "macros.html" as macros %}
50 {% extends "base.html" %}
51 {% block content %}
52- <section id="blob" class="raised">
53+ <section id="blob" class="raised">
54 {% call macros::navigation(items=subnav_elements, title="Blob") %}
55- <section class="raised">
56- <section class="flex-group info-bar">
57- <section>
58- {%- if let Some((hint, color)) = hint -%}
59- <span class="hint" style="color: {{ color }}">{{ hint }}</span>
60- {%- endif -%}
61- <span>{{ file_name }}</span>
62- </section>
63- <section>
64- <span>{{ file_mode_ | file_mode }} {{ file_size | human_bytes }}</span>
65- </section>
66- </section>
67- <section id="code-viewer" class="scrollable lower-half">
68-
69- {% if is_binary %}
70- <div class="blob-preview">
71- {% if is_image %}
72- <img height="1000px"
73- width="1000px"
74- alt="{{ file_name }}"
75- src="{{ raw_url }}">
76- </img>
77- {% elif is_video %}
78- <video controls>
79- <source src="{{ raw_url }}" type="{{ mime_type }}" />
80- <p>
81- <a href="{{ raw_url }}">raw url</a>
82- </p>
83- </video>
84- {% elif is_audio %}
85- <audio src="{{ raw_url }}" type="{{ mime_type }}"></audio>
86+ <section class="raised">
87+ <section class="flex-group info-bar">
88+ <section>
89+ {%- if let Some((hint, color)) = hint -%}
90+ <span class="hint" style="color: {{ color }}">{{ hint }}</span>
91+ {%- endif -%}
92+ <span>{{ file_name }}</span>
93+ </section>
94+ <section>
95+ <span>{{ file_mode_ | file_mode }} {{ file_size | human_bytes }}</span>
96+ </section>
97+ </section>
98+ <section id="code-viewer" class="scrollable lower-half">
99+ {% if is_binary %}
100+ <div class="blob-preview">
101+ {% if is_image %}
102+ <img height="1000px"
103+ width="1000px"
104+ alt="{{ file_name }}"
105+ src="{{ raw_url }}">
106+ </img>
107+ {% elif is_video %}
108+ <video controls>
109+ <source src="{{ raw_url }}" type="{{ mime_type }}" />
110+ <p>
111+ <a href="{{ raw_url }}">raw url</a>
112+ </p>
113+ </video>
114+ {% elif is_audio %}
115+ <audio src="{{ raw_url }}" type="{{ mime_type }}"></audio>
116+ {% else %}
117+ <center>
118+ <h3>Cannot render binary content</h3>
119+ </center>
120+ <a href="{{ raw_url }}">download</a>
121+ {% endif %}
122+ </div>
123 {% else %}
124- <center>
125- <h3>Cannot render binary content</h3>
126- </center>
127- <a href="{{ raw_url }}">download</a>
128- {% endif %}
129- </div>
130- {% else %}
131- {% if is_markdown %}
132- {% if let Some(content) = content %}
133- <div class="readme">{{ content | safe }}</div>
134+ {% if is_markdown %}
135+ {% if let Some(content) = content %}<div class="readme">{{ content | safe }}</div>{% endif %}
136+ {% else %}
137+ {% if let Some(content) = content %}{{ content | safe }}{% endif %}
138+ {% endif %}
139 {% endif %}
140- {% else %}
141- {% if let Some(content) = content %}
142- {{ content | safe }}
143- {% endif %}
144- {% endif %}
145- {% endif %}
146- </section>
147+ </section>
148 </section>
149- </section>
150+ </section>
151 {% endblock %}
152 diff --git a/ayllu/templates/collection.html b/ayllu/templates/collection.html
153index c20c78f..5fc2c9d 100644
154--- a/ayllu/templates/collection.html
155+++ b/ayllu/templates/collection.html
156 @@ -6,9 +6,7 @@
157 <a href="/{{ collection.name }}">{{ collection.name }}</a>
158 {%- if is_hidden %} <span class="negative">[hidden]</span> {%- endif -%}
159 </h1>
160- {% if let Some(description) = collection.description %}
161- {{ description }}
162- {% endif %}
163+ {% if let Some(description) = collection.description %}{{ description }}{% endif %}
164 </header>
165 <table class="data-table">
166 <thead>
167 diff --git a/ayllu/templates/commit.html b/ayllu/templates/commit.html
168index e74337f..d76e6c2 100644
169--- a/ayllu/templates/commit.html
170+++ b/ayllu/templates/commit.html
171 @@ -1,70 +1,82 @@
172 {% extends "base.html" %}
173 {% import "macros.html" as macros %}
174 {% block content %}
175- <section id="commit" class="raised">
176- <section class="info-bar">Commit</section>
177- <section class="lower-half">
178+ <section id="commit" class="raised">
179+ <section class="info-bar">
180+ Commit
181+ </section>
182+ <section class="lower-half">
183 <section id="commit-details" class="raised flex-group dense">
184 <section>
185- <p><b>Author:</b></p>
186- {% if distinct_author %}
187- <p><b>Committer:</b></p>
188- {% endif %}
189- <p><b>Hash:</b></p>
190- <p><b>Timestamp:</b></p>
191- <p>
192- <span class="positive">+{{ stats.insertions }}</span>
193- <span class="negative">-{{ stats.deletions }}</span>
194- <span>+/-{{ stats.files_changed }}</span>
195- <span>
196- <a href="/{{ collection }}/{{ name }}/tree/{{ commit_hash }}"
197- role="button">browse</a>
198- </span>
199- </p>
200+ <p>
201+ <b>Author:</b>
202+ </p>
203+ {% if distinct_author %}
204+ <p>
205+ <b>Committer:</b>
206+ </p>
207+ {% endif %}
208+ <p>
209+ <b>Hash:</b>
210+ </p>
211+ <p>
212+ <b>Timestamp:</b>
213+ </p>
214+ <p>
215+ <span class="positive">+{{ stats.insertions }}</span>
216+ <span class="negative">-{{ stats.deletions }}</span>
217+ <span>+/-{{ stats.files_changed }}</span>
218+ <span>
219+ <a href="/{{ collection }}/{{ name }}/tree/{{ commit_hash }}"
220+ role="button">browse</a>
221+ </span>
222+ </p>
223 </section>
224 <section>
225 <p>
226 <a href="/{{ collection }}/{{ name }}/log?username={{ commit.author_name | urlencode }}&email={{ commit.author_email | urlencode }}">{{ commit.author_name }}</a> [<a href="mailto://{{ commit.author_email }}">{{ commit.author_email }}</a>]
227 </p>
228 {% if distinct_author %}
229- <p>
230- <a href="#">{{ commit.committer_name }}</a>
231- [<a href="mailto://{{ commit.committer_email }}">{{ commit.committer_email }}</a>]
232- {{ commit.committer_epoch | format_epoch }}
233- </p>
234+ <p>
235+ <a href="#">{{ commit.committer_name }}</a>
236+ [<a href="mailto://{{ commit.committer_email }}">{{ commit.committer_email }}</a>]
237+ {{ commit.committer_epoch | format_epoch }}
238+ </p>
239 {% endif %}
240- <p class="{%- if let Some(_) = commit.is_verified -%} positive {%- else -%} negative {%- endif %} hash">{{ commit.id }}</p>
241- <p>{{ commit.author_epoch | format_epoch }} ({{ commit.epoch | friendly_time }})</p>
242+ <p class="{%- if let Some(_) = commit.is_verified -%} positive {%- else -%} negative {%- endif %} hash">
243+ {{ commit.id }}
244+ </p>
245+ <p>{{ commit.author_epoch | format_epoch }} ({{ commit.epoch | friendly_time }})</p>
246 </section>
247 </section>
248-
249- <section id="commit-message" class="raised">
250- <b>{{ commit.summary }}</b>
251- {% if extended_commit_message %}
252- <div class="message">
253- <pre>{{ commit.message }}</pre>
254- </div>
255- {% endif %}
256- {% if let Some(note) = note %}
257- <h5>Note</h5>
258- <section>
259- <span><b>Author:</b></span>
260- <span class="right">
261- <a href="/{{ collection }}/{{ name }}/log?username={{ note.author_name | urlencode }}&email={{ note.author_email | urlencode }}">{{ note.author_name }}</a>
262- [<a href="mailto://{{ note.author_email }}">{{ commit.author_email }}</a>]
263- </span>
264- </section>
265- <section>
266- <span><b>Timestamp:</b></span>
267- <span class="right">{{ note.author_epoch | format_epoch }} ({{ note.author_epoch | friendly_time }})</span>
268- </section>
269- <div class="message">
270- <pre>{{ note.message }}</pre>
271- </div>
272- {% endif %}
273- </section>
274-
275- <section id="code-viewer" class="scrollable">{{ diff.1 | safe }}</section>
276- </section>
277+ <section id="commit-message" class="raised">
278+ <b>{{ commit.summary }}</b>
279+ {% if extended_commit_message %}
280+ <div class="message">
281+ <pre>{{ commit.message }}</pre>
282+ </div>
283+ {% endif %}
284+ {% if let Some(note) = note %}
285+ <h5>Note</h5>
286+ <section>
287+ <span><b>Author:</b></span>
288+ <span class="right">
289+ <a href="/{{ collection }}/{{ name }}/log?username={{ note.author_name | urlencode }}&email={{ note.author_email | urlencode }}">{{ note.author_name }}</a>
290+ [<a href="mailto://{{ note.author_email }}">{{ commit.author_email }}</a>]
291+ </span>
292+ </section>
293+ <section>
294+ <span><b>Timestamp:</b></span>
295+ <span class="right">{{ note.author_epoch | format_epoch }} ({{ note.author_epoch | friendly_time }})</span>
296+ </section>
297+ <div class="message">
298+ <pre>{{ note.message }}</pre>
299+ </div>
300+ {% endif %}
301+ </section>
302+ <section id="code-viewer" class="scrollable">
303+ {{ diff.1 | safe }}
304+ </section>
305 </section>
306+ </section>
307 {% endblock %}
308 diff --git a/ayllu/templates/config.html b/ayllu/templates/config.html
309index b39aa7e..f7c3b7b 100644
310--- a/ayllu/templates/config.html
311+++ b/ayllu/templates/config.html
312 @@ -1,46 +1,48 @@
313 {% extends "base.html" %}
314 {% block content %}
315 <section id="config-panel" class="raised">
316- <section class="info-bar">Configuration</section>
317+ <section class="info-bar">
318+ Configuration
319+ </section>
320 <section class="lower-half">
321- <form action="/config" method="post">
322- <label for="theme">
323- <h3>items-per-page</h3>
324- </label>
325- <select id="items_per_page" name="items_per_page" required>
326- <option value="50"
327- {%- if config.items_per_page == 50 -%}
328- selected
329- {%- endif -%}>50</option>
330- <option value="100"
331- {%- if config.items_per_page == 100 -%}
332- selected
333- {%- endif -%}>100</option>
334- <option value="150"
335- {%- if config.items_per_page == 150 -%}
336- selected
337- {%- endif -%}>150</option>
338- <option value="200"
339- {%- if config.items_per_page == 200 -%}
340- selected
341- {%- endif -%}>200</option>
342- </select>
343- <label for="theme">
344- <h3>theme</h3>
345- </label>
346- <select id="theme" name="theme" required>
347- {% for theme in themes %}
348- <option value="{{ theme }}"
349- {% if let Some(current_theme) = config.theme %}
350+ <form action="/config" method="post">
351+ <label for="theme">
352+ <h3>items-per-page</h3>
353+ </label>
354+ <select id="items_per_page" name="items_per_page" required>
355+ <option value="50"
356+ {%- if config.items_per_page == 50 -%}
357+ selected
358+ {%- endif -%}>50</option>
359+ <option value="100"
360+ {%- if config.items_per_page == 100 -%}
361+ selected
362+ {%- endif -%}>100</option>
363+ <option value="150"
364+ {%- if config.items_per_page == 150 -%}
365+ selected
366+ {%- endif -%}>150</option>
367+ <option value="200"
368+ {%- if config.items_per_page == 200 -%}
369+ selected
370+ {%- endif -%}>200</option>
371+ </select>
372+ <label for="theme">
373+ <h3>theme</h3>
374+ </label>
375+ <select id="theme" name="theme" required>
376+ {% for theme in themes %}
377+ <option value="{{ theme }}"
378+ {% if let Some(current_theme) = config.theme %}
379 {%- if theme == current_theme -%}
380- selected
381+ selected
382 {%- endif -%}
383- {%- endif -%}>{{ theme }}</option>
384- {% endfor %}
385- </select>
386- <!-- Button -->
387- <button type="submit">Submit</button>
388- </form>
389+ {%- endif -%}>{{ theme }}</option>
390+ {% endfor %}
391+ </select>
392+ <!-- Button -->
393+ <button type="submit">Submit</button>
394+ </form>
395 </section>
396 </section>
397 {% endblock %}
398 diff --git a/ayllu/templates/index.html b/ayllu/templates/index.html
399index ee406da..20d073f 100644
400--- a/ayllu/templates/index.html
401+++ b/ayllu/templates/index.html
402 @@ -7,40 +7,43 @@
403 Collections
404 </section>
405 <section>
406- {% call macros::rss_links(base.feed_icon, "/rss/firehose.xml", "/rss/1d.xml", "/rss/1w.xml", "/rss/1m.xml") %}
407+ {% call macros::rss_links(base.feed_icon, "/rss/firehose.xml", "/rss/1d.xml", "/rss/1w.xml", "/rss/1m.xml") %}
408+ </section>
409 </section>
410- </section>
411- <section class="scrollable raised">
412+ <section class="scrollable raised">
413 {% for collection in collections %}
414- <section class="info-bar flex-group">{{collection.name}}
415- {%- if let Some(description) = collection.description -%}
416- <section>{{ description }}</section>
417- {%- endif -%}
418- </section>
419- <section class="collection lower-half">
420- <table class="data-table">
421- <tbody id="{{ collection.name }}">
422- <tr class="group-label">
423- <th>Name</th>
424- <th>Description</th>
425- <th class="collapse-xs">Updated</th>
426- </tr>
427- {% for repo in collection.repositories %}
428- <tr>
429- <td>
430- <div class="name">
431- <a href="/{{ collection.name }}/{{ repo.name }}">{{ repo.name }}</a>
432- {%- if repo.is_mirror %} <span class="tiny-highlight">[mirror]</span> {%- endif -%}
433- </div>
434- </td>
435- <td>{{ repo.description | truncate(50) }}</td>
436- <td class="collapse-xs">{{ repo.age }}</td>
437- </tr>
438- {% endfor %}
439- </tbody>
440- </table>
441- </section>
442- {% endfor %}
443- </section>
444- </section>
445- {% endblock %}
446+ <section class="info-bar flex-group">
447+ {{ collection.name }}
448+ {%- if let Some(description) = collection.description -%}
449+ <section>
450+ {{ description }}
451+ </section>
452+ {%- endif -%}
453+ </section>
454+ <section class="collection lower-half">
455+ <table class="data-table">
456+ <tbody id="{{ collection.name }}">
457+ <tr class="group-label">
458+ <th>Name</th>
459+ <th>Description</th>
460+ <th class="collapse-xs">Updated</th>
461+ </tr>
462+ {% for repo in collection.repositories %}
463+ <tr>
464+ <td>
465+ <div class="name">
466+ <a href="/{{ collection.name }}/{{ repo.name }}">{{ repo.name }}</a>
467+ {%- if repo.is_mirror %} <span class="tiny-highlight">[mirror]</span> {%- endif -%}
468+ </div>
469+ </td>
470+ <td>{{ repo.description | truncate(50) }}</td>
471+ <td class="collapse-xs">{{ repo.age }}</td>
472+ </tr>
473+ {% endfor %}
474+ </tbody>
475+ </table>
476+ </section>
477+ {% endfor %}
478+ </section>
479+ </section>
480+ {% endblock %}
481 diff --git a/ayllu/templates/log.html b/ayllu/templates/log.html
482index a0b89f0..ab1b613 100644
483--- a/ayllu/templates/log.html
484+++ b/ayllu/templates/log.html
485 @@ -3,48 +3,50 @@
486 {% block content %}
487 <section id="log" class="scrollable raised">
488 {% if file_view %}
489- {% call macros::navigation(items=subnav_elements, title="Log") %}
490- {% endif %}
491- <section class="info-bar">Log</section>
492- <section class="lower-half">
493- <table class="data-table">
494- <thead>
495- <tr>
496- <th>ID</th>
497- <th>Flags</th>
498- <th>Age</th>
499- <th class="collapse">Author</th>
500- <th>Message</th>
501- </tr>
502- </thead>
503- <tbody>
504- {% for commit in commits %}
505- <tr>
506- <td>
507- <span class="{%- if let Some(_) = commit.is_verified -%}positive{%- else -%}negative {%- endif -%}">
508- <a href="/{{ collection }}/{{ name }}/commit/{{ commit.id }}">{{ commit.id | truncate(12) }}</a>
509- </span>
510- </td>
511- <td>
512- {% if let Some(_) = commit.has_note %}<div data-tooltip="Note">[N]</div>{% endif %}
513- {% if commit.is_extended %}<div data-tooltip="Extended Commit">[E]</div>{% endif %}
514- </td>
515- <td>{{ commit.epoch | friendly_time }}</td>
516- <td class="collapse">
517- <a href="/{{ collection }}/{{ name }}/log?username={{ commit.author_name | urlencode }}&email={{ commit.author_email | urlencode }}">{{ commit.author_name }}</a>
518- </td>
519- <td>{{ commit.summary | truncate(85) }}</td>
520- </tr>
521- {% endfor %}
522- </tbody>
523- </table>
524- {% if has_more -%}
525- <footer class="pagination">
526- {%- if let Some(last_commit) = last_commit -%}
527- <span class="right"><a href="/{{ collection }}/{{ name }}/log/{{ last_commit.id }}"><b>next</b></a></span>
528- {%- endif -%}
529- </footer>
530- {% endif %}
531- </section>
532- </section>
533- {% endblock %}
534+ {% call macros::navigation(items=subnav_elements, title="Log") %}
535+ {% endif %}
536+ <section class="info-bar">
537+ Log
538+ </section>
539+ <section class="lower-half">
540+ <table class="data-table">
541+ <thead>
542+ <tr>
543+ <th>ID</th>
544+ <th>Flags</th>
545+ <th>Age</th>
546+ <th class="collapse">Author</th>
547+ <th>Message</th>
548+ </tr>
549+ </thead>
550+ <tbody>
551+ {% for commit in commits %}
552+ <tr>
553+ <td>
554+ <span class="{%- if let Some(_) = commit.is_verified -%}positive{%- else -%}negative {%- endif -%}">
555+ <a href="/{{ collection }}/{{ name }}/commit/{{ commit.id }}">{{ commit.id | truncate(12) }}</a>
556+ </span>
557+ </td>
558+ <td>
559+ {% if let Some(_) = commit.has_note %}<div data-tooltip="Note">[N]</div>{% endif %}
560+ {% if commit.is_extended %}<div data-tooltip="Extended Commit">[E]</div>{% endif %}
561+ </td>
562+ <td>{{ commit.epoch | friendly_time }}</td>
563+ <td class="collapse">
564+ <a href="/{{ collection }}/{{ name }}/log?username={{ commit.author_name | urlencode }}&email={{ commit.author_email | urlencode }}">{{ commit.author_name }}</a>
565+ </td>
566+ <td>{{ commit.summary | truncate(85) }}</td>
567+ </tr>
568+ {% endfor %}
569+ </tbody>
570+ </table>
571+ {% if has_more -%}
572+ <footer class="pagination">
573+ {%- if let Some(last_commit) = last_commit -%}
574+ <span class="right"><a href="/{{ collection }}/{{ name }}/log/{{ last_commit.id }}"><b>next</b></a></span>
575+ {%- endif -%}
576+ </footer>
577+ {% endif %}
578+ </section>
579+ </section>
580+ {% endblock %}
581 diff --git a/ayllu/templates/macros.html b/ayllu/templates/macros.html
582index b319996..d8885e9 100644
583--- a/ayllu/templates/macros.html
584+++ b/ayllu/templates/macros.html
585 @@ -14,21 +14,21 @@
586 {% endmacro navigation %}
587 {% macro commit_badge(commit, extended=false) %}
588 {% endmacro commit_badge %}
589-
590 {% macro selectable_text(proto, text) %}
591- <section class="selectable-text">
592- <span class="protocol-badge">{{proto}}</span><span class="selectable" aria-label="{{ proto }} {{text}}">{{ text }}</span>
593- </section>
594+ <section class="selectable-text">
595+ <span class="protocol-badge">{{ proto }}</span><span class="selectable" aria-label="{{ proto }} {{ text }}">{{ text }}</span>
596+ </section>
597 {% endmacro %}
598-
599 {% macro rss_links(feed_icon, all, day, week, month) %}
600- <section id="rss-links">
601- <section> {{ feed_icon | safe }} </section>
602- <section id="rss-link-items">
603- [<a href="{{ all }}">*</a>,
604+ <section id="rss-links">
605+ <section>
606+ {{ feed_icon | safe }}
607+ </section>
608+ <section id="rss-link-items">
609+ [<a href="{{ all }}">*</a>,
610 <a href="{{ day }}">1d</a>,
611 <a href="{{ week }}">1w</a>,
612 <a href="{{ month }}">1m</a>]
613+ </section>
614 </section>
615- </section>
616 {% endmacro %}
617 diff --git a/ayllu/templates/refs.html b/ayllu/templates/refs.html
618index e09930c..95c0844 100644
619--- a/ayllu/templates/refs.html
620+++ b/ayllu/templates/refs.html
621 @@ -2,95 +2,99 @@
622 {% extends "base.html" %}
623 {% block content %}
624 <section id="refs-page">
625- <section id="refs" class="scrollable raised">
626- <section class="info-bar">Tags</section>
627- <section id="tags" class="lower-half">
628- <table class="data-table">
629- <thead>
630- <tr>
631- <th>Name</th>
632- <th class="collapse">Age</th>
633- <th class="collapse">Author</th>
634- <th>Archive</th>
635- </tr>
636- </thead>
637- <tbody>
638- {% for tag in tags %}
639+ <section id="refs" class="scrollable raised">
640+ <section class="info-bar">
641+ Tags
642+ </section>
643+ <section id="tags" class="lower-half">
644+ <table class="data-table">
645+ <thead>
646 <tr>
647- <td>
648- <a href="/{{ collection }}/{{ name }}/refs/tag/{{ tag.name }}">{{ tag.name }}</a>
649- </td>
650- <td class="collapse">{{ tag.commit.epoch | friendly_time }}</td>
651- <td class="collapse">{{ tag.author_name }}</td>
652- <td>
653- <a href="/{{ collection }}/{{ name }}/refs/archive/{{ tag.name }}.tar.gz"
654- role="button">{{ tag.name }}.tar.gz</a>
655- </td>
656+ <th>Name</th>
657+ <th class="collapse">Age</th>
658+ <th class="collapse">Author</th>
659+ <th>Archive</th>
660 </tr>
661- {% endfor %}
662- </tbody>
663- </table>
664+ </thead>
665+ <tbody>
666+ {% for tag in tags %}
667+ <tr>
668+ <td>
669+ <a href="/{{ collection }}/{{ name }}/refs/tag/{{ tag.name }}">{{ tag.name }}</a>
670+ </td>
671+ <td class="collapse">{{ tag.commit.epoch | friendly_time }}</td>
672+ <td class="collapse">{{ tag.author_name }}</td>
673+ <td>
674+ <a href="/{{ collection }}/{{ name }}/refs/archive/{{ tag.name }}.tar.gz"
675+ role="button">{{ tag.name }}.tar.gz</a>
676+ </td>
677+ </tr>
678+ {% endfor %}
679+ </tbody>
680+ </table>
681+ </section>
682 </section>
683- </section>
684- <section id="branches" class="scrollable raised">
685- <section class="info-bar">Branches</section>
686- <section id="branches" class="lower-half">
687- <table class="data-table">
688- <thead>
689- <tr>
690- <th>Name</th>
691- <th class="collapse">Age</th>
692- <th>Commit</th>
693- <th class="collapse-xs">Message</th>
694- </tr>
695- </thead>
696- <tbody>
697- {% for branch in branches %}
698- <tr>
699- <td>
700- <a href="/{{ collection }}/{{ name }}/tree/{{ branch.name | urlencode }}">{{ branch.name }}</a>
701- </td>
702- <td class="collapse">{{ branch.head.epoch | friendly_time }}</td>
703- <td>
704- <a href="/{{ collection }}/{{ name }}/commit/{{ branch.head.id }}">
705- {{ branch.head.id | truncate(8) }}</a>
706- </td>
707- <td class="collapse-xs">{{ branch.head.summary | truncate(85) }}</td>
708- </tr>
709- {% endfor %}
710- </tbody>
711- </table>
712+ <section id="branches" class="scrollable raised">
713+ <section class="info-bar">
714+ Branches
715+ </section>
716+ <section id="branches" class="lower-half">
717+ <table class="data-table">
718+ <thead>
719+ <tr>
720+ <th>Name</th>
721+ <th class="collapse">Age</th>
722+ <th>Commit</th>
723+ <th class="collapse-xs">Message</th>
724+ </tr>
725+ </thead>
726+ <tbody>
727+ {% for branch in branches %}
728+ <tr>
729+ <td>
730+ <a href="/{{ collection }}/{{ name }}/tree/{{ branch.name | urlencode }}">{{ branch.name }}</a>
731+ </td>
732+ <td class="collapse">{{ branch.head.epoch | friendly_time }}</td>
733+ <td>
734+ <a href="/{{ collection }}/{{ name }}/commit/{{ branch.head.id }}">{{ branch.head.id | truncate(8) }}</a>
735+ </td>
736+ <td class="collapse-xs">{{ branch.head.summary | truncate(85) }}</td>
737+ </tr>
738+ {% endfor %}
739+ </tbody>
740+ </table>
741+ </section>
742 </section>
743- </section>
744- <section id="notes" class="scrollable raised">
745- <section class="info-bar">Notes</section>
746- <section id="notes" class="lower-half">
747- <table class="data-table">
748- <thead>
749- <tr>
750- <th>Commit</th>
751- <th>Author</th>
752- <th class="collapse">Age</th>
753- <th class="collapse-xs">Message</th>
754- </tr>
755- </thead>
756- <tbody>
757- {% for note in notes %}
758+ <section id="notes" class="scrollable raised">
759+ <section class="info-bar">
760+ Notes
761+ </section>
762+ <section id="notes" class="lower-half">
763+ <table class="data-table">
764+ <thead>
765 <tr>
766- <td>
767- <a href="/{{ collection }}/{{ name }}/commit/{{ note.commit.id }}">
768- {{ note.commit.id | truncate(8) }}</a>
769- </td>
770- <td>{{ note.author_name }}</td>
771- <td class="collapse">{{ note.author_epoch | friendly_time }}</td>
772- <td class="collapse-xs">
773- <pre>{{ note.message | truncate(32) }}</pre>
774- </td>
775+ <th>Commit</th>
776+ <th>Author</th>
777+ <th class="collapse">Age</th>
778+ <th class="collapse-xs">Message</th>
779 </tr>
780- {% endfor %}
781- </tbody>
782- </table>
783+ </thead>
784+ <tbody>
785+ {% for note in notes %}
786+ <tr>
787+ <td>
788+ <a href="/{{ collection }}/{{ name }}/commit/{{ note.commit.id }}">{{ note.commit.id | truncate(8) }}</a>
789+ </td>
790+ <td>{{ note.author_name }}</td>
791+ <td class="collapse">{{ note.author_epoch | friendly_time }}</td>
792+ <td class="collapse-xs">
793+ <pre>{{ note.message | truncate(32) }}</pre>
794+ </td>
795+ </tr>
796+ {% endfor %}
797+ </tbody>
798+ </table>
799+ </section>
800 </section>
801 </section>
802- </section>
803 {% endblock %}
804 diff --git a/ayllu/templates/repo.html b/ayllu/templates/repo.html
805index da237e6..580d11e 100644
806--- a/ayllu/templates/repo.html
807+++ b/ayllu/templates/repo.html
808 @@ -1,104 +1,113 @@
809 {% extends "base.html" %}
810 {% import "macros.html" as macros %}
811 {% block content %}
812-
813- <section>
814- <section class="info-bar">Project</section>
815- <section id="repo-action-panel" class="raised flex-group lower-half">
816- <section id="project-details" class="dense">
817- <p>
818- <span><b>Project: </b>{{ collection }}/{{ name }}</span>
819- </p>
820- {% if let Some(license) = license %}
821- <p>
822- <span> <b> License: </b> {{ license }} </span>
823- </p>
824- {% endif %}
825- {% if let Some(homepage) = homepage %}
826- <p>
827- <span> <b> Homepage: </b> <a href="{{homepage}}">{{ homepage }}</a></span>
828- </p>
829- {% endif %}
830- {% if let Some(description) = description %}
831- <p><span><b>Description: </b>{{description | truncate(45)}}</span></p>
832- {% endif %}
833- </section>
834 <section>
835- {% call macros::selectable_text("http", http_clone_url) %}
836- {% if let Some(clone_url) = git_clone_url %}
837- {% call macros::selectable_text("ssh", clone_url) %}
838- {% endif %}
839- </section>
840- </section>
841- </section>
842-
843-
844- <section id="tree" class="raised">
845- <section class="info-bar flex-group">
846- <section>
847- Repository
848+ <section class="info-bar">
849+ Project
850 </section>
851- <section>
852- {% call macros::rss_links(base.feed_icon, rss_link_all, rss_link_1d, rss_link_1w, rss_link_1m) %}
853- </section>
854- </section>
855- <section id="repo-details-panel" class="flex-group lower-half">
856- <section id="commit-summary">
857- {% if let Some(latest_commit) = latest_commit %}
858- <p class="dense">{{ latest_commit.author_name }}</p>
859- <p class="dense">{{ latest_commit.epoch | friendly_time }}</p>
860- <span {% if let Some(_) = latest_commit.is_verified -%} class="positive" {%- else -%} class="negative" {%- endif -%}><a href="/{{collection}}/{{name}}/commit/{{latest_commit.id}}">{{ latest_commit.id | truncate(12) }}</a></span>
861- <pre>{{ latest_commit.message }} </pre>
862- {% endif %}
863- </section>
864- {% call macros::selectable_text("ref", refname) %}
865- </section>
866- <table class="data-table">
867- <thead>
868- <tr>
869- <th scope="col">File</th>
870- <th class="collapse-xs" scope="col">Commit</th>
871- <th class="collapse" scope="col">Size</th>
872- <th class="collapse" scope="col">Mode</th>
873- <th scope="col">Time</th>
874- </tr>
875- </thead>
876- <tbody>
877- {% for item in tree %}
878- <tr>
879- <td>
880- <a href="{{ item.0.name | make_object_url(item.0.kind, collection, name, refname, file_path) }}">
881- {{ item.0.name }}
882- {% if item.0.kind == "submodule" %}<span class="tiny">ref</span>{% endif %}
883- {% if item.0.kind == "pointer" %}<span class="tiny">ptr</span>{% endif %}
884- </a>
885- </td>
886- <td class="collapse-xs">
887- <a href="/{{ collection }}/{{ name }}/commit/{{ item.1.id }}">{{ item.1.summary | truncate(length=60) }}</a>
888- </td>
889- <td class="collapse">{{ item.0.size | human_bytes_i64 }}</td>
890- <td class="collapse">{{ item.0.mode | file_mode }}</td>
891- <td>
892- <a href="/{{ collection }}/{{ name }}/commit/{{ item.1.id }}">{{ item.1.epoch | friendly_time }}</a>
893- </td>
894- </tr>
895- {% endfor %}
896- </tbody>
897- </table>
898- </section>
899- {% if let Some(readme) = readme %}
900- <section class="raised">
901- {% if let Some(file_name) = rendered_file_name %}
902- <section class="flex-group info-bar">
903- <section>{{ file_name }}</section>
904- {% if let Some(rendered_file_size) = rendered_file_size %}
905- <section>{{rendered_file_size | human_bytes_i64}}</section>
906- {% endif %}
907- </section>
908- {% endif %}
909- <section id="readme" class="scrollable lower-half">
910- {{ readme | safe }}
911- </section>
912- {% endif %}
913- </section>
914- {% endblock %}
915+ <section id="repo-action-panel" class="raised flex-group lower-half">
916+ <section id="project-details" class="dense">
917+ <p>
918+ <span><b>Project: </b>{{ collection }}/{{ name }}</span>
919+ </p>
920+ {% if let Some(license) = license %}
921+ <p>
922+ <span> <b> License: </b> {{ license }} </span>
923+ </p>
924+ {% endif %}
925+ {% if let Some(homepage) = homepage %}
926+ <p>
927+ <span> <b> Homepage: </b> <a href="{{ homepage }}">{{ homepage }}</a></span>
928+ </p>
929+ {% endif %}
930+ {% if let Some(description) = description %}
931+ <p>
932+ <span><b>Description: </b>{{ description | truncate(45) }}</span>
933+ </p>
934+ {% endif %}
935+ </section>
936+ <section>
937+ {% call macros::selectable_text("http", http_clone_url) %}
938+ {% if let Some(clone_url) = git_clone_url %}
939+ {% call macros::selectable_text("ssh", clone_url) %}
940+ {% endif %}
941+ </section>
942+ </section>
943+ </section>
944+ <section id="tree" class="raised">
945+ <section class="info-bar flex-group">
946+ <section>
947+ Repository
948+ </section>
949+ <section>
950+ {% call macros::rss_links(base.feed_icon, rss_link_all, rss_link_1d, rss_link_1w, rss_link_1m) %}
951+ </section>
952+ </section>
953+ <section id="repo-details-panel" class="flex-group lower-half">
954+ <section id="commit-summary">
955+ {% if let Some(latest_commit) = latest_commit %}
956+ <p class="dense">{{ latest_commit.author_name }}</p>
957+ <p class="dense">{{ latest_commit.epoch | friendly_time }}</p>
958+ <span {% if let Some(_) = latest_commit.is_verified -%}
959+ class="positive"
960+ {%- else -%}
961+ class="negative"
962+ {%- endif -%}><a href="/{{ collection }}/{{ name }}/commit/{{ latest_commit.id }}">{{ latest_commit.id | truncate(12) }}</a></span>
963+ <pre>{{ latest_commit.message }} </pre>
964+ {% endif %}
965+ </section>
966+ {% call macros::selectable_text("ref", refname) %}
967+ </section>
968+ <table class="data-table">
969+ <thead>
970+ <tr>
971+ <th scope="col">File</th>
972+ <th class="collapse-xs" scope="col">Commit</th>
973+ <th class="collapse" scope="col">Size</th>
974+ <th class="collapse" scope="col">Mode</th>
975+ <th scope="col">Time</th>
976+ </tr>
977+ </thead>
978+ <tbody>
979+ {% for item in tree %}
980+ <tr>
981+ <td>
982+ <a href="{{ item.0.name | make_object_url(item.0.kind, collection, name, refname, file_path) }}">
983+ {{ item.0.name }}
984+ {% if item.0.kind == "submodule" %}<span class="tiny">ref</span>{% endif %}
985+ {% if item.0.kind == "pointer" %}<span class="tiny">ptr</span>{% endif %}
986+ </a>
987+ </td>
988+ <td class="collapse-xs">
989+ <a href="/{{ collection }}/{{ name }}/commit/{{ item.1.id }}">{{ item.1.summary | truncate(length=60) }}</a>
990+ </td>
991+ <td class="collapse">{{ item.0.size | human_bytes_i64 }}</td>
992+ <td class="collapse">{{ item.0.mode | file_mode }}</td>
993+ <td>
994+ <a href="/{{ collection }}/{{ name }}/commit/{{ item.1.id }}">{{ item.1.epoch | friendly_time }}</a>
995+ </td>
996+ </tr>
997+ {% endfor %}
998+ </tbody>
999+ </table>
1000+ </section>
1001+ {% if let Some(readme) = readme %}
1002+ <section class="raised">
1003+ {% if let Some(file_name) = rendered_file_name %}
1004+ <section class="flex-group info-bar">
1005+ <section>
1006+ {{ file_name }}
1007+ </section>
1008+ {% if let Some(rendered_file_size) = rendered_file_size %}
1009+ <section>
1010+ {{ rendered_file_size | human_bytes_i64 }}
1011+ </section>
1012+ {% endif %}
1013+ </section>
1014+ {% endif %}
1015+ <section id="readme" class="scrollable lower-half">
1016+ {{ readme | safe }}
1017+ </section>
1018+ {% endif %}
1019+ </section>
1020+ {% endblock %}
1021 diff --git a/scripts/format_all_templates.sh b/scripts/format_all_templates.sh
1022index f073a7c..04eb594 100755
1023--- a/scripts/format_all_templates.sh
1024+++ b/scripts/format_all_templates.sh
1025 @@ -1,3 +1,3 @@
1026 #!/bin/sh
1027 #
1028- find ./ayllu/themes -name '*.html' -exec djlint --reformat {} \;
1029+ find ./ayllu/templates -name '*.html' -exec djlint --reformat {} \;
1030 diff --git a/scripts/lint_all_templates.sh b/scripts/lint_all_templates.sh
1031index c6753f8..1265e14 100755
1032--- a/scripts/lint_all_templates.sh
1033+++ b/scripts/lint_all_templates.sh
1034 @@ -1,3 +1,3 @@
1035 #!/bin/sh
1036 #
1037- find ./ayllu/themes -name '*.html' -exec djlint {} \;
1038+ find ./ayllu/templates -name '*.html' -exec djlint {} \;