From 053efe176ee241c87c9e31c4e2bbd999f9f77bf2 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 13 Feb 2025 09:05:01 +0800 Subject: _header.html: Format the main header --- templates/_header.html.tmpl | 22 ++++++++++++---------- templates/group_repos.html.tmpl | 4 +--- templates/index.html.tmpl | 4 +--- templates/repo_commit.html.tmpl | 4 +--- templates/repo_index.html.tmpl | 4 +--- templates/repo_log.html.tmpl | 4 +--- templates/repo_raw_dir.html.tmpl | 4 +--- templates/repo_tree_dir.html.tmpl | 4 +--- templates/repo_tree_file.html.tmpl | 4 +--- 9 files changed, 20 insertions(+), 34 deletions(-) (limited to 'templates') diff --git a/templates/_header.html.tmpl b/templates/_header.html.tmpl index 7c0e4ea..7aebfbc 100644 --- a/templates/_header.html.tmpl +++ b/templates/_header.html.tmpl @@ -1,12 +1,14 @@ {{- define "header" -}} -
- Lindenii Forge -
-
- {{ if ne .user_id "" }} - {{ .username }} - {{ else }} - Login - {{ end }} -
+
+ +
+ {{ if ne .user_id "" }} + {{ .username }} + {{ else }} + Login + {{ end }} +
+
{{- end -}} diff --git a/templates/group_repos.html.tmpl b/templates/group_repos.html.tmpl index 1050ce4..c9c12fd 100644 --- a/templates/group_repos.html.tmpl +++ b/templates/group_repos.html.tmpl @@ -6,9 +6,7 @@ Repos in {{ .group_name }} – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}

Repos in {{ .group_name }} diff --git a/templates/index.html.tmpl b/templates/index.html.tmpl index a8ef445..50cd489 100644 --- a/templates/index.html.tmpl +++ b/templates/index.html.tmpl @@ -6,9 +6,7 @@ Index – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}

Lindenii Forge

diff --git a/templates/repo_commit.html.tmpl b/templates/repo_commit.html.tmpl index 6c064fc..4965d6e 100644 --- a/templates/repo_commit.html.tmpl +++ b/templates/repo_commit.html.tmpl @@ -6,9 +6,7 @@ {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}
{{ template "repo_header" . }}
diff --git a/templates/repo_index.html.tmpl b/templates/repo_index.html.tmpl index f77e10b..d799a22 100644 --- a/templates/repo_index.html.tmpl +++ b/templates/repo_index.html.tmpl @@ -6,9 +6,7 @@ {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}
{{ template "repo_header" . }}
diff --git a/templates/repo_log.html.tmpl b/templates/repo_log.html.tmpl index 3cc719e..34b7c45 100644 --- a/templates/repo_log.html.tmpl +++ b/templates/repo_log.html.tmpl @@ -6,9 +6,7 @@ Log of {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}
{{ template "repo_header" . }}
diff --git a/templates/repo_raw_dir.html.tmpl b/templates/repo_raw_dir.html.tmpl index a005a32..dc7bb98 100644 --- a/templates/repo_raw_dir.html.tmpl +++ b/templates/repo_raw_dir.html.tmpl @@ -6,9 +6,7 @@ {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}
{{ template "repo_header" . }}
diff --git a/templates/repo_tree_dir.html.tmpl b/templates/repo_tree_dir.html.tmpl index 5d2f632..73ea4cf 100644 --- a/templates/repo_tree_dir.html.tmpl +++ b/templates/repo_tree_dir.html.tmpl @@ -6,9 +6,7 @@ {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}
{{ template "repo_header" . }}
diff --git a/templates/repo_tree_file.html.tmpl b/templates/repo_tree_file.html.tmpl index 7b184e3..9f705c9 100644 --- a/templates/repo_tree_file.html.tmpl +++ b/templates/repo_tree_file.html.tmpl @@ -7,9 +7,7 @@ {{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }} – Lindenii Forge -
- {{ template "header" . }} -
+ {{ template "header" . }}
{{ template "repo_header" . }}
-- cgit v1.2.3