Skip to content

Commit

Permalink
Use bootstrap4
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Apr 23, 2018
1 parent 38023d5 commit e3f751b
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions nikola/data/themes/bootstrap4/templates/gallery.tmpl
Expand Up @@ -16,27 +16,26 @@
%endif
%if folders:
% if galleries_use_thumbnail:
<% card_min_size = thumbnail_size + 100 %>
<div class="row">
% for folder, ftitle, fpost in folders:
<div class="col-md-4 col-sm-6 col-xs-12" style="min-height: 425px;">
<div class="thumbnail">
<a href="${folder}">
% if fpost and getattr(fpost, 'previewimage', None):
<img src="${folder}${fpost.previewimage}" style="width: 340px; height: 255px;" alt="${ftitle|h}">
% elif galleries_default_thumbnail:
<img src="${galleries_default_thumbnail}" alt="${ftitle|h}">
% else:
<div style="height: 250px; background-color: #eee;"></div>
% endif
</a>
<div class="caption">
<h3>${ftitle|h}</h3>
% if fpost and fpost.description():
<p>${fpost.description()}</p>
% endif
</div>
</div>
</div>
% for folder, ftitle, fpost in folders:
<div class="card text-center" style="margin: 20px; height: ${card_min_size}px; width: ${card_min_size}px;">
<div class="card-body thumbnail">
<a href="${folder}">
% if fpost and getattr(fpost, 'previewimage', None):
<img src="${folder}${fpost.previewimage}" alt="${ftitle|h}" style="max-height: ${thumbnail_size}px; max-width: ${thumbnail_size}px;">
% elif galleries_default_thumbnail:
<img src="${galleries_default_thumbnail}" alt="${ftitle|h}">
% else:
<div style="height: ${thumnail_size}px; background-color: #eee;"></div>
% endif
</a>
<h5 class="card-title">${ftitle|h}</h5>
% if fpost and fpost.description():
<p class="card-text">${fpost.description()}</p>
% endif
</div>
</div>
% endfor
</div>
% else:
Expand Down

0 comments on commit e3f751b

Please sign in to comment.