diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-31 00:35:29 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-31 00:35:29 +0800 |
commit | 1d36ef43c2d6c2f9b106821ac04552d359f47116 (patch) | |
tree | 561ebf98fde70403ba8416aa9fc15a46b928fe9f /templates/repo_index.tmpl | |
parent | mandoc in Makefile and forge.5 (diff) | |
download | forge-1d36ef43c2d6c2f9b106821ac04552d359f47116.tar.gz forge-1d36ef43c2d6c2f9b106821ac04552d359f47116.tar.zst forge-1d36ef43c2d6c2f9b106821ac04552d359f47116.zip |
Use ref_query for ?branch=x, etc
Diffstat (limited to 'templates/repo_index.tmpl')
-rw-r--r-- | templates/repo_index.tmpl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/templates/repo_index.tmpl b/templates/repo_index.tmpl index 767e0c8..6db5b05 100644 --- a/templates/repo_index.tmpl +++ b/templates/repo_index.tmpl @@ -3,6 +3,7 @@ SPDX-FileContributor: Runxi Yu <https://runxiyu.org> */}} {{- define "repo_index" -}} +{{- $root := . -}} <!DOCTYPE html> <html lang="en"> <head> @@ -14,13 +15,13 @@ <div class="padding-wrapper"> <ul class="nav-tabs-standalone"> <li class="nav-item active"> - <a class="nav-link" href="./">Summary</a> + <a class="nav-link" href="./{{- template "ref_query" $root -}}">Summary</a> </li> <li class="nav-item"> - <a class="nav-link" href="tree/">Tree</a> + <a class="nav-link" href="tree/{{- template "ref_query" $root -}}">Tree</a> </li> <li class="nav-item"> - <a class="nav-link" href="log/">Log</a> + <a class="nav-link" href="log/{{- template "ref_query" $root -}}">Log</a> </li> <li class="nav-item"> <a class="nav-link" href="branches/">Branches</a> @@ -84,7 +85,7 @@ <table id="recent-commits" class="wide"> <thead> <tr class="title-row"> - <th colspan="3">Recent commits (<a href="log/{{- if .ref_type -}}?{{- .ref_type -}}={{- .ref_name -}}{{- end -}}">see all</a>)</th> + <th colspan="3">Recent commits (<a href="log/{{- template "ref_query" $root -}}">see all</a>)</th> </tr> <tr> <th scope="col">Title</th> |