improve navbar on widescreen

This commit is contained in:
Alexis Fourmaux 2025-05-16 16:15:31 +02:00
parent 51d599eff6
commit dab83f64f5
4 changed files with 74 additions and 86 deletions

View file

@ -28,7 +28,7 @@
--mantle: #{light.$mantle};
--crust: #{light.$crust};
--main-width: min(700px, 95%);
--main-width: min(1000px, 95%);
--standard-border-radius: .8rem;
--text-font: "Ubuntu Nerd Font", Helvetica, sans-serif;
--title-font: "Ubuntu Nerd Font", Helvetica, sans-serif;

View file

@ -1,93 +1,75 @@
@mixin header_link($color, $hover-color) {
a {
color: $color;
text-decoration: none;
&:visited {
color: $color;
}
&:hover {
color: $hover-color;
}
}
}
header {
background-color: var(--crust);
margin-bottom: 3rem;
;
}
nav {
max-width: var(--main-width);
margin-left: auto;
margin-right: auto;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
flex-direction: row;
max-width: var(--main-width);
margin: 0 auto;
&>div {
vertical-align: middle;
.home-title {
flex: 3 auto;
font-size: 2.5rem;
font-weight: 100;
text-transform: uppercase;
@include header_link(var(--text), var(--text));
}
a {
text-decoration: none;
}
.nav-bar {
flex: 1 auto;
@include header_link(var(--text), var(--subtext0));
ul {
list-style-type: none;
padding: 0;
margin-top: 0;
margin-bottom: 0;
display: flex;
align-items: center;
justify-content: space-around;
list-style: none;
}
&.nav-title {
flex: 2 auto;
font-size: 2rem;
font-weight: 100;
text-transform: uppercase;
.nav-links {
margin-top: 0;
margin-bottom: 0;
font-size: 1.2rem;
text-transform: lowercase;
a {
color: var(--text);
&:visited {
color: var(--text);
}
&:hover {
color: var(--text);
}
}
}
&.nav-menus {
flex: 4 auto;
a {
color: var(--text);
&:visited {
color: var(--text);
}
&:hover {
color: var(--subtext0);
}
}
&>ul {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: space-around;
&>li {
flex: 1 auto;
padding: 0;
}
}
}
&.nav-widgets {
flex: 1 auto;
color: var(--text);
font-size: 1.5rem;
flex-wrap: wrap;
flex-direction: row;
justify-content: space-between;
li {
margin-left: .5rem;
margin-right: .5rem;
flex: 2 auto;
text-align: center;
}
.menu-icons-container {
flex: 1 auto;
}
.menu-icons-group {
color: var(--text);
justify-content: space-around;
}
}
}
}

View file

@ -29,11 +29,17 @@ body {
}
article {
max-width: var(--main-width);
max-width: calc(var(--main-width) - 12rem);
margin-left: auto;
margin-right: auto;
}
@media only screen and (max-width: 600px) {
article {
max-width: var(--main-width);
}
}
h1 {
font-size: 2rem;
font-weight: medium;