Page breaks
This commit is contained in:
@@ -238,4 +238,18 @@ audio::-webkit-media-controls-panel {
|
|||||||
content: " (" attr(href) ")";
|
content: " (" attr(href) ")";
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
hr {
|
||||||
|
page-break-after: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-break {
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<section>
|
<section>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
</section>
|
||||||
|
|
||||||
{{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }}
|
{{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }}
|
||||||
{{ $page := . }}
|
{{ $page := . }}
|
||||||
|
|
||||||
|
<section class="page-break">
|
||||||
<h2>
|
<h2>
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</h2>
|
</h2>
|
||||||
@@ -15,8 +17,6 @@
|
|||||||
|
|
||||||
{{ $audioLink := printf "<a href=\"%s$1\">$3</a>" (substr .Site.BaseURL 0 -1) }}
|
{{ $audioLink := printf "<a href=\"%s$1\">$3</a>" (substr .Site.BaseURL 0 -1) }}
|
||||||
{{ replaceRE `<audio controls src="((.*)/(.*).mp3)"></audio>` $audioLink .Content | safeHTML }}
|
{{ replaceRE `<audio controls src="((.*)/(.*).mp3)"></audio>` $audioLink .Content | safeHTML }}
|
||||||
|
|
||||||
<div style="page-break-after: always"></div>
|
|
||||||
{{ end }}
|
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user