Add more shortcodes.

This commit is contained in:
Shawn O'Hare 2016-01-14 20:41:16 -08:00
parent 8dafca7e01
commit 2c4ac3082f
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{{ $type := .Get "type" }}
{{ if not (eq $type "margin") }}
{{ if eq $type "full" }}
<figure class="fullwidth">
{{ else }}
<figure {{ with .Get "class" }} class="{{ . }}"{{ end }}>
{{ end }}
{{ end }}
{{ if eq $type "full" }}
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
<img src="{{ .Get "src" }}" {{ with .Get "alt"}}alt="{{ . }}"{{ end }}>
{{ if .Get "link" }}</a>{{ end }}
<figcaption>
{{ else }}
<label for="{{ .Get "label" }}" class="margin-toggle"></label>
<input type="checkbox" id="{{ .Get "label" }}" class="margin-toggle">
<span class="marginnote">
{{ if eq $type "margin" }}
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
<img src="{{ .Get "src" }}" {{ with .Get "alt"}}alt="{{ . }}"{{ end }}>
{{ if .Get "link" }}</a>{{ end }}
{{ end }}
{{ end }}
{{ with .Get "title"}}<strong>{{ . }} </strong>{{ end}}
{{ with .Get "caption"}}{{ . }}{{ end }}
{{ with .Get "attrlink"}}<a href="{{ .}}">{{ end }}
{{ with .Get "attr" }}{{ . }}{{ end }}
{{ if .Get "attrlink" }}</a>{{ end }}
{{ if eq $type "full" }}
</figcaption>
{{ else }}
</span>
{{ end }}
{{ if and (not (eq $type "full")) (not (eq $type "margin")) }}
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
<img src="{{ .Get "src" }}" {{ with .Get "alt"}}alt="{{ . }}"{{ end }}>
{{ if .Get "link" }}</a>{{ end }}
{{ end }}
{{ if not (eq $type "margin") }}
</figure>
{{ end }}

View file

@ -0,0 +1 @@
<span class="newthought">{{ .Inner }}</span>