Skip to content

Commit ee8410f

Browse files
emsimonsPseudomanifold
authored andcommitted
shortcode for centered figures
1 parent 1e72b82 commit ee8410f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div style="display: block; margin: 0 auto; max-width: {{ .Get "width" | default "100%" }};">
2+
<img
3+
src="{{ .Get "src" }}"
4+
alt="{{ .Get "alt" | default "Figure" }}"
5+
style="display: block; margin: 0 auto; width: 100%; height: auto; border-style: solid; border-color: rgba(0, 0, 0, 0.1);
6+
border-width: {{ .Get "border-weight" | default "0px" }};"
7+
/>
8+
{{ with .Get "caption" }}
9+
<span style="display: block; margin-top: 0.5em; text-align: left;">
10+
{{ . | markdownify }}
11+
</span>
12+
{{ end }}
13+
</div>

0 commit comments

Comments
 (0)