Merge pull request #8 from pfandzelter/add-image-captions
Add Captions to Images
This commit is contained in:
commit
b4a2605222
2 changed files with 14 additions and 0 deletions
11
layouts/_default/_markup/render-image.html
Normal file
11
layouts/_default/_markup/render-image.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{{ if .Title }}
|
||||||
|
<figure>
|
||||||
|
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||||
|
<figcaption>{{ .Title }}</figcaption>
|
||||||
|
</figure>
|
||||||
|
{{ else }}
|
||||||
|
<figure>
|
||||||
|
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||||
|
</figure>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -4,3 +4,6 @@ p > code{color: #FFFFFF; background:#000000; padding:2px}
|
||||||
pre{color: #FFFFFF; background:#000000; padding:24px; overflow-x: auto}
|
pre{color: #FFFFFF; background:#000000; padding:24px; overflow-x: auto}
|
||||||
article{padding:24px 0}
|
article{padding:24px 0}
|
||||||
.center {display: block;margin-left: auto;margin-right: auto;width: 100%;}
|
.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;}
|
||||||
|
figure {margin: auto}
|
||||||
|
|
Loading…
Reference in a new issue