From 6d4d140058af748b03ce808a2bd4463ded2ec058 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 11 Feb 2025 23:55:26 +0800 Subject: *.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 +++ 7 files changed, 25 insertions(+) create mode 100644 templates/_repo_header.html.tmpl (limited to 'templates') diff --git a/templates/_repo_header.html.tmpl b/templates/_repo_header.html.tmpl new file mode 100644 index 0000000..1dd14f9 --- /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 13832a8..a09f7f2 100644 --- a/templates/repo_commit.html.tmpl +++ b/templates/repo_commit.html.tmpl @@ -6,6 +6,9 @@ {{ .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 2f41aac..47c6381 100644 --- a/templates/repo_index.html.tmpl +++ b/templates/repo_index.html.tmpl @@ -6,6 +6,9 @@ {{ .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 898a84a..9ef489e 100644 --- a/templates/repo_log.html.tmpl +++ b/templates/repo_log.html.tmpl @@ -6,6 +6,9 @@ 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 f55d8c8..055445d 100644 --- a/templates/repo_raw_dir.html.tmpl +++ b/templates/repo_raw_dir.html.tmpl @@ -6,6 +6,9 @@ {{ .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 aa457c4..07a8df5 100644 --- a/templates/repo_tree_dir.html.tmpl +++ b/templates/repo_tree_dir.html.tmpl @@ -6,6 +6,9 @@ {{ .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 0401bb0..cf82c44 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)

-- cgit v1.2.3