diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-31 11:55:15 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-31 11:55:15 +0800 |
commit | 7133932ac6b31530f009ba892e193d54116c7445 (patch) | |
tree | 841db35b37b39dd9ec476246b8107d6c5b1dbf94 /templates/repo_branches.tmpl | |
parent | Remove ? in builds.sr.ht URL (diff) | |
download | forge-7133932ac6b31530f009ba892e193d54116c7445.tar.gz forge-7133932ac6b31530f009ba892e193d54116c7445.tar.zst forge-7133932ac6b31530f009ba892e193d54116c7445.zip |
Add branches page
Diffstat (limited to 'templates/repo_branches.tmpl')
-rw-r--r-- | templates/repo_branches.tmpl | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/templates/repo_branches.tmpl b/templates/repo_branches.tmpl new file mode 100644 index 0000000..b06da10 --- /dev/null +++ b/templates/repo_branches.tmpl @@ -0,0 +1,66 @@ +{{/* + SPDX-License-Identifier: AGPL-3.0-only + SPDX-FileContributor: Runxi Yu <https://runxiyu.org> +*/}} +{{- define "repo_branches" -}} +{{- $root := . -}} +<!DOCTYPE html> +<html lang="en"> + <head> + {{- template "head_common" . -}} + <title>{{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> + </head> + <body class="repo-branches"> + {{- template "header" . -}} + <div class="repo-header"> + <h2>{{- .repo_name -}}</h2> + <ul class="nav-tabs-standalone"> + <li class="nav-item"> + <a class="nav-link" href="../{{- template "ref_query" $root -}}">Summary</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="../tree/{{- template "ref_query" $root -}}">Tree</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="../log/{{- template "ref_query" $root -}}">Log</a> + </li> + <li class="nav-item"> + <a class="nav-link active" href="../branches/">Branches</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="../tags/">Tags</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="../contrib/">Merge requests</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="../settings/">Settings</a> + </li> + </ul> + </div> + <div class="repo-header-extension"> + <div class="repo-header-extension-content"> + {{- .repo_description -}} + </div> + </div> + <div class="padding-wrapper"> + <table id="branches"> + <thead> + <tr class="title-row"> + <th colspan="1">Branches</th> + </tr> + </thead> + <tbody> + {{- range .branches -}} + <tr> + <td> + <a href="./?branch={{ . }}">{{ . }}</a> + </td> + </tr> + {{- end -}} + </tbody> + </table> + </div> + </body> +</html> +{{- end -}} |