From e80e7c85f970467957f72934b06e79db23ee14fb Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 30 Mar 2025 00:58:32 +0800 Subject: [PATCH] Add basic tabs to repo index --- static/style.css | 32 +++++++++++++++++++++++++++++++- templates/repo_index.tmpl | 22 ++++++++++++++++++++++ diff --git a/static/style.css b/static/style.css index a53dc1777cce3c8608033000b50f51c84b74c560..8bfe35156f1df9da9ae1c4f64fd0cdca5b7178cb 100644 --- a/static/style.css +++ b/static/style.css @@ -345,7 +345,7 @@ } /* Header layout */ header#main-header { - background-color: var(--lighter-box-background-color); + /* background-color: var(--lighter-box-background-color); */ display: flex; flex-direction: row; align-items: center; @@ -353,6 +353,10 @@ justify-content: space-between; flex-wrap: wrap; padding: 0.625rem 1rem; gap: 0.5rem; +} +#main-header a, #main-header a:link, main-header a:visited { + text-decoration: none; + color: inherit; } #main-header-forge-title { white-space: nowrap; @@ -485,3 +489,29 @@ .key-val-grid-wrapper { max-width: 100%; width: fit-content; } + +.nav-tabs-standalone { + border: none; + list-style: none; + margin: 0; + flex-grow: 1; + display: inline-flex; + flex-wrap: nowrap; + padding: 0; + border-bottom: 0.25rem var(--lighter-box-background-color) solid; +} + +.nav-tabs-standalone li { + align-self: flex-end; + padding: 0 1rem; +} + +.nav-item.active { + font-weigt: bold; + background-color: var(--lighter-box-background-color); +} + +.nav-item a, .nav-item a:link, .nav-item a:visited { + text-decoration: none; + color: inherit; +} diff --git a/templates/repo_index.tmpl b/templates/repo_index.tmpl index cf4278680ea3d4dd58fd3a589379c7a1a268e679..6ccde83d5e69fd3759a1e64e846491f99de36d99 100644 --- a/templates/repo_index.tmpl +++ b/templates/repo_index.tmpl @@ -12,6 +12,28 @@ {{- template "header" . -}}
+ +
+
Repo info
-- 2.48.1