Skip to content

Commit 4b4ae61

Browse files
committed
Add "Utils" to demo page
1 parent 09c44fa commit 4b4ae61

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010

11-
[{*.css,*.sass,*.scss}]
11+
[{*.css,*.sass,*.scss,*.html}]
1212
indent_style = tab
1313

1414
[*.md]

demo/index.html

+43-2
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,62 @@
55
<style>
66
body {
77
font-family: sans-serif;
8-
padding: 1em 3em;
8+
padding: 1.2em 3em;
99
color: #333;
1010
}
1111
a { color: #28d }
1212
li { margin: 4px 0 }
13+
code { background: #f8f8f8 }
1314
</style>
15+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/styles/default.min.css">
1416
</head>
1517
<body>
16-
<h2>Gutenberg demo</h2>
18+
<h1>Gutenberg</h1>
1719

20+
<h2>Demonstration</h2>
1821
<ul>
1922
<li><a href="modern.html">Modern style</a></li>
2023
<li><a href="oldstyle.html">Old style</a></li>
2124
</ul>
2225

2326
<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+
&lt;!-- The title will be on a new page --&gt;
42+
&lt;h1 class="page-break"&gt;My title&lt;/h1&gt;
43+
44+
&lt;p class="page-break-after"&gt;I will break after this paragraph&lt;/p&gt;
45+
&lt;!-- Break here, the next paragraph will be on a new page --&gt;
46+
&lt;p&gt;I am on a new page&lt;/p&gt;
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>
2465
</body>
2566
</html>

0 commit comments

Comments
 (0)