Skip to content

Commit 356f21d

Browse files
committed
Added page break before Libraries
1 parent 72523a5 commit 356f21d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@
189189
}
190190

191191
@media print {
192+
.pagebreak {
193+
page-break-before: always;
194+
}
192195
div {
193196
page-break-inside: avoid;
194197
}
@@ -1878,7 +1881,7 @@
18781881
</code></pre></div>
18791882

18801883
<p><br><br></p>
1881-
<div><h1 id="libraries">Libraries</h1><div><h2 id="progressbar"><a href="#progressbar" name="progressbar">#</a>Progress Bar</h2><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install tqdm</span>
1884+
<div class="pagebreak"></div><div><h1 id="libraries">Libraries</h1><div><h2 id="progressbar"><a href="#progressbar" name="progressbar">#</a>Progress Bar</h2><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install tqdm</span>
18821885
<span class="hljs-keyword">from</span> tqdm <span class="hljs-keyword">import</span> tqdm
18831886
<span class="hljs-keyword">from</span> time <span class="hljs-keyword">import</span> sleep
18841887
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> tqdm([<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>]):

parse.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ function highlightCode() {
280280
fixClasses();
281281
fixFroms();
282282
preventPageBreaks();
283+
insertPageBreak();
283284
}
284285

285286
function setApaches(elements) {
@@ -310,6 +311,10 @@ function preventPageBreaks() {
310311
});
311312
}
312313

314+
function insertPageBreak() {
315+
$('<div class="pagebreak"></div>').insertBefore($('#libraries').parent())
316+
}
317+
313318
function readFile(filename) {
314319
try {
315320
return fs.readFileSync(filename, 'utf8');

web/template.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@
189189
}
190190

191191
@media print {
192+
.pagebreak {
193+
page-break-before: always;
194+
}
192195
div {
193196
page-break-inside: avoid;
194197
}

0 commit comments

Comments
 (0)