|
5 | 5 | <style>
|
6 | 6 | body {
|
7 | 7 | font-family: sans-serif;
|
8 |
| - padding: 1em 3em; |
| 8 | + padding: 1.2em 3em; |
9 | 9 | color: #333;
|
10 | 10 | }
|
11 | 11 | a { color: #28d }
|
12 | 12 | li { margin: 4px 0 }
|
| 13 | +code { background: #f8f8f8 } |
13 | 14 | </style>
|
| 15 | +<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/styles/default.min.css"> |
14 | 16 | </head>
|
15 | 17 | <body>
|
16 |
| - <h2>Gutenberg demo</h2> |
| 18 | + <h1>Gutenberg</h1> |
17 | 19 |
|
| 20 | + <h2>Demonstration</h2> |
18 | 21 | <ul>
|
19 | 22 | <li><a href="modern.html">Modern style</a></li>
|
20 | 23 | <li><a href="oldstyle.html">Old style</a></li>
|
21 | 24 | </ul>
|
22 | 25 |
|
23 | 26 | <p>Print (or use the print preview) to see the result with Gutenberg.</p>
|
| 27 | + |
| 28 | + <h2>Utils</h2> |
| 29 | + |
| 30 | + <h4>Hide elements</h4> |
| 31 | + |
| 32 | + To hide elements to be printed you can simply add the class <code>no-print</code>. |
| 33 | + |
| 34 | + <h4>Force break page</h4> |
| 35 | + |
| 36 | + Gutenberg provide to way break page, the class <code>page-break</code> will for to break before and <code>page-break-after</code> to break after. |
| 37 | + |
| 38 | + Example: |
| 39 | + |
| 40 | + <pre><code class="html"> |
| 41 | +<!-- The title will be on a new page --> |
| 42 | +<h1 class="page-break">My title</h1> |
| 43 | + |
| 44 | +<p class="page-break-after">I will break after this paragraph</p> |
| 45 | +<!-- Break here, the next paragraph will be on a new page --> |
| 46 | +<p>I am on a new page</p> |
| 47 | + </code></pre> |
| 48 | + |
| 49 | + <h4>Not reformat links or acronym</h4> |
| 50 | + |
| 51 | + If you do not want to reformat the links, acronym or abbreviation to show the full url or title, you |
| 52 | + can use the class <code>no-reformat</code>. |
| 53 | + |
| 54 | + <h4>Force to print background</h4> |
| 55 | + |
| 56 | + To force backgrounds to be printed (can be useful when you "print" a pdf), add this CSS (compatible with Safari and Chrome) : |
| 57 | + |
| 58 | + <pre><code class="css"> |
| 59 | +-webkit-print-color-adjust: exact; |
| 60 | + print-color-adjust: exact; |
| 61 | + </code></pre> |
| 62 | + |
| 63 | + <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script> |
| 64 | + <script>hljs.initHighlightingOnLoad();</script> |
24 | 65 | </body>
|
25 | 66 | </html>
|
0 commit comments