List references at end of archive
This commit is contained in:
@@ -234,19 +234,6 @@ audio::-webkit-media-controls-panel {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:not(:has(img), [href^="#"], [href="/"]) {
|
|
||||||
border-bottom: 1.5px solid #00a;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
border-bottom: 1.5px solid white;
|
|
||||||
color: #eee;
|
|
||||||
content: " [" attr(href) "]";
|
|
||||||
font-weight: normal;
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
hr {
|
hr {
|
||||||
|
|||||||
@@ -1,20 +1,26 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $sd := .Params.start_date }}
|
{{ $start_date := .Params.start_date }}
|
||||||
{{ $ed := .Params.end_date }}
|
{{ $end_date := .Params.end_date }}
|
||||||
|
|
||||||
<section class="page-break">
|
{{ $dispatches := slice }}
|
||||||
{{ time.Format "January 2006" $sd }} – {{ time.Format "January 2006" $ed }}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
{{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }}
|
{{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }}
|
||||||
{{ if lt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $sd) }}
|
{{ if lt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $start_date) }}
|
||||||
{{ continue }}
|
{{ continue }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if gt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $ed) }}
|
{{ if gt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $end_date) }}
|
||||||
{{ continue }}
|
{{ continue }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $dispatches = $dispatches | append . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<section class="page-break">
|
||||||
|
Dispatches, {{ time.Format "January 2006" $start_date }} – {{ time.Format "January 2006" $end_date }}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{{ range $dispatches }}
|
||||||
<section class="page-break">
|
<section class="page-break">
|
||||||
<h2>
|
<h2>
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
@@ -24,7 +30,31 @@
|
|||||||
Posted {{ .Date | time.Format "2006-01-02" }}
|
Posted {{ .Date | time.Format "2006-01-02" }}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
{{ replaceRE `<audio controls src="((.*)/(.*).mp3)"></audio>` "<a href=\"$1\">$3</a>" .Content | safeHTML }}
|
{{ replaceRE `<audio controls src="((.*)/(.*).mp3)"></audio>` "<a href=\"$1\">$3</a> ($1)" .Content | safeHTML }}
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $linkRE := `(?s)<a[^>]+?href="(.+?)"[^>]*?>.*?</a>` }}
|
||||||
|
|
||||||
|
<h2>References</h2>
|
||||||
|
|
||||||
|
{{ range $dispatches }}
|
||||||
|
<p>{{ .Title }}</p>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>{{ .RelPermalink }}</li>
|
||||||
|
|
||||||
|
{{ range findRE $linkRE .Content }}
|
||||||
|
{{ if findRE `<img` . }}
|
||||||
|
{{ continue }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if findRE `href="#` . }}
|
||||||
|
{{ continue }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<li>{{ replaceRE $linkRE "$1" . }}</li>
|
||||||
|
{{ end }}
|
||||||
|
</ol>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user