aboutsummaryrefslogtreecommitdiff
path: root/forged/templates/repo_branches.tmpl
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-06 09:33:11 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-06 09:34:06 +0800
commitc9b4eee4c589b8b40c02d0c96f887ec991580a24 (patch)
tree0ab3f2a22e9c4ca430573559d5712a4a7a6903a3 /forged/templates/repo_branches.tmpl
parentMove the Go stuff to ./forged/ (diff)
downloadforge-c9b4eee4c589b8b40c02d0c96f887ec991580a24.tar.gz
forge-c9b4eee4c589b8b40c02d0c96f887ec991580a24.tar.zst
forge-c9b4eee4c589b8b40c02d0c96f887ec991580a24.zip
Restructure static/templates into forged
Diffstat (limited to 'forged/templates/repo_branches.tmpl')
-rw-r--r--forged/templates/repo_branches.tmpl71
1 files changed, 71 insertions, 0 deletions
diff --git a/forged/templates/repo_branches.tmpl b/forged/templates/repo_branches.tmpl
new file mode 100644
index 0000000..55ea0a6
--- /dev/null
+++ b/forged/templates/repo_branches.tmpl
@@ -0,0 +1,71 @@
+{{/*
+ SPDX-License-Identifier: AGPL-3.0-only
+ SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
+*/}}
+{{- define "repo_branches" -}}
+{{- $root := . -}}
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ {{- template "head_common" . -}}
+ <title>{{ .repo_name }} &ndash; {{ template "group_path_plain" .group_path }} &ndash; {{ .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">
+ <p>
+ <strong>
+ Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
+ </strong>
+ </p>
+ <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 -}}