diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index 1231a94..9957c21 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -1,21 +1,31 @@ {{ $img := $.Page.Resources.GetMatch (.Get "src")}} -{{ $test := $img.Permalink }} -{{ $name_splitted := split $img.RelPermalink "." }} -{{ $name_base := index $name_splitted 0 }} {{ with .Get "link" }} - + {{ end }} - - - - + {{ with .Get "link" }} {{ end }} - {{ with .Get "title" }} + {{ if .Get "caption" }} - {{ . }} + {{ .Get "caption" }} + {{ if .Get "attr" }} + + {{ with .Get "attrlink" }} + + {{ end }} + {{ .Get "attr" }} + {{ with .Get "attrlink" }} + + {{ end }} + + {{ end }} + {{ end }} diff --git a/static/css/style.css b/static/css/style.css index 002b988..c4d3a44 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -526,7 +526,7 @@ a:focus { .article-body figure.border figcaption { background-color: var(--background-color-light); } -.article-body figure a { +.article-body figure>a { display: block; min-height: 100%; } @@ -540,6 +540,9 @@ a:focus { margin-left: 1rem; margin-right: 1rem; } +.article-body figure figcaption .attribution { + float: right; +} @media only screen and (max-width: 320px) { .article-body .footnotes ol { padding-left: 2em;
{{ . }}
{{ .Get "caption" }} + {{ if .Get "attr" }} + + {{ with .Get "attrlink" }} + + {{ end }} + {{ .Get "attr" }} + {{ with .Get "attrlink" }} + + {{ end }} + + {{ end }} +