Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #226 from getnikola/fix-gallery-directive
Make the gallery directive less of a hack
- Loading branch information
Showing
3 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
v7/gallery_directive/templates/mako/gallery_directive.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## -*- coding: utf-8 -*- | ||
|
||
%if post: | ||
<p> | ||
${post.text()} | ||
</p> | ||
%endif | ||
|
||
<div id="gallery_container"></div> | ||
%if photo_array: | ||
<div class="row"> | ||
%for image in photo_array: | ||
<div class="col-xs-6 col-md-3"> | ||
<a href="${image['url']}" class="thumbnail image-reference" title="${image['title']|h}"> | ||
<img src="${image['url_thumb']}" alt="${image['title']|h}" /> | ||
</a> | ||
</div> | ||
%endfor | ||
</div> | ||
|
||
<ul class="thumbnails"> | ||
<li> | ||
</ul> | ||
%endif |