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 }}">
|
|
|
|
<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 %}
|
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>
|
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" />
|
|
|
|
<meta property="og:title" content="{{ title }} – {{ count }} files" />
|
|
|
|
<meta property="og:url" content="{{ url }}" />
|
|
|
|
<meta property="og:description" content="A pomf-like file uploading service that doesn't suck." />
|
|
|
|
<meta property="og:image" content="{{ thumb }}" />
|
|
|
|
<meta property="og:locale" content="en_US" />
|
|
|
|
|
|
|
|
<!-- Twitter Card tags -->
|
|
|
|
<meta name="twitter:card" content="summary">
|
|
|
|
<meta name="twitter:title" content="{{ title }} – {{ count }} files">
|
|
|
|
<meta name="twitter:description" content="A pomf-like file uploading service that doesn't suck.">
|
|
|
|
<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">
|
|
|
|
{{ title }}
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<div class="level-item">
|
|
|
|
<h1 id="count" class="subtitle">
|
|
|
|
{{ count }} files
|
|
|
|
</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 -%}
|
|
|
|
<a class="button is-primary is-outlined" title="Download album" href="{{ downloadLink }}">Download album</a>
|
|
|
|
{%- 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>
|
2018-04-28 17:26:39 +00:00
|
|
|
{% if generateZips and downloadLink and files.length -%}
|
2018-04-26 21:04:21 +00:00
|
|
|
<article class="message">
|
|
|
|
<div class="message-body">
|
2018-12-07 22:10:35 +00:00
|
|
|
Album archives may be cached by CDN, if the one you have downloaded seems outdated, refresh the page to get the latest download link.
|
2018-04-26 21:04:21 +00:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
{%- endif %}
|
2018-04-18 21:00:36 +00:00
|
|
|
<hr>
|
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 -%}
|
|
|
|
<img alt="{{ file.name }}" data-src="{{ file.thumb }}">
|
|
|
|
{#-
|
|
|
|
This will kinda increase the overall page size,
|
|
|
|
but this will still benefit users with JavaScript enabled by lazyloading images,
|
|
|
|
and not causing those who have JavaScript disabled be unable to view the images.
|
|
|
|
#}
|
|
|
|
<noscript><img alt="{{ file.name }}" src="{{ file.thumb }}" style="display: none"></noscript>
|
|
|
|
{%- 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>
|
2018-10-11 19:21:19 +00:00
|
|
|
<p class="file-size">{{ file.size }}</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
|
|
|
|
|
|
|
{# Hide lazyload img tags and show noscript img tags #}
|
|
|
|
<noscript>
|
|
|
|
<style>
|
|
|
|
img[data-src] { display: none; }
|
|
|
|
img[src] { display: block !important; }
|
|
|
|
</style>
|
|
|
|
</noscript>
|
2018-04-18 21:00:36 +00:00
|
|
|
{% endblock %}
|