From 6d4d140058af748b03ce808a2bd4463ded2ec058 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 11 Feb 2025 23:55:26 +0800 Subject: [PATCH] *.html: Add a simple repo header --- templates/_repo_header.html.tmpl | 7 +++++++ templates/repo_commit.html.tmpl | 3 +++ templates/repo_index.html.tmpl | 3 +++ templates/repo_log.html.tmpl | 3 +++ templates/repo_raw_dir.html.tmpl | 3 +++ templates/repo_tree_dir.html.tmpl | 3 +++ templates/repo_tree_file.html.tmpl | 3 +++ diff --git a/templates/_repo_header.html.tmpl b/templates/_repo_header.html.tmpl new file mode 100644 index 0000000000000000000000000000000000000000..1dd14f93fd06860e59ef6a19216f1071c91b13cc --- /dev/null +++ b/templates/_repo_header.html.tmpl @@ -0,0 +1,7 @@ +{{- define "repo_header" -}} +{{ .group_name }} +/ +repos +/ +{{ .repo_name }} +{{- end -}} diff --git a/templates/repo_commit.html.tmpl b/templates/repo_commit.html.tmpl index 13832a8b000cf3bcce30218fd4506cdb065e3f7a..a09f7f2d9209f07a78e1059b599097272d9fb99b 100644 --- a/templates/repo_commit.html.tmpl +++ b/templates/repo_commit.html.tmpl @@ -6,6 +6,9 @@ {{ template "head_common" . }} {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge +
+ {{ template "repo_header" . }} +
diff --git a/templates/repo_index.html.tmpl b/templates/repo_index.html.tmpl index 2f41aacf6d7442e80e83136bcb3bc1efff360ad3..47c6381236e9039aab5b21dda033d5e5874d3697 100644 --- a/templates/repo_index.html.tmpl +++ b/templates/repo_index.html.tmpl @@ -6,6 +6,9 @@ {{ template "head_common" . }} {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge +
+ {{ template "repo_header" . }} +
diff --git a/templates/repo_log.html.tmpl b/templates/repo_log.html.tmpl index 898a84a35d9bdb220b876471de15cd75aff801b5..9ef489e5ab3b03129eaccad1480464660afab41d 100644 --- a/templates/repo_log.html.tmpl +++ b/templates/repo_log.html.tmpl @@ -6,6 +6,9 @@ {{ template "head_common" . }} Log of {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge +
+ {{ template "repo_header" . }} +
diff --git a/templates/repo_raw_dir.html.tmpl b/templates/repo_raw_dir.html.tmpl index f55d8c86e65369be5b1ec79803c4c5ae76dd1e10..055445d34f7e9fa9315d29e6b27fa3a06f4b1b87 100644 --- a/templates/repo_raw_dir.html.tmpl +++ b/templates/repo_raw_dir.html.tmpl @@ -6,6 +6,9 @@ {{ template "head_common" . }} {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – Lindenii Forge +
+ {{ template "repo_header" . }} +
diff --git a/templates/repo_tree_dir.html.tmpl b/templates/repo_tree_dir.html.tmpl index aa457c4312a6f5bfb2fd12eff9f5c4dd46098f22..07a8df5453d2d9e6bfdb6a469f25a4a1d2fee4a4 100644 --- a/templates/repo_tree_dir.html.tmpl +++ b/templates/repo_tree_dir.html.tmpl @@ -6,6 +6,9 @@ {{ template "head_common" . }} {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – Lindenii Forge +
+ {{ template "repo_header" . }} +
diff --git a/templates/repo_tree_file.html.tmpl b/templates/repo_tree_file.html.tmpl index 0401bb07eaf85aa9251347329e3e62d8647585a4..cf82c44506078b8bd06d0a1a70cb9a1922faae72 100644 --- a/templates/repo_tree_file.html.tmpl +++ b/templates/repo_tree_file.html.tmpl @@ -7,6 +7,9 @@ {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }} – Lindenii Forge +
+ {{ template "repo_header" . }} +

/{{ .path_spec }} (raw)

-- 2.48.1