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