2018-04-19 06:22:53 +00:00
|
|
|
{% extends "_layout.njk" %}
|
2018-04-18 21:00:36 +00:00
|
|
|
|
|
|
|
{% block stylesheets %}
|
|
|
|
<!-- Stylesheets -->
|
2018-12-11 12:31:48 +00:00
|
|
|
<link rel="stylesheet" href="../libs/bulma/bulma.min.css?v={{ globals.v3 }}">
|
|
|
|
<link rel="stylesheet" href="../css/style.css?v={{ globals.v1 }}">
|
2019-09-01 19:23:16 +00:00
|
|
|
<link rel="stylesheet" href="../css/thumbs.css?v={{ globals.v1 }}">
|
2018-12-11 12:31:48 +00:00
|
|
|
<link rel="stylesheet" href="../css/album.css?v={{ globals.v1 }}">
|
2018-04-18 21:00:36 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2018-04-29 12:47:24 +00:00
|
|
|
{% block scripts %}
|
2019-09-01 19:23:16 +00:00
|
|
|
{% if not nojs -%}
|
2018-08-20 23:24:50 +00:00
|
|
|
<!-- Scripts -->
|
2018-12-11 12:31:48 +00:00
|
|
|
<script src="../libs/lazyload/lazyload.min.js?v={{ globals.v3 }}"></script>
|
|
|
|
<script src="../js/album.js?v={{ globals.v1 }}"></script>
|
2019-09-01 19:23:16 +00:00
|
|
|
<script src="../js/s/utils.js?v={{ globals.v1 }}"></script>
|
|
|
|
{% endif %}
|
2018-04-29 12:47:24 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2018-04-23 19:58:44 +00:00
|
|
|
{% block opengraph %}
|
2018-04-18 21:00:36 +00:00
|
|
|
<!-- Open Graph tags -->
|
|
|
|
<meta property="og:type" content="website" />
|
2018-12-13 09:09:46 +00:00
|
|
|
<meta property="og:title" content="{{ title | safe }} – {{ count }} files" />
|
2018-04-18 21:00:36 +00:00
|
|
|
<meta property="og:url" content="{{ url }}" />
|
2018-12-13 09:13:03 +00:00
|
|
|
<meta property="og:description" content="{{ description | safe }}" />
|
2018-04-18 21:00:36 +00:00
|
|
|
<meta property="og:image" content="{{ thumb }}" />
|
|
|
|
<meta property="og:locale" content="en_US" />
|
|
|
|
|
|
|
|
<!-- Twitter Card tags -->
|
|
|
|
<meta name="twitter:card" content="summary">
|
2018-12-13 09:09:46 +00:00
|
|
|
<meta name="twitter:title" content="{{ title | safe }} – {{ count }} files">
|
2018-12-13 09:13:03 +00:00
|
|
|
<meta name="twitter:description" content="{{ description | safe }}">
|
2018-04-18 21:00:36 +00:00
|
|
|
<meta name="twitter:image" content="{{ thumb }}">
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{{ super() }}
|
|
|
|
<section class="section">
|
|
|
|
<div class="container">
|
2018-04-26 21:04:21 +00:00
|
|
|
<nav class="level">
|
|
|
|
<div class="level-left">
|
|
|
|
<div class="level-item">
|
|
|
|
<h1 id="title" class="title">
|
2018-12-13 09:09:46 +00:00
|
|
|
{{ title | safe }}
|
2018-04-26 21:04:21 +00:00
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<div class="level-item">
|
|
|
|
<h1 id="count" class="subtitle">
|
2019-04-19 04:56:57 +00:00
|
|
|
{{ count }} files (<span class="file-size">{{ totalSize }} B</span>)
|
2018-04-26 21:04:21 +00:00
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-04-28 17:26:39 +00:00
|
|
|
{% if generateZips and files.length -%}
|
2018-04-26 21:04:21 +00:00
|
|
|
<div class="level-right">
|
|
|
|
<p class="level-item">
|
2018-04-28 17:26:39 +00:00
|
|
|
{% if downloadLink -%}
|
2018-12-13 09:09:46 +00:00
|
|
|
<a class="button is-primary is-outlined" title="Be aware that album archive may be cached by CDN" href="{{ downloadLink }}">Download album</a>
|
2018-04-28 17:26:39 +00:00
|
|
|
{%- else -%}
|
2018-04-29 13:17:02 +00:00
|
|
|
<a class="button is-primary is-outlined" title="The album's owner has chosen to disable download" disabled>Download disabled</a>
|
2018-04-28 17:26:39 +00:00
|
|
|
{%- endif %}
|
2018-04-26 21:04:21 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{%- endif %}
|
|
|
|
</nav>
|
2019-09-01 19:23:16 +00:00
|
|
|
|
2018-12-13 09:09:46 +00:00
|
|
|
{% if description -%}
|
|
|
|
<h2 class="subtitle description">
|
|
|
|
{{ description | safe }}
|
|
|
|
</h2>
|
2018-04-26 21:04:21 +00:00
|
|
|
{%- endif %}
|
2018-04-18 21:00:36 +00:00
|
|
|
<hr>
|
2019-09-01 19:23:16 +00:00
|
|
|
|
|
|
|
{% if nojs -%}
|
|
|
|
<article class="message">
|
|
|
|
<div class="message-body">
|
|
|
|
<p>You are viewing No-JS version of this album, so file size will be displayed in bytes.</p>
|
2019-09-12 07:44:31 +00:00
|
|
|
<p>Please <a href="{{ url }}">click here</a> if you want to view its regular version.</p>
|
2019-09-01 19:23:16 +00:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{%- endif %}
|
|
|
|
|
2018-04-26 21:04:21 +00:00
|
|
|
{% if files.length -%}
|
2018-04-26 18:33:11 +00:00
|
|
|
<div id="table" class="columns is-multiline is-mobile is-centered has-text-centered">
|
|
|
|
{% for file in files %}
|
|
|
|
<div class="image-container column is-narrow">
|
2018-04-29 12:47:24 +00:00
|
|
|
<a class="image" href="{{ file.file }}" target="_blank" rel="noopener">
|
|
|
|
{% if file.thumb -%}
|
2019-09-01 19:23:16 +00:00
|
|
|
{% if nojs -%}
|
|
|
|
<img alt="{{ file.name }}" src="{{ file.thumb }}">
|
|
|
|
{%- else -%}
|
|
|
|
<img alt="{{ file.name }}" data-src="{{ file.thumb }}">
|
|
|
|
{%- endif %}
|
2018-04-29 12:47:24 +00:00
|
|
|
{%- else -%}
|
|
|
|
<h1 class="title">{{ file.extname | default('N/A') }}</h1>
|
|
|
|
{%- endif %}
|
|
|
|
</a>
|
2018-04-26 18:33:11 +00:00
|
|
|
<div class="details">
|
|
|
|
<p><span class="name" title="{{ file.file }}">{{ file.name }}</span></p>
|
2019-04-19 04:56:57 +00:00
|
|
|
<p class="file-size">{{ file.size }} B</p>
|
2018-04-26 18:33:11 +00:00
|
|
|
</div>
|
2018-04-18 21:00:36 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2018-04-26 21:04:21 +00:00
|
|
|
{%- else -%}
|
|
|
|
<article class="message">
|
|
|
|
<div class="message-body">
|
2018-04-27 03:03:13 +00:00
|
|
|
There are no files in the album.
|
2018-04-26 21:04:21 +00:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{%- endif %}
|
2018-04-18 21:00:36 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
2018-04-29 12:47:24 +00:00
|
|
|
|
2019-09-01 19:23:16 +00:00
|
|
|
{% if not nojs -%}
|
2018-04-29 12:47:24 +00:00
|
|
|
<noscript>
|
2019-09-01 19:23:16 +00:00
|
|
|
<style>body > section:not(#noscript) { display: none !important; }</style>
|
|
|
|
<section id="noscript" class="hero is-fullheight">
|
|
|
|
<div class="hero-body">
|
|
|
|
<div class="container has-text-centered">
|
|
|
|
<p>You have JavaScript disabled, but this page requires JavaScript to function.</p>
|
|
|
|
<p>Please <a href="{{ url }}?nojs">click here</a> if you want to view its No-JS version.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2018-04-29 12:47:24 +00:00
|
|
|
</noscript>
|
2019-09-01 19:23:16 +00:00
|
|
|
{%- endif %}
|
2018-04-18 21:00:36 +00:00
|
|
|
{% endblock %}
|