mygit

[UNMAINTAINED] A cgit/webgit alternative, written in Rust
Log | Files | Refs | README | LICENSE

commit a6a9935291348bf6045eb8fea23568bc726b9f38
parent 8265b607e6d4b6ca45291af2b04dc73fa2c45368
Author: Johann150 <johann@qwertqwefsday.eu>
Date:   Sun, 18 Jul 2021 16:40:10 +0200

use commmit-tr template everywhere

Diffstat:
Mtemplates/log.html | 10++--------
Mtemplates/repo.html | 8+-------
2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/templates/log.html b/templates/log.html @@ -9,14 +9,8 @@ {% endif %} <h3>{{branch}}</h3> <table> - {% for commit in commits %} - <tr> - <td><a href="/{{repo|repo_name|urlencode_strict}}/commit/{{commit.id()}}" class="commit-hash">{{commit|short_id}}</a></td> - {% let summary = commit.summary().unwrap_or("")|truncate(72) %} - <td class="commit-summary">{{summary}}</td> - <td class="commit-author-email">{{commit.author()|signature_email_link|safe}}</td> - <td class="commit-date">{{commit.time()|format_datetime("%Y-%m-%d")}}</td> - </tr> + {% for commit in commits %} + {% include "commit-tr.html" %} {% endfor %} </table> {% if next_page.is_some() %} diff --git a/templates/repo.html b/templates/repo.html @@ -6,13 +6,7 @@ {% include "repo-navbar.html" %} <table> {% for commit in commits %} - <tr> - <td><a href="/{{repo|repo_name|urlencode_strict}}/commit/{{commit.id()}}" class="commit-hash">{{commit|short_id}}</a></td> - {% let summary = commit.summary().unwrap_or("")|truncate(72) %} - <td class="commit-summary">{{summary}}</td> - <td class="commit-author-email">{{commit.author()|signature_email_link|safe}}</td> - <td class="commit-date">{{commit.time()|format_datetime("%Y-%m-%d")}}</td> - </tr> + {% include "commit-tr.html" %} {% endfor %} <tr> <td colspan="4"><a href="/{{repo|repo_name|urlencode_strict}}/log/">...</a></td>