87 lines
3.2 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
2015-12-08 10:42:00 +01:00
{% block css %}
2016-11-04 12:55:02 +01:00
<link type="text/css" rel="stylesheet" href="static/css/fonts.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="static/css/style.css" media="screen,projection"/>
2017-07-03 13:37:38 +02:00
{% if settings.custom_css %}
<link type="text/css" rel="stylesheet" href="static/css/custom.css" media="screen,projection"/>
{% endif %}
{% endblock %}
{% block logo %}
2016-11-04 12:55:02 +01:00
{% if sub_index %}
<div class="back-to-home">
<hr>
<a href="../">
<div id="logo" src="static/img/logo.svg">
Back
2016-11-01 15:04:37 +01:00
</div>
2016-11-04 12:55:02 +01:00
</a>
</div>
{% else %}
<img id="logo" src="static/img/logo.svg"/>
{% endif %}
{% endblock %}
{% block content %}
2016-11-04 12:55:02 +01:00
<div class="galleries-grid">
{% for galleries_line in galleries|reverse|batch(3)|reverse %}
2018-11-01 18:59:32 +01:00
{% if loop.index is divisibleby 3 or loop.index is divisibleby 2 %}
{% set no_big_gallery_cover = true %}
{% endif %}
2016-11-04 12:55:02 +01:00
<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>
2016-11-04 12:55:02 +01:00
</a>
{% if gallery.cover_type == "video" %}
{% set video = Video(gallery.cover) %}
{{ video.copy() }}
<div class="gallery-cover">
<video autoplay loop muted class="fillWidth">
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
</video>
<img class="fillWidth" alt="" src="{{ video.generate_thumbnail("900") }}">
</div>
{% else %}
{% set cover = Image(gallery.cover) %}
{{ cover.copy() }}
2018-11-01 18:59:32 +01:00
{% if no_big_gallery_cover %}
2016-11-04 12:55:02 +01:00
<div class="gallery-cover" style="background-image: url('{{ cover.generate_thumbnail("x900") }}'), url('{{ cover.generate_thumbnail("x150") }}');"></div>
2018-11-01 18:59:32 +01:00
{% else %}
<div class="gallery-cover" style="background-image: url('{{ cover.generate_thumbnail("x1366") }}'), url('{{ cover.generate_thumbnail("x900") }}');"></div>
{% endif %}
2016-11-04 12:55:02 +01:00
{% endif %}
</div><!-- comment tricks against space between inline-block
-->{% endfor %}
</div>
{% endfor %}
</div>
<p style="visibility: hidden">.</p>
2018-02-27 13:53:48 +01:00
{% if settings.settings.night_mode %}
<script type="text/javascript" src="./static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
<script type="text/javascript">
if (localStorage.getItem("mode_night") == "true") {
$('body').addClass('night');
document.getElementById("toggle-box-checkbox").checked = true;
}
$('#toggle-box-checkbox').on('change', function(){
if(this.checked){
$('body').addClass('night');
localStorage.setItem("mode_night", true);
}else{
$('body').removeClass('night');
localStorage.setItem("mode_night", false);
}
});
</script>
{% endif %}
{% endblock %}