mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-12-03 04:18:57 -05:00
markdownify image captions
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<footer>
|
||||
<div id="row">
|
||||
<div id="copyright">Content licensed under <a class="no-underline" href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International" target="_blank" rel="noopener">CC-BY-4.0</a>, {{ with .Site.Params.wayback }}<a class="no-underline" href="{{ . }}" title="View Old Versions on Wayback Machine" id="wayback" target="_blank" rel="noopener">{{ end }}{{ with .Site.Params.copyrightFirstYear }}{{ . }} –{{ end }}{{ if .Site.Params.wayback }}</a>{{ end }} {{ now.Format "2006" }}.</div>
|
||||
<div id="panda"><a class="no-underline" href="https://nationalzoo.si.edu/webcams/panda-cam" title="Live Panda Party!!!11" target="_blank" rel="noopener"><span>🐼</span></a></div>
|
||||
<div id="poweredby">
|
||||
<a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Powered by Hugo.</a>
|
||||
{{ with .Site.Params.gitRepo }}<a class="no-underline" href="{{ . }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a>{{ end }}
|
||||
<div id="copyright">Content licensed under <a class="no-underline" href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International" target="_blank" rel="noopener">CC-BY-4.0</a>, {{ with .Site.Params.wayback }}<a class="no-underline" href="{{ . }}" title="View Old Versions on Wayback Machine" id="wayback" target="_blank" rel="noopener">{{ end }}{{ with .Site.Params.copyrightFirstYear }}{{ . }} –{{ end }}{{ if .Site.Params.wayback }}</a>{{ end }} {{ now.Format "2006" }}.</div>
|
||||
<div id="panda"><a class="no-underline" href="https://nationalzoo.si.edu/webcams/panda-cam" title="Live Panda Party!!!11" target="_blank" rel="noopener"><span>🐼</span></a></div>
|
||||
<div id="poweredby">
|
||||
<a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener">Powered by Hugo.</a>
|
||||
{{ with .Site.Params.gitRepo }}<a class="no-underline" href="{{ . }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener">View source.</a>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<p class="image">
|
||||
<amp-img
|
||||
{{- with .Get "alt" }} alt="{{ . | safeHTMLAttr }}" title="{{ . | safeHTMLAttr }}"{{ end }}
|
||||
{{- with .Inner }} alt="{{ . | plainify | safeHTMLAttr }}" title="{{ . | plainify | safeHTMLAttr }}"{{ end }}
|
||||
{{- with .Inner }} alt="{{ . | markdownify | plainify | safeHTMLAttr }}" title="{{ . | markdownify | plainify | safeHTMLAttr }}"{{ end }}
|
||||
src="{{ $image.Permalink }}"
|
||||
width="{{ $displayWidth }}"
|
||||
height="{{ $displayHeight }}"
|
||||
@@ -38,4 +38,4 @@
|
||||
</amp-img>
|
||||
</p>
|
||||
|
||||
{{- with .Inner }}<p class="caption">{{ . | safeHTML }}</p>{{ end -}}
|
||||
{{- with .Inner }}<p class="caption">{{ . | markdownify | safeHTML }}</p>{{ end -}}
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<figure>
|
||||
<picture>
|
||||
<img src="{{ $image.Permalink }}" width="{{ $displayWidth }}" height="{{ $displayHeight }}"
|
||||
alt="{{ . | plainify | safeHTMLAttr }}" title="{{ . | plainify | safeHTMLAttr }}">
|
||||
alt="{{ . | markdownify | plainify | safeHTMLAttr }}" title="{{ . | markdownify | plainify | safeHTMLAttr }}">
|
||||
</picture>
|
||||
<figcaption>{{ . | safeHTML }}</figcaption>
|
||||
<figcaption>{{ . | markdownify | safeHTML }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
<p><img src="{{ $image.Permalink }}" width="{{ $displayWidth }}" height="{{ $displayHeight }}"
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
<p style="text-align: center;">
|
||||
<img src="{{ $image.Permalink }}" width="{{ $displayWidth }}" height="{{ $displayHeight }}"
|
||||
{{- with .Get "alt" }} alt="{{ . | safeHTMLAttr }}" title="{{ . | safeHTMLAttr }}"{{ end }}
|
||||
{{- with .Inner }} alt="{{ . | plainify | safeHTMLAttr }}" title="{{ . | plainify | safeHTMLAttr }}"{{ end }}>
|
||||
{{ with .Inner }}<br>{{ . | safeHTML }}{{ end -}}
|
||||
{{- with .Inner }} alt="{{ . | markdownify | plainify | safeHTMLAttr }}" title="{{ . | markdownify | plainify | safeHTMLAttr }}"{{ end }}>
|
||||
{{ with .Inner }}<br>{{ . | markdownify | safeHTML }}{{ end -}}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user