add background color for audio player

This commit is contained in:
Adrien Beudin 2017-06-04 16:28:09 +02:00
parent 34db72cffa
commit 59f96c0b24
3 changed files with 3 additions and 2 deletions

View File

@ -151,6 +151,7 @@ This section is for add audio file with HTML5 player.::
- type: audio
title: Title of song
image: song.ogg
color: "#000" (optional)
Author

View File

@ -6,7 +6,7 @@
{% set format = extension %}
{% endif %}
{{ audio.copy() }}
<div class="audio-player">
<div class="audio-player" {% if section.color %} style="background: {{ section.color }};"{% endif %}>
<h2>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h2>
<audio controls preload=none>
<source src="{{ audio }}.{{ extension }}" type="audio/{{ format }}">

View File

@ -6,7 +6,7 @@
{% set format = extension %}
{% endif %}
{{ audio.copy() }}
<div class="audio-player">
<div class="audio-player" {% if section.color %} style="background: {{ section.color }};"{% endif %}>
<h2>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h2>
<audio controls preload=none>
<source src="{{ audio }}.{{ extension }}" type="audio/{{ format }}">