diff --git a/docs/themes.rst b/docs/themes.rst index 3057c2e..35782dc 100644 --- a/docs/themes.rst +++ b/docs/themes.rst @@ -26,6 +26,13 @@ Variables You can use the following variables in your template: +``album`` + The current album that is rendered in the HTML file, represented by an + :class:`~sigal.gallery.Album` object. ``album.medias`` contains the list + of all medias in the album (represented by the + :class:`~sigal.gallery.Image` and :class:`~sigal.gallery.Video` objects, + inherited from :class:`~sigal.gallery.Media`). + ``index_title`` Name of the index. This is either the directory name or the title specified in the ``index.md`` of the ``source`` directory. @@ -39,20 +46,11 @@ You can use the following variables in your template: ``theme.name``, ``theme.url`` Name and url of the currently used theme. -Then the current album that is rendered in the HTML file is represented by an -:class:`~sigal.gallery.Album` object, and the following attributes are -available in the template: ``albums``, ``breadcrumb``, ``description``, -``index_url``, ``medias``, ``meta``, ``zip``, ``title``. - .. autoclass:: sigal.gallery.Album :members: :undoc-members: :inherited-members: -``medias`` contains the list of all medias in the album (represented by the -:class:`~sigal.gallery.Image` and :class:`~sigal.gallery.Video` objects, -inherited from :class:`~sigal.gallery.Media`). - .. autoclass:: sigal.gallery.Media :members: :undoc-members: diff --git a/sigal/gallery.py b/sigal/gallery.py index c8472da..f28b5f2 100644 --- a/sigal/gallery.py +++ b/sigal/gallery.py @@ -432,14 +432,14 @@ class Gallery(object): self.writer = Writer(self.settings, theme=self.theme, index_title=self.albums['.'].title) - for path, album in self.albums.items(): - self.writer.write(self.albums, path, album) + for album in self.albums.values(): + self.writer.write(album) def process_dir(self, album, force=False): """Process a list of images in a directory.""" if sys.stdout.isatty(): - print(colored('\n->', BLUE), str(album)) + print(colored('->', BLUE), str(album)) else: self.logger.warn(album) diff --git a/sigal/themes/colorbox/templates/index.html b/sigal/themes/colorbox/templates/index.html index 85ccb84..4192cb9 100644 --- a/sigal/themes/colorbox/templates/index.html +++ b/sigal/themes/colorbox/templates/index.html @@ -4,7 +4,7 @@ -