From c9b4eee4c589b8b40c02d0c96f887ec991580a24 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 6 Apr 2025 09:33:11 +0800 Subject: Restructure static/templates into forged --- forged/templates/repo_index.tmpl | 94 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 forged/templates/repo_index.tmpl (limited to 'forged/templates/repo_index.tmpl') diff --git a/forged/templates/repo_index.tmpl b/forged/templates/repo_index.tmpl new file mode 100644 index 0000000..d040f3a --- /dev/null +++ b/forged/templates/repo_index.tmpl @@ -0,0 +1,94 @@ +{{/* + SPDX-License-Identifier: AGPL-3.0-only + SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu +*/}} +{{- define "repo_index" -}} +{{- $root := . -}} + + + + {{- template "head_common" . -}} + {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}} + + + {{- template "header" . -}} +
+

{{- .repo_name -}}

+ +
+
+
+ {{- .repo_description -}} +
+
+ {{- if .notes -}} +
Notes
+ + + {{- end -}} +

{{- .ssh_clone_url -}}

+ {{- if .ref_name -}} +

+ + Warning: Due to various recent migrations, viewing non-HEAD refs may be broken. + +

+ {{- end -}} + {{- if .commits -}} +
+ {{- range .commits -}} +
+
+ + {{- .Hash | printf "%.8s" -}} + +  — {{- .Author -}} + + {{- .Date -}} + +
+
{{- .Message | first_line -}}
+
+ {{- end -}} + {{- if dereference_error .commits_err -}} +
+ Error while obtaining commit log: {{ .commits_err }} +
+ {{- end -}} +
+ {{- end -}} + {{- if .readme -}} +
+ {{- .readme -}} +
+ {{- end -}} + + + +{{- end -}} -- cgit v1.2.3