diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-11 23:55:26 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-11 23:55:26 +0800 |
commit | 6d4d140058af748b03ce808a2bd4463ded2ec058 (patch) | |
tree | fd9cc2f1a247545fabdbb79712c346b3e38347eb /templates | |
parent | repo_commit: Reformat (diff) | |
download | forge-6d4d140058af748b03ce808a2bd4463ded2ec058.tar.gz forge-6d4d140058af748b03ce808a2bd4463ded2ec058.tar.zst forge-6d4d140058af748b03ce808a2bd4463ded2ec058.zip |
*.html: Add a simple repo header
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_repo_header.html.tmpl | 7 | ||||
-rw-r--r-- | templates/repo_commit.html.tmpl | 3 | ||||
-rw-r--r-- | templates/repo_index.html.tmpl | 3 | ||||
-rw-r--r-- | templates/repo_log.html.tmpl | 3 | ||||
-rw-r--r-- | templates/repo_raw_dir.html.tmpl | 3 | ||||
-rw-r--r-- | templates/repo_tree_dir.html.tmpl | 3 | ||||
-rw-r--r-- | templates/repo_tree_file.html.tmpl | 3 |
7 files changed, 25 insertions, 0 deletions
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" -}} +<a href="/g/{{ .group_name }}/">{{ .group_name }}</a> +/ +<a href="/g/{{ .group_name }}/repos/">repos</a> +/ +<a href="/g/{{ .group_name }}/repos/{{ .repo_name }}/">{{ .repo_name }}</a> +{{- 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 @@ <title>{{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge</title> </head> <body class="repo-commit"> + <header> + {{ template "repo_header" . }} + </header> <div class="padding-wrapper scroll"> <table id="commit-info-table"> <thead> 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 @@ <title>{{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge</title> </head> <body class="repo-index"> + <header> + {{ template "repo_header" . }} + </header> <div class="padding-wrapper scroll"> <input id="toggle-table-recent-commits" type="checkbox" class="toggle-table-off" /> <table id="recent-commits" class="wide"> 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 @@ <title>Log of {{ .group_name }}/repos/{{ .repo_name }} – Lindenii Forge</title> </head> <body class="repo-log"> + <header> + {{ template "repo_header" . }} + </header> <table id="commits" class="wide"> <thead> <tr class="title-row"> 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 @@ <title>{{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – Lindenii Forge</title> </head> <body class="repo-raw-dir"> + <header> + {{ template "repo_header" . }} + </header> <div class="padding-wrapper scroll"> <table id="file-tree" class="wide"> <thead> 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 @@ <title>{{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} – Lindenii Forge</title> </head> <body class="repo-tree-dir"> + <header> + {{ template "repo_header" . }} + </header> <div class="padding-wrapper scroll"> <table id="file-tree" class="wide"> <thead> 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 @@ <title>{{ .group_name }}/repos/{{ .repo_name }}/{{ .path_spec }} – Lindenii Forge</title> </head> <body class="repo-tree-file"> + <header> + {{ template "repo_header" . }} + </header> <p> /{{ .path_spec }} (<a href="/g/{{ .group_name }}/repos/{{ .repo_name }}/raw/{{ .path_spec }}?{{ .ref_type }}={{ .ref }}">raw</a>) </p> |