Browse Source

added audio shortcode

master
Eorn 2 years ago
parent
commit
4c2adcd0fe
  1. 7
      layouts/shortcodes/audio.html
  2. 6
      static/css/style.css

7
layouts/shortcodes/audio.html

@ -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>

6
static/css/style.css

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

Loading…
Cancel
Save