56 lines
2.4 KiB
HTML
Raw Normal View History

2016-02-21 22:09:59 +01:00
{% extends "base.html" %}
{% block css %}
<link rel="stylesheet" href="static/css/materialize.css">
2017-04-28 16:46:31 +02:00
<link rel="stylesheet" href="static/css/style.css">
2017-04-27 17:59:46 +02:00
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
2017-04-28 16:46:31 +02:00
<link rel="stylesheet" href="static/css/font-awesome.css">
2018-03-27 10:52:52 +02:00
{% if settings.custom_css %}
<link type="text/css" rel="stylesheet" href="static/css/custom.css" media="screen,projection"/>
{% endif %}
2016-02-21 22:09:59 +01:00
{% endblock %}
{% block content %}
2018-03-27 10:52:52 +02:00
<div class="galleries-grid">
{% for galleries_line in galleries|reverse|batch(3)|reverse %}
<div class="galleries-line covers-{{ galleries_line|length }}">
{% for gallery in galleries_line|reverse %}<!-- comment tricks against space between inline-block
--><div class="gallery-square">
<a href="{{ gallery.link }}">
<div class="gallery-title">
<h2>{{ gallery.title }}</h2>
{% if gallery.sub_title %}<h3>{{ gallery.sub_title }}</h3>{% endif %}
{% if settings.show_date and gallery.date %}<div class="gallery-datetime">{{ gallery.date.strftime("%d %B %Y") }}</div>{% endif %}
{% if gallery.tags %}<div class="gallery-tag">IN {% for tag in gallery.tags -%} <span> {{ tag }}</span> {% endfor -%}</div>{% endif %}
</div>
</a>
{% if gallery.cover_type == "video" %}
{% set video = Video(gallery.cover) %}
{{ video.copy() }}
<div class="gallery-cover">
2017-04-28 16:46:31 +02:00
<video autoplay loop muted class="fillWidth">
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
</video>
2018-03-27 10:52:52 +02:00
<img class="fillWidth" alt="" src="{{ video.generate_thumbnail("900") }}">
2017-04-27 17:59:46 +02:00
</div>
2018-03-27 10:52:52 +02:00
{% else %}
{% set cover = Image(gallery.cover) %}
{{ cover.copy() }}
<div class="gallery-cover" style="background-image: url('{{ cover.generate_thumbnail("x900") }}'), url('{{ cover.generate_thumbnail("x150") }}');"></div>
{% endif %}
</div><!-- comment tricks against space between inline-block
-->{% endfor %}
2017-04-27 17:59:46 +02:00
</div>
2018-03-27 10:52:52 +02:00
{% endfor %}
2016-05-06 14:16:43 +02:00
</div>
<script type="text/javascript" src="static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
<script type="text/javascript" src="static/js/materialize.min.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
2016-02-21 22:09:59 +01:00
$('.button-collapse').sideNav();
$(document).ready(function(){
2017-04-27 17:59:46 +02:00
$('.scrollspy').scrollSpy();
2016-02-21 22:09:59 +01:00
});
2016-05-06 14:16:43 +02:00
</script>
{% endblock %}