Skip to content

Commit

Permalink
Add CSS to default HTML template
Browse files Browse the repository at this point in the history
  • Loading branch information
mb21 committed Aug 9, 2020
1 parent 499fc11 commit ab72641
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions data/templates/default.html5
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,105 @@ $if(keywords)$
$endif$
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
<style>
html {
line-height: $if(linestretch)$$linestretch$$else$1.7$endif$;
font-family: $if(mainfont)$$mainfont$$else$Georgia, serif$endif$;
font-size: $if(fontsize)$$fontsize$$else$20px$endif$;
color: $if(fontcolor)$$fontcolor$$else$#1a1a1a$endif$;
background-color: $if(backgroundcolor)$$backgroundcolor$$else$#fdfdfd$endif$;
}
body {
margin: 0 auto;
max-width: 40em;
padding-left: $if(margin-left)$$margin-left$$else$50px$endif$;
padding-right: $if(margin-right)$$margin-right$$else$50px$endif$;
padding-top: $if(margin-top)$$margin-top$$else$50px$endif$;
padding-bottom: $if(margin-bottom)$$margin-bottom$$else$50px$endif$;
hyphens: auto;
word-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 1em;
}
}
p {
margin-top: 1.7em;
}
a {
color: $if(linkcolor)$$linkcolor$$else$#1a1a1a$endif$;
}
a::visited {
color: $if(linkcolor)$$linkcolor$$else$#1a1a1a$endif$;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.7em;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1.7em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1.7em 0 1.7em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
font-style: italic;
}
code {
font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, 'Lucida Console', Consolas, monospace$endif$;
background-color: #f0f0f0;
font-size: 85%;
margin: 0;
padding: .2em .4em;
}
pre {
line-height: 1.5em;
padding: 1em;
background-color: #f0f0f0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
}
hr {
background-color: #1a1a1a;
border: none;
height: 1px;
margin-top: 1.7em;
}
table {
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
}
th, td {
border-bottom: 1px solid lightgray;
padding: 1em 3em 1em 0;
}

/* Pandoc-specific elements */
header {
margin-bottom: 6em;
text-align: center;
}
nav a {
color: black;
}
nav a:not(:hover) {
text-decoration: none;
}
$style$
$styles.html()$
</style>
$for(css)$
Expand Down

0 comments on commit ab72641

Please sign in to comment.