Make current tab bold

This commit is contained in:
Joscha 2023-08-05 21:17:46 +02:00
parent db814b6d40
commit 52e2d74b96
3 changed files with 7 additions and 2 deletions

View file

@ -18,6 +18,7 @@ struct Ref {
struct IndexTemplate {
base: String,
repo_name: String,
current: String,
refs: Vec<Ref>,
}
@ -43,6 +44,7 @@ pub async fn get(
Ok(IndexTemplate {
base: config.web.base(),
repo_name: config.repo.name(),
current: "index".to_string(),
refs,
})
}

View file

@ -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;
}

View file

@ -11,7 +11,7 @@
<body>
<nav>
<a href="{{ base }}/">
<a href="{{ base }}/" {% if current=="index" %} class="current" {% endif %}>
<img src="{{ base }}/logo.svg">
{{ repo_name }}
</a>