Add partial styles.html in HTML5 template.

Avoid duplication in HTML templates by using styles.html partial.
Change indentation of styles in template.
This commit is contained in:
John MacFarlane 2019-09-04 17:33:59 -07:00
parent 75f6af5c12
commit bb362fd76c
18 changed files with 179 additions and 241 deletions

View file

@ -12,3 +12,8 @@ source-repository-package
type: git
location: https://github.com/jgm/pandoc-citeproc
tag: 63498fb22ae6f394f19f6d62312350b566c4aebd
source-repository-package
type: git
location: https://github.com/jgm/doctemplates
tag: 37ac859e3c88493ac62ce5f9e32a943d37529b98

View file

@ -13,19 +13,8 @@ $if(keywords)$
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$styles.html()$
</style>
$if(highlighting-css)$
<style>
$highlighting-css$
</style>
$endif$
$if(css)$
$for(css)$
<link rel="stylesheet" href="$css$">

View file

@ -15,19 +15,8 @@ $if(keywords)$
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$styles.html()$
</style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$" type="text/css" />
$endfor$

View file

@ -15,19 +15,8 @@ $if(keywords)$
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$styles.html()$
</style>
$if(highlighting-css)$
<style>
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$" />
$endfor$

View file

@ -19,19 +19,8 @@ $endif$
<link rel="stylesheet" href="$revealjs-url$/css/reset.css">
<link rel="stylesheet" href="$revealjs-url$/css/reveal.css">
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$styles.html()$
</style>
$if(highlighting-css)$
<style>
$highlighting-css$
</style>
$endif$
$if(theme)$
<link rel="stylesheet" href="$revealjs-url$/css/theme/$theme$.css" id="theme">
$else$

View file

@ -16,22 +16,11 @@ $if(keywords)$
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$styles.html()$
</style>
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<meta name="controlVis" content="hidden" />
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$" type="text/css" />
$endfor$

View file

@ -17,19 +17,8 @@ $if(keywords)$
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$styles.html()$
</style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
<link rel="stylesheet" type="text/css" media="screen, projection, print"
href="$slideous-url$/slideous.css" />
$for(css)$

View file

@ -17,19 +17,8 @@ $if(keywords)$
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$styles.html()$
</style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
<link rel="stylesheet" type="text/css" media="screen, projection, print"
href="$slidy-url$/styles/slidy.css" />
$for(css)$

View file

@ -0,0 +1,11 @@
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
$if(highlighting-css)$
$highlighting-css$
$endif$

View file

@ -41,6 +41,7 @@ description: Pandoc is a Haskell library for converting from one markup
only adding a reader or writer.
data-files:
-- templates
data/templates/styles.html
data/templates/default.html4
data/templates/default.html5
data/templates/default.docbook4

View file

@ -14,6 +14,8 @@ extra-deps:
# - pandoc-citeproc-0.16.2
- git: https://github.com/jgm/pandoc-citeproc
commit: 63498fb22ae6f394f19f6d62312350b566c4aebd
- git: https://github.com/jgm/doctemplates
commit: 37ac859e3c88493ac62ce5f9e32a943d37529b98
- pandoc-types-1.17.6
- ipynb-0.1
- cmark-gfm-0.2.0
@ -23,7 +25,7 @@ extra-deps:
- skylighting-core-0.8.2
- skylighting-0.8.2
- doclayout-0.1
- doctemplates-0.6
#- doctemplates-0.6
ghc-options:
"$locals": -fhide-source-paths -Wno-missing-home-modules
resolver: lts-13.17

View file

@ -10,8 +10,6 @@
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style>
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }

View file

@ -10,8 +10,6 @@
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style>
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }