-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gallery template and photo processing
- Loading branch information
Showing
4 changed files
with
126 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends '_theme/photos.tpl' %} | ||
|
||
{% block body %} | ||
{{ super() }} | ||
<div id="gallery"> | ||
{% for i in p.photos %} | ||
<a data-fancybox="photo" href="{{ i.src }}"><img src="{{ i.thumb }}"/></a> | ||
{% endfor %} | ||
</div> | ||
{% endblock %} |
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,30 @@ | ||
{% extends '_theme/base.tpl' %} | ||
|
||
{% block head %} | ||
{{ super() }} | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css"/> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/css/justifiedGallery.css"/> | ||
{% endblock %} | ||
|
||
{% block js %} | ||
{{ super() }} | ||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/justifiedGallery@3.7.0/dist/js/jquery.justifiedGallery.min.js"></script> | ||
<script> | ||
$("#gallery").justifiedGallery({ | ||
rowHeight : 150, | ||
// margins : 3, | ||
// lastRow : 'nojustify', | ||
}); | ||
</script> | ||
{% endblock %} | ||
|
||
{% block body %} | ||
<div class="title"> | ||
<ul class="meta"> | ||
<li><a href="{{ p.parent.parent.url }}">{{ p.parent.parent.title|striptags }}</a></li> | ||
<li><a href="{{ p.parent.url }}">{{ p.parent.title|striptags }}</a></li> | ||
</ul> | ||
</div> | ||
{% endblock %} |
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