-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef12ae6
commit d0e3e5a
Showing
19 changed files
with
424 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
module.exports = { | ||
extends: ['stylelint-config-spaceninja', 'stylelint-config-prettier'], | ||
// 1. This rule doesn't understand some print styles. | ||
rules: { | ||
'scss/at-rule-no-unknown': null, // 1 | ||
'selector-pseudo-element-no-unknown': null, // 1 | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<article class="print-page title-page"> | ||
<article class="new-page title-page"> | ||
<h1 id="a-study-in-scarlet">{{ book.title }}</h1> | ||
<p class="credits">By {{ book.author }}</p> | ||
<p class="credits">With numerous original engravings by D.H. Friston.</p> | ||
<p class="p-initial is-centered">By {{ book.author }}</p> | ||
<p class="p-initial is-centered">With numerous original engravings by D.H. Friston.</p> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* Figures | ||
*/ | ||
figure { | ||
margin: 1em 0; | ||
|
||
ol { | ||
margin-top: 0; | ||
} | ||
|
||
@media print { | ||
page-break-inside: avoid; | ||
} | ||
} | ||
|
||
figcaption { | ||
font-style: italic; | ||
text-align: center; | ||
text-wrap: balance; | ||
} | ||
|
||
img { | ||
display: block; | ||
height: auto; | ||
max-width: 100%; | ||
} | ||
|
||
/** | ||
* Modifier for figures containing full-page images | ||
* | ||
* 1. 75% of page height | ||
*/ | ||
.full-page-image { | ||
figcaption { | ||
font-size: smaller; | ||
margin-top: 1em; | ||
} | ||
|
||
@media print { | ||
page-break-after: always; | ||
page-break-before: always; | ||
page-break-inside: avoid; | ||
|
||
img { | ||
margin: 0 auto; | ||
max-height: 8.333in; // 1 | ||
page-break-inside: avoid; | ||
width: auto; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Footnotes | ||
* | ||
* 1. For print, we need the footnote to appear inline with the text, so it | ||
* can be positioned at the bottom of the current page. For screen, we | ||
* want to treat footnotes as endnotes, appearing at the end of the chapter. | ||
* 2. Position the footnote at the bottom of the page it appears on. | ||
* 3. Docraptor tries to automatically add the footnote numbers, but we | ||
* also need the numbers for web display, so we're adding them manually, | ||
* and disabling the automatic ones. | ||
* | ||
* @see https://docraptor.com/documentation/article/1067570-adding-footnotes | ||
*/ | ||
main { | ||
@media screen { | ||
display: flex; // 1 | ||
flex-direction: column; // 1 | ||
} | ||
} | ||
|
||
.footnote { | ||
font-size: smaller; | ||
font-style: italic; | ||
|
||
@media screen { | ||
margin-top: 2em; | ||
order: 1; // 1 | ||
} | ||
|
||
@media print { | ||
float: footnote; // 2 | ||
|
||
&::footnote-call { | ||
content: none; // 3 | ||
} | ||
|
||
&::footnote-marker { | ||
content: none; // 3 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
html { | ||
box-sizing: border-box; | ||
} | ||
|
||
*, | ||
*::after, | ||
*::before { | ||
box-sizing: inherit; | ||
} | ||
|
||
body { | ||
margin: 1em; | ||
} | ||
|
||
main { | ||
margin: 0 auto; | ||
margin-bottom: 2em; | ||
max-width: 60ch; | ||
} | ||
|
||
.app-header { | ||
text-align: center; | ||
} | ||
|
||
.app-footer { | ||
border-top: 1px solid currentcolor; | ||
padding-top: 1em; | ||
} | ||
|
||
/** | ||
* Chapter Navigation | ||
*/ | ||
.chapter-nav { | ||
display: flex; | ||
gap: 1em; | ||
justify-content: space-between; | ||
margin-bottom: 1em; | ||
} | ||
|
||
.chapter-nav__toc { | ||
text-align: center; | ||
} | ||
|
||
.chapter-nav__next { | ||
text-align: right; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.