From 52e2d74b96bb563741583b21b6f3dd2dfb4b62e2 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 5 Aug 2023 21:17:46 +0200 Subject: [PATCH] Make current tab bold --- src/web/index.rs | 2 ++ static/base.css | 5 ++++- templates/base.html | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/web/index.rs b/src/web/index.rs index 4d8afba..a80a825 100644 --- a/src/web/index.rs +++ b/src/web/index.rs @@ -18,6 +18,7 @@ struct Ref { struct IndexTemplate { base: String, repo_name: String, + current: String, refs: Vec, } @@ -43,6 +44,7 @@ pub async fn get( Ok(IndexTemplate { base: config.web.base(), repo_name: config.repo.name(), + current: "index".to_string(), refs, }) } diff --git a/static/base.css b/static/base.css index 1c41648..4e764b5 100644 --- a/static/base.css +++ b/static/base.css @@ -23,7 +23,6 @@ nav>* { } nav> :first-child { - font-weight: bold; padding-left: 0; border: none; } @@ -34,6 +33,10 @@ nav> :last-child { border: none; } +nav>.current { + font-weight: bold; +} + nav a { color: black; } diff --git a/templates/base.html b/templates/base.html index 91a9c72..29905ac 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,7 +11,7 @@