diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 02d6dd9..eb704d9 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -445,6 +445,9 @@ def build_gallery(settings, gallery_settings, gallery_path, template): Video.base_dir = Path(".").joinpath(gallery_path) Video.target_dir = Path(".").joinpath("build", gallery_path) + Audio.base_dir = Path(".").joinpath(gallery_path) + Audio.target_dir = Path(".").joinpath("build", gallery_path) + light_template_to_render = light_templates.get_template("gallery-index.html") html = light_template_to_render.render( @@ -452,6 +455,7 @@ def build_gallery(settings, gallery_settings, gallery_path, template): gallery=gallery_settings, Image=Image, Video=Video, + Audio=Audio, link=gallery_light_path, name=gallery_path.split('/', 1)[-1] ).encode("Utf-8") diff --git a/prosopopee/themes/light/templates/sections/audio.html b/prosopopee/themes/light/templates/sections/audio.html index f40a13e..7ac96f5 100644 --- a/prosopopee/themes/light/templates/sections/audio.html +++ b/prosopopee/themes/light/templates/sections/audio.html @@ -1,8 +1,13 @@ +{% if settings.settings.light_mode %} +{% set pathstatic = ".." %} +{% else %} +{% set pathstatic = "." %} +{% endif %} {% if section.image.type == "audio" %} {% set audio = Audio(section.image) %} {{ audio.copy() }} {% endif %} -

{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}

+

{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}