mirror of
https://github.com/standardebooks/web.git
synced 2025-07-09 16:20:27 -04:00
Minor style tweaks
This commit is contained in:
parent
88e7f63486
commit
9204262bab
2 changed files with 8 additions and 8 deletions
|
@ -343,10 +343,10 @@ do
|
||||||
find "${workDir}"/src/epub \( -type d -name .git -prune \) -o -type f -name "*.xhtml" -print0 | xargs -0 sed --in-place --regexp-extended "s|<title>|<title>${workTitle} - |g"
|
find "${workDir}"/src/epub \( -type d -name .git -prune \) -o -type f -name "*.xhtml" -print0 | xargs -0 sed --in-place --regexp-extended "s|<title>|<title>${workTitle} - |g"
|
||||||
|
|
||||||
# Wrap book contents in a <main> tag
|
# Wrap book contents in a <main> tag
|
||||||
find "${workDir}"/src/epub \( -type d -name .git -prune \) -o -type f -name "*.xhtml" -print0 | xargs -0 sed --in-place --regexp-extended "s%<body([^>]*)>%<body><main\1>%; s%</body>%</main></body>%"
|
find "${workDir}"/src/epub \( -type d -name .git -prune \) -o -type f -name "*.xhtml" -print0 | xargs -0 sed --in-place --regexp-extended "s|<body([^>]*)>|<body><main\1>|; s|</body>|</main></body>|"
|
||||||
|
|
||||||
# Add the header nav to each page
|
# Add the header nav to each page
|
||||||
find "${workDir}"/src/epub \( -type d -name .git -prune \) -o -type f -name "*.xhtml" -print0 | xargs -0 sed --in-place --regexp-extended "s%<body([^>]*)>%<body\1><header><nav><ul><li><a href=\"/\">Standard Ebooks</a></li><li><a href=\"${bookUrl}\">Back to ebook</a></li><li><a href=\"${bookUrl}/text\">Table of contents</a></li></ul></nav></header>%"
|
find "${workDir}"/src/epub \( -type d -name .git -prune \) -o -type f -name "*.xhtml" -print0 | xargs -0 sed --in-place --regexp-extended "s|<body([^>]*)>|<body\1><header><nav><ul><li><a href=\"/\">Standard Ebooks</a></li><li><a href=\"${bookUrl}\">Back to ebook</a></li><li><a href=\"${bookUrl}/text\">Table of contents</a></li></ul></nav></header>|"
|
||||||
|
|
||||||
# Add a chapter navigation footer to each page
|
# Add a chapter navigation footer to each page
|
||||||
"${scriptsDir}"/inject-chapter-navigation-footer "${workDir}"/src/epub "${bookUrl}"
|
"${scriptsDir}"/inject-chapter-navigation-footer "${workDir}"/src/epub "${bookUrl}"
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
@namespace epub "http://www.idpf.org/2007/ops";
|
@namespace epub "http://www.idpf.org/2007/ops";
|
||||||
|
|
||||||
body{
|
body{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
font-family: "Georgia", serif;
|
font-family: "Georgia", serif;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main{
|
main{
|
||||||
|
flex-grow: 1;
|
||||||
margin: 5rem auto 3rem;
|
margin: 5rem auto 3rem;
|
||||||
max-width: 55ch;
|
max-width: 55ch;
|
||||||
padding: 0 3rem;
|
padding: 0 3rem;
|
||||||
width: calc(100% - 2 * 3rem); /* calc instead of box-sizing: border-box which would make max-width count padding */
|
width: calc(100% - 2 * 3rem); /* calc instead of box-sizing: border-box which would make max-width count padding */
|
||||||
flex-grow: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body > header{
|
body > header{
|
||||||
|
@ -34,7 +34,7 @@ body > header ul{
|
||||||
display: flex;
|
display: flex;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.5em 1em;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
body > header li{
|
body > header li{
|
||||||
|
@ -62,9 +62,9 @@ body > header li:first-child > a:hover{
|
||||||
body > footer ul{
|
body > footer ul{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
list-style: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body > footer li{
|
body > footer li{
|
||||||
|
@ -145,7 +145,7 @@ and will just drop this entire query together if it's included. */
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
[id]{
|
*[id]{
|
||||||
scroll-margin-top: 3em;
|
scroll-margin-top: 3em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue