[STYLE] Make navbar sticky

This commit is contained in:
Gregory Trolliet 2023-09-08 21:00:34 +02:00
parent 8e67ac8218
commit 7b2bd5a6da

View file

@ -14,6 +14,7 @@
--color03: #871818; --color03: #871818;
--image-margin-side: 2.5em; --image-margin-side: 2.5em;
--navigation-height: 4em;
--content-width: 900px; --content-width: 900px;
} }
@ -24,7 +25,7 @@
} }
html { html {
background-color: var(--background-color); background-color: var(--background-color);
font-family: Lato, Helvetica, sans-serif; font-family: serif;
font-size: medium; font-size: medium;
color: var(--font-color); color: var(--font-color);
} }
@ -86,9 +87,13 @@ a.not(.anchor):focus {
/******************* Navbar *******************/ /******************* Navbar *******************/
#navigation { #navigation {
height: 4em; position: fixed;
top: 0;
height: var(--navigation-height);
width: 100%; width: 100%;
line-height: 4em; line-height: var(--navigation-height);
background-color: var(--background-color);
z-index: 100;
} }
#navigation a { #navigation a {
padding: 1em; padding: 1em;
@ -302,6 +307,7 @@ a.not(.anchor):focus {
.container { .container {
max-width: 90vw; max-width: 90vw;
margin: 0 auto; margin: 0 auto;
margin-top: var(--navigation-height);
width: 100%; width: 100%;
display: flex; display: flex;
flex: 1; flex: 1;
@ -333,9 +339,24 @@ a.not(.anchor):focus {
} }
/******************* Archives List *******************/ /******************* Archives List *******************/
#blog-list {
max-width: 95vw;
}
.archives-list { .archives-list {
list-style: none; list-style: none;
padding-left: 0; padding-left: 0;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
justify-content: space-between;
gap: 1em;
}
.archives-list::after {
content: "";
flex: auto;
flex-basis: 20em;
} }
.archives-list .archive { .archives-list .archive {
display: block; display: block;
@ -343,6 +364,7 @@ a.not(.anchor):focus {
margin: 1em 0; margin: 1em 0;
overflow: auto; overflow: auto;
border: none; border: none;
width: 100%;
} }
.archives-list .archive:hover { .archives-list .archive:hover {
border: none; border: none;
@ -352,11 +374,13 @@ a.not(.anchor):focus {
} }
.archives-list .thumbnail { .archives-list .thumbnail {
display: inline-block; display: inline-block;
width: 15em; width: 100%;
text-align: left; text-align: left;
margin-right: 1.5em;
} }
@media only screen and (min-width: 768px) { @media only screen and (min-width: 768px) {
.archives-list .archive {
width: 48%;
}
.archives-list .thumbnail { .archives-list .thumbnail {
display: inline-block; display: inline-block;
text-align: right; text-align: right;
@ -378,6 +402,10 @@ a.not(.anchor):focus {
bottom: 0; bottom: 0;
right: 0; right: 0;
font-style: italic; font-style: italic;
display: none;
}
.archive:hover .more {
display: inherit;
} }
/******************* Letters *******************/ /******************* Letters *******************/