diff --git a/themes/maik-blog/assets/scss/_main.scss b/themes/maik-blog/assets/scss/_main.scss index 1e15793..57c4ea5 100644 --- a/themes/maik-blog/assets/scss/_main.scss +++ b/themes/maik-blog/assets/scss/_main.scss @@ -186,8 +186,12 @@ figure { font-size: 1.125rem; line-height: 1.3; margin-top: 0.4em; - font-weight: bold; opacity: 0.8; + vertical-align: middle; + + span { + vertical-align: middle; + } &.left { text-align: left; @@ -200,6 +204,20 @@ figure { &.right { text-align: right; } + + .figcaption { + &__title { + font-weight: bold; + } + + &__attr { + font-size: 0.7em; + + svg { + margin-right: 0.3em; + } + } + } } &.small { diff --git a/themes/maik-blog/layouts/shortcodes/figure.html b/themes/maik-blog/layouts/shortcodes/figure.html index 96e8a02..c67a91b 100644 --- a/themes/maik-blog/layouts/shortcodes/figure.html +++ b/themes/maik-blog/layouts/shortcodes/figure.html @@ -14,22 +14,32 @@ {{- if .Get "link" }}{{ end -}} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
- {{- if or (.Get "caption") (.Get "attr") -}} - {{- with (.Get "title") -}} -

{{ . }}

+ {{- with .Get "title" -}} + {{ . }} + {{- end }} + {{- if and (.Get "title") (.Get "caption") }} + {{" - "}} + {{- end }} + {{- with .Get "caption" }} + + {{- . | markdownify -}} + {{- end -}} -

- {{- .Get "caption" | markdownify -}} + {{- if .Get "attr" }} + {{- if or (.Get "title") (.Get "caption") }} + {{" - "}} + {{- end }} + + + + + {{- with .Get "attrlink" }} - {{- end -}} - {{- .Get "attr" | markdownify -}} - {{- if .Get "attrlink" }}{{ end }} -

- {{- else -}} - {{- with (.Get "title") -}} - {{ . }} - {{- end -}} + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }} + {{- end -}}
{{- end }}