From 34820abaa02bf1cb9d8f62d2dccdaf5ba3045c81 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 31 Mar 2025 00:40:00 +0800 Subject: [PATCH] Add repo tab navigation to all pages --- static/style.css | 2 ++ templates/repo_log.tmpl | 21 +++++++++++++++++++++ templates/repo_raw_dir.tmpl | 20 ++++++++++++++++++++ templates/repo_tree_dir.tmpl | 22 +++++++++++++++++++++- templates/repo_tree_file.tmpl | 20 ++++++++++++++++++++ diff --git a/static/style.css b/static/style.css index ecec229577edc4f3d8899d6c8e381aab8b6735ea..0776d40b943fd51d0688f7021f385f6458ec4492 100644 --- a/static/style.css +++ b/static/style.css @@ -490,6 +490,8 @@ max-width: 100%; width: fit-content; } +/* Tab navigation */ + .nav-tabs-standalone { border: none; list-style: none; diff --git a/templates/repo_log.tmpl b/templates/repo_log.tmpl index bd51f2d633cd9e5dc0a3bc5f00bbfd011cd6fd2e..b8f3563749963612e96b76f46d5a2da3f6610ab6 100644 --- a/templates/repo_log.tmpl +++ b/templates/repo_log.tmpl @@ -3,6 +3,7 @@ SPDX-License-Identifier: AGPL-3.0-only SPDX-FileContributor: Runxi Yu */}} {{- define "repo_log" -}} +{{- $root := . -}} @@ -11,6 +12,26 @@ Log – {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}} {{- template "header" . -}} +
diff --git a/templates/repo_raw_dir.tmpl b/templates/repo_raw_dir.tmpl index fdeb016a4e90146fc5d80a2da511f04ac952f22d..1b9f59b52633fcb122b7dcc52be780f74351acd8 100644 --- a/templates/repo_raw_dir.tmpl +++ b/templates/repo_raw_dir.tmpl @@ -13,6 +13,26 @@ {{- template "header" . -}}
+
diff --git a/templates/repo_tree_dir.tmpl b/templates/repo_tree_dir.tmpl index 40bbf54294e35fca9095fdd827099c68577ca6b6..cf942039c4aa3f28ee66efc16472ee6662142051 100644 --- a/templates/repo_tree_dir.tmpl +++ b/templates/repo_tree_dir.tmpl @@ -3,7 +3,7 @@ SPDX-License-Identifier: AGPL-3.0-only SPDX-FileContributor: Runxi Yu */}} {{- define "repo_tree_dir" -}} -{{ $root := . }} +{{- $root := . -}} @@ -13,6 +13,26 @@ {{- template "header" . -}}
+
diff --git a/templates/repo_tree_file.tmpl b/templates/repo_tree_file.tmpl index 037a5af2cf6f6cf47e00f4c2942a38703a7eeca7..aa1c020027caa274d4b2644e78d9a753a1228550 100644 --- a/templates/repo_tree_file.tmpl +++ b/templates/repo_tree_file.tmpl @@ -14,6 +14,26 @@ {{- template "header" . -}}
+

/{{ .path_spec }} (raw)

-- 2.48.1