Feat: Update nav bar

This commit is contained in:
Bertrand Benjamin 2022-08-28 21:21:02 +02:00
parent f2adf72aa0
commit dc470aec10
4 changed files with 19 additions and 8 deletions

View File

@ -110,6 +110,11 @@ aside {
} }
nav { nav {
background-color: @navbar-bg;
h2 {
background-color: @navbar-bg;
margin-bottom: 0;
}
ul { ul {
padding-inline-start: 0px; padding-inline-start: 0px;
display: block; display: block;
@ -117,7 +122,6 @@ aside {
ul.toctree { ul.toctree {
li { li {
a { a {
background-color: @navbar-bg;
color: @navbar-text-color; color: @navbar-text-color;
border: none; border: none;
} }
@ -127,14 +131,16 @@ aside {
background-color: @navbar-toctree-l2-sel-bg; background-color: @navbar-toctree-l2-sel-bg;
color: @navbar-toctree-l2-sel-txt; color: @navbar-toctree-l2-sel-txt;
padding: 10px; padding: 10px;
border-left: solid 2px @orange;
} }
} }
li.current{ li.current{
a { a {
background-color: @navbar-toctree-l1-sel-bg; background-color: @navbar-toctree-l1-sel-bg;
border-bottom: solid 1px @light-grey;
border-left: solid 2px @grey;
color: @navbar-toctree-l1-sel-txt; color: @navbar-toctree-l1-sel-txt;
border-top: solid 1px @light-grey;
border-bottom: solid 1px @light-grey;
border-left: solid 2px @orange;
} }
a:hover { a:hover {
color: @orange; color: @orange;
@ -166,13 +172,14 @@ aside {
.tagcloud { .tagcloud {
h2 { h2 {
background-color: @sidebar-bg;
margin-bottom: 0; margin-bottom: 0;
background-color: @sidebar-bg;
} }
ul { ul {
list-style: none; list-style: none;
padding: 0; padding: 0;
margin: 10px;
} }
ul li { ul li {

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,7 @@
@white: #ffffff; @white: #ffffff;
@grey: #333333; @grey: #333333;
@light-grey: #eeeeee; @light-grey: #eeeeee;
@med-light-grey: #d9d8d8;
@med-grey: #999999; @med-grey: #999999;
@dark-grey: #242121; @dark-grey: #242121;
@ -20,7 +21,7 @@
@link-hover-color: @light-orange; @link-hover-color: @light-orange;
// Sidebar (aside) // Sidebar (aside)
@sidebar-bg: @grey; @sidebar-bg: @dark-grey;
@sidebar-text-color: @white; @sidebar-text-color: @white;
@sidebar-link-color: @white; @sidebar-link-color: @white;
@sidebar-link-hover-color: @light-grey; @sidebar-link-hover-color: @light-grey;
@ -28,8 +29,10 @@
// NavBar // NavBar
@navbar-bg: @dark-grey; @navbar-bg: @dark-grey;
@navbar-text-color: @white; @navbar-text-color: @white;
@navbar-toctree-l1-sel-bg: @dark-grey;
@navbar-toctree-l1-sel-txt: @light-grey; @navbar-toctree-l1-sel-bg: @med-light-grey;
@navbar-toctree-l1-sel-txt: @grey;
@navbar-toctree-l2-bg: @med-grey; @navbar-toctree-l2-bg: @med-grey;
@navbar-toctree-l2-txt: @grey; @navbar-toctree-l2-txt: @grey;
@navbar-toctree-l2-sel-bg: @light-grey; @navbar-toctree-l2-sel-bg: @light-grey;

View File

@ -1,4 +1,5 @@
<ul class="toctree"> <ul class="toctree">
<h2>Niveaux</h2>
{% for cat, articles in categories|sort %} {% for cat, articles in categories|sort %}
{% if (article and article.category == cat) or category == cat %} {% if (article and article.category == cat) or category == cat %}
<li class="toctree-l1 current"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | upper }}</a> <li class="toctree-l1 current"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | upper }}</a>