electric-book-classic-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +21 -0
- data/README.md +66 -0
- data/_includes/close-body.html +3 -0
- data/_includes/close-wrapper.html +2 -0
- data/_includes/footer.html +10 -0
- data/_includes/head.html +109 -0
- data/_includes/nav.html +27 -0
- data/_includes/start-wrapper.html +1 -0
- data/_layouts/default.html +26 -0
- data/_layouts/min.html +7 -0
- data/_sass/epub.scss +76 -0
- data/_sass/js/index.js +8 -0
- data/_sass/mods/print-no-bleed.css +7 -0
- data/_sass/mods/print-no-crop-marks.css +6 -0
- data/_sass/mods/print-page-setup-lightning-source-colour.css +31 -0
- data/_sass/partials/_epub-base-typography.scss +118 -0
- data/_sass/partials/_epub-bibliographies.scss +20 -0
- data/_sass/partials/_epub-boxes.scss +24 -0
- data/_sass/partials/_epub-buttons.scss +21 -0
- data/_sass/partials/_epub-copyright-page.scss +14 -0
- data/_sass/partials/_epub-cover.scss +24 -0
- data/_sass/partials/_epub-dedications.scss +17 -0
- data/_sass/partials/_epub-epigraphs.scss +30 -0
- data/_sass/partials/_epub-figures.scss +40 -0
- data/_sass/partials/_epub-fitting.scss +16 -0
- data/_sass/partials/_epub-glossary.scss +15 -0
- data/_sass/partials/_epub-index.scss +21 -0
- data/_sass/partials/_epub-maths.scss +9 -0
- data/_sass/partials/_epub-notes.scss +33 -0
- data/_sass/partials/_epub-openers.scss +8 -0
- data/_sass/partials/_epub-pullquotes.scss +16 -0
- data/_sass/partials/_epub-quotations.scss +5 -0
- data/_sass/partials/_epub-reset-sequences.scss +31 -0
- data/_sass/partials/_epub-smallcaps.scss +21 -0
- data/_sass/partials/_epub-tables.scss +45 -0
- data/_sass/partials/_epub-title-page.scss +34 -0
- data/_sass/partials/_epub-toc.scss +41 -0
- data/_sass/partials/_epub-valedictions.scss +8 -0
- data/_sass/partials/_epub-verse.scss +138 -0
- data/_sass/partials/_epub-wrappers.scss +12 -0
- data/_sass/partials/_hide-footer.scss +7 -0
- data/_sass/partials/_hide-nav-bar.scss +7 -0
- data/_sass/partials/_print-base-typography.scss +153 -0
- data/_sass/partials/_print-bibliographies.scss +20 -0
- data/_sass/partials/_print-boxes.scss +39 -0
- data/_sass/partials/_print-code.scss +19 -0
- data/_sass/partials/_print-copyright-page.scss +23 -0
- data/_sass/partials/_print-dedications.scss +11 -0
- data/_sass/partials/_print-definition-lists.scss +13 -0
- data/_sass/partials/_print-epigraphs.scss +24 -0
- data/_sass/partials/_print-figures.scss +97 -0
- data/_sass/partials/_print-fitting.scss +38 -0
- data/_sass/partials/_print-front-cover.scss +26 -0
- data/_sass/partials/_print-hide-non-printing.scss +8 -0
- data/_sass/partials/_print-hide-video.scss +7 -0
- data/_sass/partials/_print-hyphenation.scss +18 -0
- data/_sass/partials/_print-index.scss +30 -0
- data/_sass/partials/_print-maths.scss +5 -0
- data/_sass/partials/_print-notes.scss +40 -0
- data/_sass/partials/_print-openers.scss +14 -0
- data/_sass/partials/_print-page-break-tools.scss +46 -0
- data/_sass/partials/_print-page-headers-footers-content.scss +236 -0
- data/_sass/partials/_print-page-headers-footers-style.scss +150 -0
- data/_sass/partials/_print-page-setup.scss +43 -0
- data/_sass/partials/_print-page-start-depth.scss +4 -0
- data/_sass/partials/_print-pdf-view.scss +42 -0
- data/_sass/partials/_print-pullquotes.scss +13 -0
- data/_sass/partials/_print-quotations.scss +6 -0
- data/_sass/partials/_print-reset-sequences.scss +27 -0
- data/_sass/partials/_print-smallcaps.scss +29 -0
- data/_sass/partials/_print-start-on-recto-or-verso.scss +28 -0
- data/_sass/partials/_print-tables.scss +48 -0
- data/_sass/partials/_print-title-pages.scss +59 -0
- data/_sass/partials/_print-toc.scss +57 -0
- data/_sass/partials/_print-valedictions.scss +9 -0
- data/_sass/partials/_print-verse.scss +141 -0
- data/_sass/partials/_web-base-typography.scss +106 -0
- data/_sass/partials/_web-bibliographies.scss +20 -0
- data/_sass/partials/_web-boxes.scss +30 -0
- data/_sass/partials/_web-buttons.scss +21 -0
- data/_sass/partials/_web-code.scss +19 -0
- data/_sass/partials/_web-copyright-page.scss +14 -0
- data/_sass/partials/_web-cover.scss +33 -0
- data/_sass/partials/_web-dedications.scss +17 -0
- data/_sass/partials/_web-definition-lists.scss +12 -0
- data/_sass/partials/_web-epigraphs.scss +31 -0
- data/_sass/partials/_web-figures.scss +55 -0
- data/_sass/partials/_web-fitting.scss +16 -0
- data/_sass/partials/_web-footer.scss +38 -0
- data/_sass/partials/_web-index.scss +21 -0
- data/_sass/partials/_web-maths.scss +9 -0
- data/_sass/partials/_web-nav-bar.scss +70 -0
- data/_sass/partials/_web-notes.scss +58 -0
- data/_sass/partials/_web-openers.scss +5 -0
- data/_sass/partials/_web-pullquotes.scss +9 -0
- data/_sass/partials/_web-quotations.scss +6 -0
- data/_sass/partials/_web-reset-sequences.scss +27 -0
- data/_sass/partials/_web-smallcaps.scss +21 -0
- data/_sass/partials/_web-tables.scss +45 -0
- data/_sass/partials/_web-title-page.scss +35 -0
- data/_sass/partials/_web-toc.scss +41 -0
- data/_sass/partials/_web-valedictions.scss +9 -0
- data/_sass/partials/_web-verse.scss +138 -0
- data/_sass/partials/_web-video.scss +24 -0
- data/_sass/partials/_web-wrappers.scss +14 -0
- data/_sass/print-pdf.scss +194 -0
- data/_sass/screen-pdf.scss +216 -0
- data/_sass/web.scss +98 -0
- data/electric-book-classic-theme.gemspec +19 -0
- data/index.md +7 -0
- data/screenshot.png +0 -0
- metadata +208 -0
@@ -0,0 +1,23 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright page
|
3
|
+
*/
|
4
|
+
|
5
|
+
.copyright-page {
|
6
|
+
position: absolute;
|
7
|
+
bottom: 0;
|
8
|
+
}
|
9
|
+
.copyright-page h1 {
|
10
|
+
font-size: $font-size-default * 0.8;
|
11
|
+
line-height: $line-height-default * 0.8;
|
12
|
+
margin: $line-height-default 0;
|
13
|
+
letter-spacing: 0.025em;
|
14
|
+
font-variant: prince-opentype(c2sc, smcp, onum);
|
15
|
+
text-align: left;
|
16
|
+
}
|
17
|
+
.copyright-page p, .copyright-page li {
|
18
|
+
margin: 0 0 ($line-height-default * 0.8) 0;
|
19
|
+
text-indent: 0;
|
20
|
+
font-size: $font-size-default * 0.8;
|
21
|
+
line-height: $line-height-default * 0.8;
|
22
|
+
hyphens: none; /* Prince will not hyphenate here */
|
23
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Definition lists used in a simple glossary
|
2
|
+
// Note dl rules are also defined in base typography
|
3
|
+
|
4
|
+
.glossary dl, dl.glossary {
|
5
|
+
color: inherit;
|
6
|
+
}
|
7
|
+
.glossary dt {
|
8
|
+
float: left;
|
9
|
+
color: inherit;
|
10
|
+
}
|
11
|
+
.glossary dt:after {
|
12
|
+
content: ":\00a0";
|
13
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// Epigraphs
|
2
|
+
|
3
|
+
p.epigraph {
|
4
|
+
font-style: italic;
|
5
|
+
text-indent: 0;
|
6
|
+
padding: 0 ($line-height-default * 4);
|
7
|
+
max-width: 20em;
|
8
|
+
}
|
9
|
+
p.epigraph-source {
|
10
|
+
text-indent: 0;
|
11
|
+
padding: 0 ($line-height-default * 4);
|
12
|
+
max-width: 20em;
|
13
|
+
letter-spacing: 0.025em;
|
14
|
+
font-variant: prince-opentype(c2sc, smcp, onum);
|
15
|
+
font-style: inherit;
|
16
|
+
page-break-before: avoid;
|
17
|
+
}
|
18
|
+
p.epigraph-source:before {
|
19
|
+
content: ""; // E.g. add a — before
|
20
|
+
}
|
21
|
+
.epigraph-source + p, .dedication + p { /* Paragraphs after epigraphs and dedications should be flush left after space. */
|
22
|
+
text-indent: 0;
|
23
|
+
margin-top: $line-height-default;
|
24
|
+
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
// Figures. Note: we use the blockquote element to wrap figures and their captions in valid XHTML.
|
2
|
+
// Use the .figure class for the blockquote wrapping an image and a caption.
|
3
|
+
// Add .fixed, .small and/or .large for layout and size options.
|
4
|
+
|
5
|
+
blockquote.figure {
|
6
|
+
clear: both;
|
7
|
+
float: top; // By default all figures float to the tops of their pages
|
8
|
+
page-break-inside: avoid;
|
9
|
+
background-color: inherit;
|
10
|
+
font-size: inherit;
|
11
|
+
font-weight: inherit;
|
12
|
+
color: inherit;
|
13
|
+
margin: 0 0 $line-height-default 0;
|
14
|
+
padding: 0;
|
15
|
+
width: 100%;
|
16
|
+
box-sizing: border-box;
|
17
|
+
}
|
18
|
+
|
19
|
+
// Experimental. Effectively overrides 'unless-fit' to reduce ugly instances
|
20
|
+
// of indented images in lists beside floated, non-indented images.
|
21
|
+
ol li blockquote.figure, ul li blockquote.figure {
|
22
|
+
display: inline-block;
|
23
|
+
}
|
24
|
+
|
25
|
+
// Fix figures in place, for when they must keep their position in the text flow,
|
26
|
+
// and not float to the top of the page.
|
27
|
+
.figure.fixed {
|
28
|
+
clear: both;
|
29
|
+
float: none;
|
30
|
+
margin-top: $line-height-default;
|
31
|
+
}
|
32
|
+
|
33
|
+
// The p (some with child img) elements inside the figure
|
34
|
+
.figure p {
|
35
|
+
clear: both;
|
36
|
+
page-break-inside: avoid;
|
37
|
+
page-break-before: avoid;
|
38
|
+
text-align: center;
|
39
|
+
text-indent: 0;
|
40
|
+
}
|
41
|
+
|
42
|
+
// The image(s) in the figure
|
43
|
+
.figure p img {
|
44
|
+
width: auto;
|
45
|
+
max-width: 100%;
|
46
|
+
max-height: 100%; // Prevents image from expanding below a parent p set to a specific height
|
47
|
+
margin: 0 auto 0 auto;
|
48
|
+
}
|
49
|
+
|
50
|
+
// The caption (always the last paragraph in the figure)
|
51
|
+
// Note doesn't allow for multi-para captions – have to use line breaks :(
|
52
|
+
.figure p:last-of-type {
|
53
|
+
padding: ($line-height-default / 2) 0 ($line-height-default / 2) 0;
|
54
|
+
margin: 0;
|
55
|
+
text-align: center;
|
56
|
+
text-indent: 0;
|
57
|
+
font-style: italic;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Emphasis inside the italic caption
|
61
|
+
.figure p:last-of-type em {
|
62
|
+
font-style: initial;
|
63
|
+
}
|
64
|
+
|
65
|
+
// Image size options
|
66
|
+
// These need to be deprecated in favour of a multiple-based system.
|
67
|
+
.figure.x-small p img {
|
68
|
+
width: auto;
|
69
|
+
max-height: 30mm;
|
70
|
+
}
|
71
|
+
.figure.small p img {
|
72
|
+
width: auto;
|
73
|
+
max-height: 45mm;
|
74
|
+
}
|
75
|
+
.figure.medium p img {
|
76
|
+
width: auto;
|
77
|
+
max-height: 65mm;
|
78
|
+
}
|
79
|
+
.figure.large {
|
80
|
+
float: none;
|
81
|
+
page-break-before: always;
|
82
|
+
}
|
83
|
+
.figure.large img {
|
84
|
+
max-height: 150mm;
|
85
|
+
max-width: 100%;
|
86
|
+
width: auto;
|
87
|
+
}
|
88
|
+
|
89
|
+
// Paragraphs that follow figures should:
|
90
|
+
// have an indent when following floated figures
|
91
|
+
// not have an indent when following fixed figures.
|
92
|
+
blockquote.figure + p {
|
93
|
+
text-indent: $line-height-default;
|
94
|
+
}
|
95
|
+
blockquote.figure.fixed + p {
|
96
|
+
text-indent: 0;
|
97
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/* Typographic control for fitting text and elements */
|
2
|
+
|
3
|
+
// Float an element, like a box, to the top of bottom of a page (print only)
|
4
|
+
.float-top#{$edition-suffix} {
|
5
|
+
float: top;
|
6
|
+
}
|
7
|
+
.float-bottom#{$edition-suffix} {
|
8
|
+
float: bottom;
|
9
|
+
}
|
10
|
+
.float-top#{$edition-suffix} + p, .float-bottom#{$edition-suffix} + p {
|
11
|
+
text-indent: $line-height-default; // If a paragraph would normally be flush left after an element, but that element is floated away, it should get its indent back.
|
12
|
+
}
|
13
|
+
|
14
|
+
// These classes control letter-spacing (tracking), usually to save widows and orphans.
|
15
|
+
@for $i from 1 through 100 {
|
16
|
+
$add-space: $i * 0.001em;
|
17
|
+
.tighten-#{$i}#{$edition-suffix} {
|
18
|
+
letter-spacing: $letter-spacing-text - $add-space;
|
19
|
+
font-style: inherit;
|
20
|
+
background-color: $highlight-tightened;
|
21
|
+
}
|
22
|
+
.loosen-#{$i}#{$edition-suffix} {
|
23
|
+
letter-spacing: $letter-spacing-text + $add-space;
|
24
|
+
font-style: inherit;
|
25
|
+
background-color: $highlight-loosened;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
// These classes set the height of any element relative to the $line-height-default.
|
30
|
+
// Especially useful for controlling the height of images to retain a baseline grid.
|
31
|
+
// $line-height-default should be set in a non-relative unit, like points,
|
32
|
+
// otherwise you'll get exponential differences in height.
|
33
|
+
@for $i from 1 through 100 {
|
34
|
+
$height: $i * $line-height-default;
|
35
|
+
.height-#{$i}#{$edition-suffix} {
|
36
|
+
height: $height;
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Cover-page styling. Creates a single-page low-res cover for web PDFs.
|
2
|
+
@page cover {
|
3
|
+
margin: 0;
|
4
|
+
}
|
5
|
+
body.cover, div.cover {
|
6
|
+
margin: 0;
|
7
|
+
padding: 0;
|
8
|
+
}
|
9
|
+
p.cover {
|
10
|
+
margin: 0;
|
11
|
+
padding: 0;
|
12
|
+
text-indent: 0;
|
13
|
+
}
|
14
|
+
img.cover {
|
15
|
+
height: 100%;
|
16
|
+
width: 100%;
|
17
|
+
}
|
18
|
+
|
19
|
+
// Add extra verso to retain correct folios
|
20
|
+
body.cover {
|
21
|
+
page-break-after: left;
|
22
|
+
}
|
23
|
+
|
24
|
+
// Also see:
|
25
|
+
// _print-page-break-tools.scss
|
26
|
+
// _print-start-on-recto-and-verso
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// Hide screen-only and non-printing elements.
|
2
|
+
// By default we add the .non-printing class to screen-only elements like #nav-bar and #footer.
|
3
|
+
|
4
|
+
.non-printing, // Anything marked tagged .non-printing
|
5
|
+
.sigil_split_marker // Split-markers for epub output with Sigil
|
6
|
+
{
|
7
|
+
display: none;
|
8
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/* Hyphenation */
|
2
|
+
|
3
|
+
// Basic hyphenation variables
|
4
|
+
p, ul, ol, dl {
|
5
|
+
hyphens: $hyphenation;
|
6
|
+
hyphenate-after: $hyphenate-after; // Minimum letters on new line after hyphen
|
7
|
+
hyphenate-before: $hyphenate-before; // Minimum letters at end of line before hyphen
|
8
|
+
hyphenate-lines: $hyphenate-lines; // Maximum number of consecutive lines ending with hyphens
|
9
|
+
}
|
10
|
+
|
11
|
+
// Is a hyphenation dictionary specified?
|
12
|
+
// If not, don't use one, and let Prince use its default.
|
13
|
+
p, ul, ol, dl {
|
14
|
+
@if $hyphenation-dictionary == "" {}
|
15
|
+
@else {
|
16
|
+
prince-hyphenate-patterns: url("dictionaries/#{$hyphenation-dictionary}");
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
// Index
|
2
|
+
.reference-index {
|
3
|
+
columns: 2;
|
4
|
+
font-size: $font-size-default * 0.8;
|
5
|
+
}
|
6
|
+
.reference-index li {
|
7
|
+
list-style-type: none;
|
8
|
+
margin: 0 0 0 ($line-height-default * 1);
|
9
|
+
text-indent: $line-height-default * (-1);
|
10
|
+
column-break-inside: avoid;
|
11
|
+
}
|
12
|
+
.reference-index li li {
|
13
|
+
margin: 0 0 0 ($line-height-default / 2);
|
14
|
+
}
|
15
|
+
.reference-index a {
|
16
|
+
content: target-counter(attr(href), page);
|
17
|
+
}
|
18
|
+
.reference-index a:after {
|
19
|
+
content: ", ";
|
20
|
+
}
|
21
|
+
.reference-index a:last-of-type:after {
|
22
|
+
content: "";
|
23
|
+
}
|
24
|
+
.reference-index .duplicate {
|
25
|
+
display: none;
|
26
|
+
}
|
27
|
+
a.indexed {
|
28
|
+
color: inherit;
|
29
|
+
text-decoration: none;
|
30
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// Footnotes
|
2
|
+
|
3
|
+
// kramdown gives footnote references the class .footnote
|
4
|
+
// and the div containing the footnotes .footnotes
|
5
|
+
// Styling for sup and sub is in base typography
|
6
|
+
|
7
|
+
.footnote {
|
8
|
+
line-height: inherit;
|
9
|
+
}
|
10
|
+
|
11
|
+
.footnotes {
|
12
|
+
margin: ($line-height-default * 2) 0 0 0;
|
13
|
+
font-size: $font-size-default * 0.9;
|
14
|
+
line-height: $line-height-default * 0.9;
|
15
|
+
}
|
16
|
+
.footnotes p {
|
17
|
+
text-indent: 0;
|
18
|
+
}
|
19
|
+
.reversefootnote { // The link back to the footnote reference from the footnote text.
|
20
|
+
display: none;
|
21
|
+
}
|
22
|
+
.sidenote {
|
23
|
+
font-family: $font-text-secondary;
|
24
|
+
clear: both;
|
25
|
+
float: right;
|
26
|
+
max-width: 10em;
|
27
|
+
min-width: 5em;
|
28
|
+
margin: ($line-height-default * 0.5) 0 ($line-height-default * 0.5) ($line-height-default * 2);
|
29
|
+
padding: $line-height-default * 0.5;
|
30
|
+
border-top: 0.5pt solid #eeeeee;
|
31
|
+
text-indent: 0;
|
32
|
+
font-size: $font-size-default * 0.8;
|
33
|
+
font-style: inherit;
|
34
|
+
line-height: $line-height-default * 0.8;
|
35
|
+
}
|
36
|
+
.bottom {
|
37
|
+
float: bottom;
|
38
|
+
max-width: 100%;
|
39
|
+
margin: $line-height-default 0 0 0;
|
40
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* Classes for openers
|
3
|
+
*/
|
4
|
+
|
5
|
+
p.first { /* A paragraph that starts a new set of paragraphs, with a gap above it. */
|
6
|
+
text-indent: 0;
|
7
|
+
margin-top: $line-height-default; /* Overridden by later rule for paragraphs after headings, blockquotes, lists and definition lists */
|
8
|
+
}
|
9
|
+
p.chapter-number {
|
10
|
+
font-weight: bold;
|
11
|
+
font-size: $font-size-default * 4;
|
12
|
+
line-height: $line-height-default * 4;
|
13
|
+
margin: 0 0 $line-height-default 0;
|
14
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
// For a manual page break before an element, apply this class to it
|
2
|
+
.page-break-before {
|
3
|
+
page-break-before: always;
|
4
|
+
}
|
5
|
+
|
6
|
+
// For a manual page break after an element, apply this class to it
|
7
|
+
.page-break-after {
|
8
|
+
page-break-after: always;
|
9
|
+
}
|
10
|
+
|
11
|
+
// To keep an element on the same page as the next element, apply this class
|
12
|
+
.keep-with-next {
|
13
|
+
page-break-after: avoid;
|
14
|
+
}
|
15
|
+
|
16
|
+
// To prevent an element breaking across pages, apply this class
|
17
|
+
.keep-together {
|
18
|
+
page-break-inside: avoid;
|
19
|
+
}
|
20
|
+
// To allow a break where default styles would normally avoid one. Apply the class to the parent element.
|
21
|
+
// These are !important because they must override rules that might appear later in generated CSS.
|
22
|
+
.allow-break {
|
23
|
+
page-break-before: auto !important;
|
24
|
+
page-break-after: auto !important;
|
25
|
+
page-break-inside: auto !important;
|
26
|
+
}
|
27
|
+
.allow-break * {
|
28
|
+
page-break-before: inherit !important;
|
29
|
+
page-break-after: inherit !important;
|
30
|
+
page-break-inside: inherit !important;
|
31
|
+
}
|
32
|
+
|
33
|
+
// To end a section on a left or a right page, apply one of these classes to a block element
|
34
|
+
// Specifying left or right might not seem intuitive.
|
35
|
+
// You don't tell the element what side page is supposed to be last.
|
36
|
+
// Rather, you're adding an extra page if your last side is specified.
|
37
|
+
.end-on-left {
|
38
|
+
page-break-after: right !important;
|
39
|
+
}
|
40
|
+
.end-on-right {
|
41
|
+
page-break-after: left !important;
|
42
|
+
}
|
43
|
+
|
44
|
+
// Also see:
|
45
|
+
// _print-front-cover.scss
|
46
|
+
// _print-start-on-recto-and-verso
|
@@ -0,0 +1,236 @@
|
|
1
|
+
// This partial sets page header and footer content.
|
2
|
+
// It sets separate content for .frontmatter and .chapter pages.
|
3
|
+
|
4
|
+
// Assign strings to use in headers and footers for each level of heading (h1-h6),
|
5
|
+
// to be called by the header and footer variables ($verso-top-center etc.).
|
6
|
+
// For each heading, we use the title attribute, with the heading text as fallback.
|
7
|
+
// h1 also sets the string for h2, in case there is no h2 on the page yet.
|
8
|
+
h1 {
|
9
|
+
string-set:
|
10
|
+
h1-text content(),
|
11
|
+
h2-text content(),
|
12
|
+
h1-title attr(title),
|
13
|
+
h2-title attr(title);
|
14
|
+
}
|
15
|
+
h2 {
|
16
|
+
string-set:
|
17
|
+
h2-text content(),
|
18
|
+
h2-title attr(title);
|
19
|
+
}
|
20
|
+
h3 {
|
21
|
+
string-set:
|
22
|
+
h3-text content(),
|
23
|
+
h3-title attr(title);
|
24
|
+
}
|
25
|
+
h4 {
|
26
|
+
string-set:
|
27
|
+
h4-text content(),
|
28
|
+
h4-title attr(title);
|
29
|
+
}
|
30
|
+
h5 {
|
31
|
+
string-set:
|
32
|
+
h5-text content(),
|
33
|
+
h5-title attr(title);
|
34
|
+
}
|
35
|
+
h6 {
|
36
|
+
string-set:
|
37
|
+
h6-text content(),
|
38
|
+
h6-title attr(title);
|
39
|
+
}
|
40
|
+
|
41
|
+
// Now we place our content for `.chapter` pages
|
42
|
+
|
43
|
+
// Verso
|
44
|
+
@page chapter:left {
|
45
|
+
@top {
|
46
|
+
content: $verso-top;
|
47
|
+
}
|
48
|
+
@top-right {
|
49
|
+
content: $verso-top-right;
|
50
|
+
}
|
51
|
+
@top-left {
|
52
|
+
content: $verso-top-left;
|
53
|
+
}
|
54
|
+
@top-right-corner {
|
55
|
+
content: $verso-top-right-corner;
|
56
|
+
}
|
57
|
+
@top-left-corner {
|
58
|
+
content: $verso-top-left-corner;
|
59
|
+
}
|
60
|
+
@bottom {
|
61
|
+
content: $verso-bottom;
|
62
|
+
}
|
63
|
+
@bottom-left {
|
64
|
+
content: $verso-bottom-left;
|
65
|
+
}
|
66
|
+
@bottom-right {
|
67
|
+
content: $verso-bottom-right;
|
68
|
+
}
|
69
|
+
@bottom-left-corner {
|
70
|
+
content: $verso-bottom-left-corner;
|
71
|
+
}
|
72
|
+
@bottom-right-corner {
|
73
|
+
content: $verso-bottom-right-corner;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
// Recto
|
78
|
+
@page chapter:right {
|
79
|
+
@top {
|
80
|
+
content: $recto-top;
|
81
|
+
}
|
82
|
+
@top-right {
|
83
|
+
content: $recto-top-right;
|
84
|
+
}
|
85
|
+
@top-left {
|
86
|
+
content: $recto-top-left;
|
87
|
+
}
|
88
|
+
@top-right-corner {
|
89
|
+
content: $recto-top-right-corner;
|
90
|
+
}
|
91
|
+
@top-left-corner {
|
92
|
+
content: $recto-top-left-corner;
|
93
|
+
}
|
94
|
+
@bottom {
|
95
|
+
content: $recto-bottom;
|
96
|
+
}
|
97
|
+
@bottom-left {
|
98
|
+
content: $recto-bottom-left;
|
99
|
+
}
|
100
|
+
@bottom-right {
|
101
|
+
content: $recto-bottom-right;
|
102
|
+
}
|
103
|
+
@bottom-left-corner {
|
104
|
+
content: $recto-bottom-left-corner;
|
105
|
+
}
|
106
|
+
@bottom-right-corner {
|
107
|
+
content: $recto-bottom-right-corner;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
// No headers on first pages of chapters
|
112
|
+
.chapter, h1 {
|
113
|
+
prince-page-group: start;
|
114
|
+
}
|
115
|
+
@page chapter:first {
|
116
|
+
@top { content: normal; }
|
117
|
+
@top-left { content: normal; }
|
118
|
+
@top-right { content: normal; }
|
119
|
+
@top-left-corner { content: normal; }
|
120
|
+
@top-right-corner { content: normal; }
|
121
|
+
}
|
122
|
+
|
123
|
+
// No headers or footers on blank pages of chapters
|
124
|
+
@page chapter:blank {
|
125
|
+
@top { content: normal; }
|
126
|
+
@top-left { content: normal; }
|
127
|
+
@top-right { content: normal; }
|
128
|
+
@top-left-corner { content: normal; }
|
129
|
+
@top-right-corner { content: normal; }
|
130
|
+
@bottom { content: normal; }
|
131
|
+
@bottom-left { content: normal; }
|
132
|
+
@bottom-right { content: normal; }
|
133
|
+
@bottom-left-corner { content: normal; }
|
134
|
+
@bottom-right-corner { content: normal; }
|
135
|
+
}
|
136
|
+
|
137
|
+
// Now we place our content for `.frontmatter` pages
|
138
|
+
|
139
|
+
// Verso
|
140
|
+
@page frontmatter:left {
|
141
|
+
@top {
|
142
|
+
content: $verso-top-frontmatter;
|
143
|
+
}
|
144
|
+
@top-right {
|
145
|
+
content: $verso-top-right-frontmatter;
|
146
|
+
}
|
147
|
+
@top-left {
|
148
|
+
content: $verso-top-left-frontmatter;
|
149
|
+
}
|
150
|
+
@top-right-corner {
|
151
|
+
content: $verso-top-right-corner-frontmatter;
|
152
|
+
}
|
153
|
+
@top-left-corner {
|
154
|
+
content: $verso-top-left-corner-frontmatter;
|
155
|
+
}
|
156
|
+
@bottom {
|
157
|
+
content: $verso-bottom-frontmatter;
|
158
|
+
}
|
159
|
+
@bottom-left {
|
160
|
+
content: $verso-bottom-left-frontmatter;
|
161
|
+
}
|
162
|
+
@bottom-right {
|
163
|
+
content: $verso-bottom-right-frontmatter;
|
164
|
+
}
|
165
|
+
@bottom-left-corner {
|
166
|
+
content: $verso-bottom-left-corner-frontmatter;
|
167
|
+
}
|
168
|
+
@bottom-right-corner {
|
169
|
+
content: $verso-bottom-right-corner-frontmatter;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
// Recto
|
174
|
+
@page frontmatter:right {
|
175
|
+
@top {
|
176
|
+
content: $recto-top-frontmatter;
|
177
|
+
}
|
178
|
+
@top-right {
|
179
|
+
content: $recto-top-right-frontmatter;
|
180
|
+
}
|
181
|
+
@top-left {
|
182
|
+
content: $recto-top-left-frontmatter;
|
183
|
+
}
|
184
|
+
@top-right-corner {
|
185
|
+
content: $recto-top-right-corner-frontmatter;
|
186
|
+
}
|
187
|
+
@top-left-corner {
|
188
|
+
content: $recto-top-left-corner-frontmatter;
|
189
|
+
}
|
190
|
+
@bottom {
|
191
|
+
content: $recto-bottom-frontmatter;
|
192
|
+
}
|
193
|
+
@bottom-left {
|
194
|
+
content: $recto-bottom-left-frontmatter;
|
195
|
+
}
|
196
|
+
@bottom-right {
|
197
|
+
content: $recto-bottom-right-frontmatter;
|
198
|
+
}
|
199
|
+
@bottom-left-corner {
|
200
|
+
content: $recto-bottom-left-corner-frontmatter;
|
201
|
+
}
|
202
|
+
@bottom-right-corner {
|
203
|
+
content: $recto-bottom-right-corner-frontmatter;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
|
207
|
+
// No headers on first pages of frontmatter
|
208
|
+
.frontmatter {
|
209
|
+
prince-page-group: start;
|
210
|
+
}
|
211
|
+
@page frontmatter:first {
|
212
|
+
@top { content: normal; }
|
213
|
+
@top-left { content: normal; }
|
214
|
+
@top-right { content: normal; }
|
215
|
+
@top-left-corner { content: normal; }
|
216
|
+
@top-right-corner { content: normal; }
|
217
|
+
}
|
218
|
+
|
219
|
+
// No headers or footers on blank pages of frontmatter
|
220
|
+
@page frontmatter:blank {
|
221
|
+
@top { content: normal; }
|
222
|
+
@top-left { content: normal; }
|
223
|
+
@top-right { content: normal; }
|
224
|
+
@top-left-corner { content: normal; }
|
225
|
+
@top-right-corner { content: normal; }
|
226
|
+
@bottom { content: normal; }
|
227
|
+
@bottom-left { content: normal; }
|
228
|
+
@bottom-right { content: normal; }
|
229
|
+
@bottom-left-corner { content: normal; }
|
230
|
+
@bottom-right-corner { content: normal; }
|
231
|
+
}
|
232
|
+
|
233
|
+
// Reset page numbering to 1
|
234
|
+
.page-1 {
|
235
|
+
counter-reset: page 1;
|
236
|
+
}
|