add image captions
This commit is contained in:
parent
41db6a77dc
commit
73ad44e2ca
2 changed files with 12 additions and 0 deletions
9
layouts/_default/render-image.html
Normal file
9
layouts/_default/render-image.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ if .Title }}
|
||||
<figure>
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||
<figcaption>{{ .Title }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||
{{ end }}
|
||||
|
|
@ -4,3 +4,6 @@ code{color: #FFFFFF; background:#000000; padding:2px}
|
|||
pre{color: #FFFFFF; background:#000000; padding:24px; white-space: pre-wrap}
|
||||
article{padding:24px 0}
|
||||
.center {display: block;margin-left: auto;margin-right: auto;width: 100%;}
|
||||
img {display: block; max-width: 100%; height: auto;}
|
||||
figcaption {color: #888; font: 12px/1.5 monospace; text-align: center;}
|
||||
|
||||
|
|
Loading…
Reference in a new issue