diff --git a/sigal/gallery.py b/sigal/gallery.py index 8947ffb..fc3afe7 100644 --- a/sigal/gallery.py +++ b/sigal/gallery.py @@ -60,6 +60,7 @@ class Media: - ``filename``: Filename of the resized image. - ``thumbnail``: Location of the corresponding thumbnail image. - ``big``: If not None, location of the unmodified image. + - ``big_url``: If not None, url of the unmodified image. - ``exif``: If not None contains a dict with the most common tags. For more information, see :ref:`simple-exif-data`. - ``raw_exif``: If not ``None``, it contains the raw EXIF tags. @@ -112,14 +113,14 @@ class Media: check_or_create_dir(orig_path) big_path = join(orig_path, self.src_filename) if not isfile(big_path): - copy(self.src_path, big_path, - symlink=s['orig_link']) + copy(self.src_path, big_path, symlink=s['orig_link']) return join(s['orig_dir'], self.src_filename) @property def big_url(self): """URL of the original media.""" - return url_from_path(self.big) + if self.big is not None: + return url_from_path(self.big) @property def thumbnail(self): diff --git a/sigal/themes/colorbox/templates/album_list.html b/sigal/themes/colorbox/templates/album_list.html index 7e67953..5415ac9 100644 --- a/sigal/themes/colorbox/templates/album_list.html +++ b/sigal/themes/colorbox/templates/album_list.html @@ -51,27 +51,27 @@ {% if media.type == "image" %}
{% if 'sigal.plugins.media_page' in settings.plugins %} - + data-href="{{ media.url }}" {{ img_description(media) }}> {% else %} {% endif %} - {{ media.filename }}
{% endif %} {% if media.type == "video" %} - {% set mhash = media.filename|replace('.', '')|replace(' ', '') %} + {% set mhash = media.url|replace('.', '')|replace(' ', '') %}
{% if 'sigal.plugins.media_page' in settings.plugins %} - - {{ media.filename }}
diff --git a/sigal/themes/colorbox/templates/media.html b/sigal/themes/colorbox/templates/media.html index 21a8bb5..6d57e12 100644 --- a/sigal/themes/colorbox/templates/media.html +++ b/sigal/themes/colorbox/templates/media.html @@ -15,20 +15,20 @@ {% if media %}
{% if media.type == "image" %} - {{ media.title }} + {{ media.title }} {% endif %} {% if media.type == "video" %} {% endif %}

{% if previous_media %} - « previous + « previous {% endif %} {% if next_media %} - next » + next » {% endif %}

diff --git a/sigal/themes/galleria/templates/album.html b/sigal/themes/galleria/templates/album.html index d093e16..001b3a2 100644 --- a/sigal/themes/galleria/templates/album.html +++ b/sigal/themes/galleria/templates/album.html @@ -7,7 +7,7 @@ {% endif %} @@ -81,18 +81,18 @@ var data = [ {% for media in album.medias -%} { - title: "{{ media.title if media.title else media.filename }}", + title: "{{ media.title }}", description: "{{ img_description(media) | e }}", thumb: "{{ media.thumbnail }}", {% if media.big %} big: "{{ media.big_url }}", {% endif %} {% if media.type == "image" %} - image: "{{ media.filename }}" + image: "{{ media.url }}" {% endif %} {% if media.type == "video" %} image: "{{ theme.url }}/img/empty.png", - layer: "" + layer: "" {% endif %} }, {% endfor %} diff --git a/sigal/themes/photoswipe/templates/album_list.html b/sigal/themes/photoswipe/templates/album_list.html index 7872406..f0f79b2 100644 --- a/sigal/themes/photoswipe/templates/album_list.html +++ b/sigal/themes/photoswipe/templates/album_list.html @@ -71,14 +71,14 @@ {% if loop.first %} {% else %} @@ -86,7 +86,7 @@ {% endif %} {% if media.type == "video" %}