Add back lightbox
This commit is contained in:
parent
2bfdde2b93
commit
63e7bb1cef
|
@ -0,0 +1 @@
|
|||
<a href="#{{ .Destination | md5 }}-lightbox"><img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /></a>
|
|
@ -26,7 +26,7 @@
|
|||
"id": "{{ .Permalink }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
"title": {{ .Title | jsonify }},
|
||||
"content_html": {{ .Content | jsonify }},
|
||||
"content_html": {{ partial "cleanedContent.json" . }},
|
||||
"summary": {{ .Summary | jsonify }},
|
||||
"date_published": {{ dateFormat "2006-01-02T15:04:05-07:00" .Date | jsonify }},
|
||||
"date_modified": {{ dateFormat "2006-01-02T15:04:05-07:00" .Lastmod | jsonify }},
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
<description>{{ partial "cleanedContent.xml" . }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
<p><audio controls preload="metadata" style="width: 100%;"><source src="{{ . }}"/></audio></p>
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
{{ range $i, $image := .Params.images }}
|
||||
<a href="#_" class="lightbox" id="{{ $image | md5 }}-lightbox">
|
||||
<img src="{{ $image | safeURL }}">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with .Params.externalUrl }}
|
||||
<p><a class="u-bookmark-of" href="{{ . }}" target="_blank">{{ . }}</a></p>
|
||||
{{ end }}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{{ (( htmlUnescape .Content | safeHTML ) | replaceRE "<a href=\".*lightbox\">(.*)</a>" "$1" | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | jsonify }}
|
|
@ -0,0 +1 @@
|
|||
{{ (( htmlUnescape .Content | safeHTML ) | replaceRE "<a href=\".*lightbox\">(.*)</a>" "$1" | replaceRE "href=\"/([^\"]*)\"" ( printf "href=\"%s$1\"" ( "" | absURL ) ) ) | html }}
|
Reference in New Issue