Merge branch 'master' of https://github.com/Psycojoker/prosopopee
This commit is contained in:
commit
86b5b0b4a2
@ -447,6 +447,9 @@ def build_gallery(settings, gallery_settings, gallery_path, template):
|
|||||||
Video.base_dir = Path(".").joinpath(gallery_path)
|
Video.base_dir = Path(".").joinpath(gallery_path)
|
||||||
Video.target_dir = Path(".").joinpath("build", 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")
|
light_template_to_render = light_templates.get_template("gallery-index.html")
|
||||||
|
|
||||||
html = light_template_to_render.render(
|
html = light_template_to_render.render(
|
||||||
@ -454,6 +457,7 @@ def build_gallery(settings, gallery_settings, gallery_path, template):
|
|||||||
gallery=gallery_settings,
|
gallery=gallery_settings,
|
||||||
Image=Image,
|
Image=Image,
|
||||||
Video=Video,
|
Video=Video,
|
||||||
|
Audio=Audio,
|
||||||
link=gallery_light_path,
|
link=gallery_light_path,
|
||||||
name=gallery_path.split('/', 1)[-1]
|
name=gallery_path.split('/', 1)[-1]
|
||||||
).encode("Utf-8")
|
).encode("Utf-8")
|
||||||
|
13
prosopopee/themes/light/templates/sections/audio.html
Normal file
13
prosopopee/themes/light/templates/sections/audio.html
Normal file
@ -0,0 +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 %}
|
||||||
|
<h4>{% if section.title %}{{ section.title }}{% else %}{{ audio }}{% endif %}</h4>
|
||||||
|
<audio controls>
|
||||||
|
<source src="{{ pathstatic }}/{{ audio }}.mp3" type="audio/mpeg">
|
||||||
|
</audio>
|
Loading…
x
Reference in New Issue
Block a user