|
| 1 | + |
| 2 | +/* |
| 3 | +The print-site banner |
| 4 | +*/ |
| 5 | +#print-site-banner { |
| 6 | + border:2px; |
| 7 | + border-style:solid; |
| 8 | + border-color:#000000; |
| 9 | + padding: 0em 1em 0em 1em; |
| 10 | + margin-bottom: 2em; |
| 11 | +} |
| 12 | +#print-site-banner h3 { |
| 13 | + margin-top: 1rem; |
| 14 | +} |
| 15 | + |
| 16 | +/* Enumerate figures */ |
| 17 | +.print-site-enumerate-figures figcaption:before { |
| 18 | + counter-increment: figurecounter; |
| 19 | + content: "Figure " counter(figurecounter) ": "; |
| 20 | +} |
| 21 | + |
| 22 | + |
| 23 | +/* Print URLS: |
| 24 | +Change a 'link' to 'link (target)' */ |
| 25 | +div.print-site-add-full-url section.print-page a[href^="http"]::after{ |
| 26 | + content: " (" attr(href) ") "; |
| 27 | +} |
| 28 | + |
| 29 | + |
| 30 | +/* Do some nice animations when clicking on a ToC link */ |
| 31 | +#print-site-page h1:target, |
| 32 | +#print-site-page h2:target, |
| 33 | +#print-site-page h3:target, |
| 34 | +#print-site-page h4:target, |
| 35 | +#print-site-page h5:target, |
| 36 | +#print-site-page h6:target { |
| 37 | + animation: highlight 1.5s ease; |
| 38 | +} |
| 39 | +#print-site-page .print-page:target h1 { |
| 40 | + animation: highlight 1.5s ease; |
| 41 | +} |
| 42 | +@keyframes highlight { |
| 43 | + from { color: orange; } |
| 44 | + to { color: none; } |
| 45 | +} |
| 46 | + |
| 47 | + |
| 48 | +/* |
| 49 | +Print site table of contents styling |
| 50 | + */ |
| 51 | +/* Don't display the table of contents in HTML version */ |
| 52 | +#print-page-toc { display: none } |
| 53 | + |
| 54 | + |
| 55 | +.print-page-toc-nav { |
| 56 | + padding-bottom: 2em; |
| 57 | +} |
| 58 | + |
| 59 | +#print-page-toc ul { |
| 60 | + list-style-position: inside; |
| 61 | + list-style-type: none; |
| 62 | +} |
| 63 | + |
| 64 | +#print-site-page ul { |
| 65 | + margin-left: 0em; |
| 66 | +} |
| 67 | + |
| 68 | +/* Be able to not print certain elements */ |
| 69 | +#print-site-page .print-site-plugin-ignore { display: none;} |
| 70 | + |
| 71 | +@media print { |
| 72 | + |
| 73 | + /* included bookmarks on h1 and h2 |
| 74 | + Doesn't work, but included In case Chrome gets support |
| 75 | + for these experimental CSS features that define PDF bookmarks */ |
| 76 | + /* #print-site-page h1 { |
| 77 | + bookmark-level: 1; |
| 78 | + bookmark-label: content(); |
| 79 | + -ah-bookmark-level: 1; |
| 80 | + -ro-pdf-bookmark-level: 1; |
| 81 | + } |
| 82 | + #print-site-page h2 { |
| 83 | + bookmark-level: 2; |
| 84 | + bookmark-label: content(); |
| 85 | + -ah-bookmark-level: 2; |
| 86 | + -ro-pdf-bookmark-level: 2; |
| 87 | + } */ |
| 88 | + |
| 89 | + /* Be able to not print certain elements */ |
| 90 | + .print-site-plugin-ignore { display: none; } |
| 91 | + |
| 92 | + /* Remove print site banner */ |
| 93 | + #print-site-banner { display: none; } |
| 94 | + |
| 95 | + /* display the table of contents in print version */ |
| 96 | + #print-page-toc { display: block } |
| 97 | + |
| 98 | + /* PDF page breaks on each MkDocs page, except the first one */ |
| 99 | + #print-site-page section.print-page { |
| 100 | + page-break-before: always; |
| 101 | + } |
| 102 | + #print-site-page > section.print-page:first-of-type { |
| 103 | + page-break-before: avoid; |
| 104 | + } |
| 105 | + |
| 106 | + /* PDF page breaks - separate title page for each section */ |
| 107 | + #print-site-page section.print-page.md-section > h1 { |
| 108 | + align-content: center; |
| 109 | + text-align: center; |
| 110 | + vertical-align: middle; |
| 111 | + padding: 5rem 0rem; |
| 112 | + font-size: 2.5em; |
| 113 | + } |
| 114 | + |
| 115 | + #print-site-page p, |
| 116 | + #print-site-page pre, |
| 117 | + #print-site-page blockquote, |
| 118 | + #print-site-page .tabbed-set { |
| 119 | + page-break-inside: avoid; |
| 120 | + } |
| 121 | + |
| 122 | + /* Avoid a page break immediately after a heading */ |
| 123 | + /* Credits https://stackoverflow.com/a/9238898/5525118 */ |
| 124 | + #print-site-page h1 { |
| 125 | + page-break-inside: avoid; |
| 126 | + } |
| 127 | + #print-site-page h1::after { |
| 128 | + content: ""; |
| 129 | + /* display: block; */ |
| 130 | + height: 100px; |
| 131 | + margin-bottom: -100px; |
| 132 | + } |
| 133 | + |
| 134 | + #print-site-page footer { display : none; } |
| 135 | + |
| 136 | + #print-site-cover-page { |
| 137 | + display: block; |
| 138 | + width:100%; |
| 139 | + text-align: center; |
| 140 | + } |
| 141 | + #print-site-cover-page h1 { |
| 142 | + font-size: 300%; |
| 143 | + } |
| 144 | +} |
0 commit comments