From dd4ce9e8bcc6c5bdcbf2e29ea2861310f681ac1d Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Fri, 12 Oct 2018 22:52:12 +0200 Subject: [PATCH] Update colorbox, following the split of templates --- sigal/themes/colorbox/templates/album.html | 90 +++++++++++++++++- .../themes/colorbox/templates/album_list.html | 92 +------------------ .../themes/colorbox/templates/breadcrumb.html | 10 ++ 3 files changed, 99 insertions(+), 93 deletions(-) create mode 100644 sigal/themes/colorbox/templates/breadcrumb.html diff --git a/sigal/themes/colorbox/templates/album.html b/sigal/themes/colorbox/templates/album.html index baadc75..451cd28 100644 --- a/sigal/themes/colorbox/templates/album.html +++ b/sigal/themes/colorbox/templates/album.html @@ -1,2 +1,88 @@ - -{% extends "album_list.html" %} +{% extends "base.html" %} +{% block content %} + {% include 'breadcrumb.html' %} + {% set numbers = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] %} + {% set column_size = settings.colorbox_column_size %} + {% set nb_columns = (9 / column_size)|int %} + {% set column_size_t = numbers[column_size] %} + + {% macro img_description(media) -%} + {% if media.big %} data-big="{{ media.big_url }}"{% endif %} + {% if media.exif %} + {% if media.exif.datetime %} + data-date=", {{ media.exif.datetime }}" + {% endif %} + {% endif %} + {%- endmacro %} + + + + {% if album.zip %} +
+

Download ZIP

+
+ {% endif %} + + {% if album.description %} +
+ {{ album.description }} +
+ {% endif %} +{% endblock %} + +{% block footer %} + + + + + {% if 'sigal.plugins.media_page' in settings.plugins %} + + {% else %} + + {% endif %} +{% endblock %} diff --git a/sigal/themes/colorbox/templates/album_list.html b/sigal/themes/colorbox/templates/album_list.html index 5415ac9..2777a17 100644 --- a/sigal/themes/colorbox/templates/album_list.html +++ b/sigal/themes/colorbox/templates/album_list.html @@ -1,22 +1,11 @@ {% extends "base.html" %} {% block content %} -
- {% if album.breadcrumb %} -

- {% for url, title in album.breadcrumb %} - {{ title }}{% if not loop.last %} » {% endif %} - {% endfor -%} -

-
- {% endif %} -
- + {% include 'breadcrumb.html' %} {% set numbers = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"] %} {% set column_size = settings.colorbox_column_size %} {% set nb_columns = (9 / column_size)|int %} {% set column_size_t = numbers[column_size] %} - {% if album.albums %} {% for alb in album.albums %} {% if loop.index % nb_columns == 1 %}
@@ -31,71 +20,6 @@
{% endif%} {% endfor %} - {% endif %} - - {% if album.medias %} - {% macro img_description(media) -%} - {% if media.big %} data-big="{{ media.big_url }}"{% endif %} - {% if media.exif %} - {% if media.exif.datetime %} - data-date=", {{ media.exif.datetime }}" - {% endif %} - {% endif %} - {%- endmacro %} - - - {% endif %} - - {% if album.zip %} -
-

Download ZIP

-
- {% endif %} {% if album.description %}
@@ -103,17 +27,3 @@
{% endif %} {% endblock %} - -{% block footer %} - {% if album.medias %} - - - - - {% if 'sigal.plugins.media_page' in settings.plugins %} - - {% else %} - - {% endif %} - {% endif %} -{% endblock %} diff --git a/sigal/themes/colorbox/templates/breadcrumb.html b/sigal/themes/colorbox/templates/breadcrumb.html new file mode 100644 index 0000000..c39e916 --- /dev/null +++ b/sigal/themes/colorbox/templates/breadcrumb.html @@ -0,0 +1,10 @@ +
+ {% if album.breadcrumb %} +

+ {% for url, title in album.breadcrumb %} + {{ title }}{% if not loop.last %} » {% endif %} + {% endfor -%} +

+
+ {% endif %} +