Browse Source

Add autoplay setting for galleria

pull/520/head
Markus Blöchl 2 years ago
parent
commit
dc326ec8ef
  1. 1
      src/sigal/settings.py
  2. 4
      src/sigal/templates/sigal.conf.py
  3. 1
      src/sigal/themes/galleria/templates/album_items.html

1
src/sigal/settings.py

@ -30,6 +30,7 @@ _DEFAULT_CONFIG = {
"albums_sort_attr": "name", "albums_sort_attr": "name",
"albums_sort_reverse": False, "albums_sort_reverse": False,
"autorotate_images": True, "autorotate_images": True,
"autoplay": False,
"colorbox_column_size": 3, "colorbox_column_size": 3,
"copy_exif_data": False, "copy_exif_data": False,
"datetime_format": "%c", "datetime_format": "%c",

4
src/sigal/templates/sigal.conf.py

@ -39,6 +39,10 @@ theme = "galleria"
# Path to a CSS file that can be used to customize themes # Path to a CSS file that can be used to customize themes
# user_css = # 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) # Image processing (ignored if use_orig = True)
# ---------------- # ----------------

1
src/sigal/themes/galleria/templates/album_items.html

@ -93,6 +93,7 @@
}); });
Galleria.configure({ Galleria.configure({
{% if settings.autoplay %}autoplay: true,{% endif %}
imageCrop: false, imageCrop: false,
transition: "fade", transition: "fade",
thumbnails: "lazy" thumbnails: "lazy"

Loading…
Cancel
Save