added audio shortcode

This commit is contained in:
Eorn 2020-11-04 16:50:36 +01:00
parent ebdf820d95
commit 4c2adcd0fe
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
<audio controls preload="{{ .Get "preload" | default "metadata" }}">
{{ with .Get "src" }}<source src="{{ . }}" type="audio/mpeg">{{ end }}
</audio>
{{ with .Get "caption" }}<figcaption><h4>{{ . }}</h4></figcaption>{{ end }}
</figure>

View file

@ -434,6 +434,12 @@ figure img {
max-width: 100%; max-width: 100%;
} }
figure.audiofig audio {
width: 90%;
align: center;
}
.center { .center {
text-align: center; text-align: center;
} }