summary history branches tags files
commit:bdabfeb569ab7eb9a2bf27188b61544cb6460e41
author:Trevor Bentley
committer:Trevor Bentley
date:Mon Jan 30 00:57:41 2023 +0100
parents:6e273542669f336d4f0c0305e50b118b2634f8e4
sort branches and tags by date in default templates
diff --git a/templates/default_dark/branches.html b/templates/default_dark/branches.html
line changes: +1/-1
index 1e4c620..6860399
--- a/templates/default_dark/branches.html
+++ b/templates/default_dark/branches.html
@@ -19,7 +19,7 @@
     <th>Author</th>
     <th>Date</th>
   </tr>
-  {% for entry in branches -%}
+  {% for entry in branches | sort(attribute="ts_utc") | reverse -%}
   <tr class="branch">
     <td class="name"><a href="branch/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
     <td class="oid">{{entry.short_hash}}</td>

diff --git a/templates/default_dark/tags.html b/templates/default_dark/tags.html
line changes: +1/-1
index b959d1a..f779183
--- a/templates/default_dark/tags.html
+++ b/templates/default_dark/tags.html
@@ -19,7 +19,7 @@
     <th>Author</th>
     <th>Date</th>
   </tr>
-  {% for entry in tags -%}
+  {% for entry in tags | sort(attribute="ts_utc") | reverse -%}
   <tr class="tag">
     <td class="name"><a href="tag/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
     <td class="oid">{{entry.short_hash}}</td>

diff --git a/templates/default_light/branches.html b/templates/default_light/branches.html
line changes: +1/-1
index 1e4c620..6860399
--- a/templates/default_light/branches.html
+++ b/templates/default_light/branches.html
@@ -19,7 +19,7 @@
     <th>Author</th>
     <th>Date</th>
   </tr>
-  {% for entry in branches -%}
+  {% for entry in branches | sort(attribute="ts_utc") | reverse -%}
   <tr class="branch">
     <td class="name"><a href="branch/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
     <td class="oid">{{entry.short_hash}}</td>

diff --git a/templates/default_light/tags.html b/templates/default_light/tags.html
line changes: +1/-1
index b959d1a..f779183
--- a/templates/default_light/tags.html
+++ b/templates/default_light/tags.html
@@ -19,7 +19,7 @@
     <th>Author</th>
     <th>Date</th>
   </tr>
-  {% for entry in tags -%}
+  {% for entry in tags | sort(attribute="ts_utc") | reverse -%}
   <tr class="tag">
     <td class="name"><a href="tag/{{entry.full_hash}}.html">{{entry.ref_name}}</a></td>
     <td class="oid">{{entry.short_hash}}</td>