diff --git a/src/sigal/settings.py b/src/sigal/settings.py index 60cee8b..4978ea3 100644 --- a/src/sigal/settings.py +++ b/src/sigal/settings.py @@ -30,6 +30,7 @@ _DEFAULT_CONFIG = { "albums_sort_attr": "name", "albums_sort_reverse": False, "autorotate_images": True, + "autoplay": False, "colorbox_column_size": 3, "copy_exif_data": False, "datetime_format": "%c", diff --git a/src/sigal/templates/sigal.conf.py b/src/sigal/templates/sigal.conf.py index d09e3a0..3d8dfa8 100644 --- a/src/sigal/templates/sigal.conf.py +++ b/src/sigal/templates/sigal.conf.py @@ -39,6 +39,10 @@ theme = "galleria" # Path to a CSS file that can be used to customize themes # user_css = +# Enable autoplay in galleries. +# This option only has an effect on the galleria theme for now. +# autoplay = False + # ---------------- # Image processing (ignored if use_orig = True) # ---------------- diff --git a/src/sigal/themes/galleria/templates/album_items.html b/src/sigal/themes/galleria/templates/album_items.html index b6f6368..7f8d3d3 100644 --- a/src/sigal/themes/galleria/templates/album_items.html +++ b/src/sigal/themes/galleria/templates/album_items.html @@ -93,6 +93,7 @@ }); Galleria.configure({ + {% if settings.autoplay %}autoplay: true,{% endif %} imageCrop: false, transition: "fade", thumbnails: "lazy"