From 7133932ac6b31530f009ba892e193d54116c7445 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 31 Mar 2025 11:55:15 +0800 Subject: Add branches page --- templates/repo_branches.tmpl | 66 ++++++++++++++++++++++++++++++++++++++++++++ templates/repo_index.tmpl | 47 +++++-------------------------- 2 files changed, 73 insertions(+), 40 deletions(-) create mode 100644 templates/repo_branches.tmpl (limited to 'templates') 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 +*/}} +{{- define "repo_branches" -}} +{{- $root := . -}} + + + + {{- template "head_common" . -}} + {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}} + + + {{- template "header" . -}} +
+

{{- .repo_name -}}

+ +
+
+
+ {{- .repo_description -}} +
+
+
+ + + + + + + + {{- range .branches -}} + + + + {{- end -}} + +
Branches
+ {{ . }} +
+
+ + +{{- end -}} diff --git a/templates/repo_index.tmpl b/templates/repo_index.tmpl index d07ebf5..4c0595e 100644 --- a/templates/repo_index.tmpl +++ b/templates/repo_index.tmpl @@ -43,47 +43,14 @@ {{- .repo_description -}} -
-
-
-
Repo info
-
Name
-
{{- .repo_name -}}
- {{- if .repo_description -}} -
Description
-
{{- .repo_description -}}
- {{- end -}} -
SSH remote
-
{{- .ssh_clone_url -}}
- {{- if .notes -}} -
Notes
-
-
    - {{- range .notes -}}
  • {{- . -}}
  • {{- end -}} -
-
- {{- end -}} -
-
-
-
- - - - - - - - {{- range .branches -}} - - - - {{- end -}} - -
Branches
- {{ . }} -
+ {{- if .notes -}} +
Notes
+
    + {{- range .notes -}}
  • {{- . -}}
  • {{- end -}} +
+ {{- end -}} +

{{- .ssh_clone_url -}}

{{- if .commits -}}
-- cgit v1.2.3