Add basic nav bars to web versions of the books

These are fixed on (portrait) tablet and mobile, static on desktop.
This commit is contained in:
Robin Whittleton 2021-07-25 13:00:21 +02:00 committed by Alex Cabal
parent b60d795e82
commit 8a13046496
2 changed files with 43 additions and 3 deletions

View file

@ -4,10 +4,42 @@ body{
font-family: Georgia, serif;
font-size: 18px;
padding: 0 3em;
margin: 3em auto;
margin: 6em auto 3em;
max-width: 55ch;
}
body > header{
position: absolute;
left: 0;
right: 0;
top: 0;
background: #fff;
border-bottom: 1px solid #999;
box-shadow: 0 0 3px #ccc;
}
@media(max-width: 96ch){
body > header{
position: fixed;
}
}
body > header ul{
display: flex;
justify-content: space-between;
list-style: none;
margin: 0;
padding: 0.5em 1em;
}
body > header li:first-child > a{
display: block;
width: 90px;
height: 21px;
background: no-repeat center/100% url(/images/logo-full.svg);
text-indent: -999em;
}
body > nav,
body > section,
body > article{
@ -43,7 +75,8 @@ nav[epub|type~="toc"] ol{
}
@media(prefers-color-scheme: dark){
body{
body,
body > header{
background: #222222;
color: #ffffff;
}
@ -61,6 +94,7 @@ nav[epub|type~="toc"] ol{
color: #dda0dd;
}
body > header li:first-child > a,
img[epub|type~="se:image.color-depth.black-on-transparent"]{
filter: invert(1);
}