mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-31 15:21:33 +00:00
86b51fe5f5
This adds Cookie Consent library at public/libs/cookieconsent. Added views/cookiepolicy.njk. Added a new config option cookiePolicy. Disabled by default. Updated views/faq.njk to use variables wherever applicable. The variables are initiated at views/_globals.njk. The said file also contains variables used at views/cookiepolicy.njk. Restored messages about Cloudflare to FAQ. They will be shown only if config.cloudflare.purgeCache is enabled. Statistics will now capitalize first letters of the keys instead. Updated background color of SweetAlert modals. Moved table styling from dashboard.css to style.css (global), since table will also be used in Cookie Policy page. Bumped v1 version string and rebuilt client assets.
194 lines
7.5 KiB
Plaintext
194 lines
7.5 KiB
Plaintext
{% extends "_layout.njk" %}
|
|
|
|
{% set maxSizeInt = config.uploads.maxSize | int %}
|
|
{% set urlMaxSizeInt = config.uploads.urlMaxSize | int %}
|
|
{% set urlDisclaimerMessage = config.uploads.urlDisclaimerMessage %}
|
|
{% set urlExtensionsFilterMode = config.uploads.urlExtensionsFilterMode %}
|
|
{% set urlExtensionsFilter = config.uploads.urlExtensionsFilter %}
|
|
{% set urlExtensionsFilterEnabled = urlExtensionsFilterMode and urlExtensionsFilterMode !== 'inherit' and urlExtensionsFilter.length %}
|
|
{% set temporaryUploadAges = config.uploads.temporaryUploadAges %}
|
|
{% set cookiePolicy = config.cookiePolicy %}
|
|
|
|
{% block stylesheets %}
|
|
{{ super() }}
|
|
<link rel="stylesheet" href="libs/fontello/fontello.css{{ versions[1] }}">
|
|
{% if cookiePolicy -%}
|
|
<link rel="stylesheet" href="libs/cookieconsent/cookieconsent.min.css{{ versions[3] }}">
|
|
{%- endif %}
|
|
<link rel="stylesheet" href="css/sweetalert.css{{ versions[1] }}">
|
|
<link rel="stylesheet" href="css/home.css{{ versions[1] }}">
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
{{ super() }}
|
|
<script src="libs/sweetalert/sweetalert.min.js{{ versions[3] }}"></script>
|
|
<script src="libs/dropzone/dropzone.min.js{{ versions[3] }}"></script>
|
|
<script src="libs/axios/axios.min.js{{ versions[3] }}"></script>
|
|
<script src="libs/clipboard.js/clipboard.min.js{{ versions[3] }}"></script>
|
|
<script src="libs/lazyload/lazyload.min.js{{ versions[3] }}"></script>
|
|
{% if cookiePolicy -%}
|
|
<script src="libs/cookieconsent/cookieconsent.min.js{{ versions[3] }}"></script>
|
|
{%- endif %}
|
|
{# We assign an ID for this so that the script can find out its own version #}
|
|
<script id="mainScript" src="js/home.js{{ versions[1] }}"></script>
|
|
<script src="js/misc/utils.js{{ versions[1] }}"></script>
|
|
{# We assign an ID for this so that the script can find out version string for render images #}
|
|
<script id="renderScript" data-version="{{ versions[4] }}" src="js/misc/render.js{{ versions[1] }}"></script>
|
|
{% endblock %}
|
|
|
|
{% block endmeta %}
|
|
{% include "_partial/noscript-refresh.njk" %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ super() }}
|
|
<section id="home" class="hero is-fullheight">
|
|
<div class="hero-body">
|
|
<div class="container has-text-centered">
|
|
<p id="b" class="is-relative">
|
|
<img class="logo is-hidden-mobile" alt="logo" src="images/logo_smol.png{{ versions[2] }}">
|
|
<img class="logo is-2x is-block-mobile" alt="logo" src="images/logo_smol@2x.png{{ versions[2] }}">
|
|
</p>
|
|
<h1 class="title">{{ globals.name }}</h1>
|
|
<h2 class="subtitle">{{ globals.home_subtitle | safe }}</h2>
|
|
|
|
<h3 id="maxSize" class="subtitle">
|
|
Maximum upload size per file is <span>{{ maxSizeInt }} MB</span>
|
|
</h3>
|
|
|
|
<div class="columns is-gapless">
|
|
<div class="column is-hidden-mobile"></div>
|
|
<div class="column">
|
|
<a id="loginToUpload" class="button is-danger is-outlined is-fullwidth is-loading"></a>
|
|
<div id="albumDiv" class="field has-addons is-hidden">
|
|
<div class="control is-expanded">
|
|
<div class="select is-fullwidth">
|
|
<select id="albumSelect">
|
|
<option value="" selected>Upload to album</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="control">
|
|
<a id="createAlbum" class="button is-info is-outlined" title="Create new album">
|
|
<i class="icon-plus"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div id="tabs" class="tabs is-centered is-boxed is-hidden">
|
|
<ul>
|
|
<li data-id="tab-files" class="is-active">
|
|
<a>
|
|
<span class="icon is-small"><i class="icon-docs"></i></span>
|
|
<span>Files</span>
|
|
</a>
|
|
</li>
|
|
{% if urlMaxSizeInt -%}
|
|
<li data-id="tab-urls">
|
|
<a>
|
|
<span class="icon is-small"><i class="icon-link"></i></span>
|
|
<span>URLs</span>
|
|
</a>
|
|
</li>
|
|
{%- endif %}
|
|
<li data-id="tab-config">
|
|
<a>
|
|
<span class="icon is-small"><i class="icon-cog-alt"></i></span>
|
|
<span>Config</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="tab-files" class="tab-content is-hidden">
|
|
<div class="field dz-container"></div>
|
|
<div class="field uploads"></div>
|
|
</div>
|
|
{% if urlMaxSizeInt -%}
|
|
<div id="tab-urls" class="tab-content is-hidden">
|
|
<div class="field">
|
|
<div class="control">
|
|
<textarea id="urls" class="textarea" rows="2"></textarea>
|
|
</div>
|
|
<p class="help">
|
|
{% if urlMaxSizeInt !== maxSizeInt -%}
|
|
Maximum file size per URL is <span id="urlMaxSize">{{ urlMaxSizeInt }} MB</span>.
|
|
{{- ' ' }}{% endif -%}
|
|
|
|
{% if urlExtensionsFilterEnabled -%}
|
|
{% if urlExtensionsFilterMode === 'blacklist' -%}
|
|
Blacklist:
|
|
{%- elif urlExtensionsFilterMode === 'whitelist' -%}
|
|
Whitelist:
|
|
{%- endif %}{{ ' ' -}}
|
|
{% set comma = joiner(', ') %}
|
|
{%- for extension in urlExtensionsFilter -%}
|
|
{{ comma() }}{{ extension | replace('.', '') | upper }}
|
|
{%- endfor %}.
|
|
{{- ' ' }}{% endif -%}
|
|
|
|
{%- if urlDisclaimerMessage -%}
|
|
{{ urlDisclaimerMessage | safe }}
|
|
{%- endif %}
|
|
</p>
|
|
</div>
|
|
<div class="field">
|
|
<div class="control">
|
|
<a id="uploadUrls" class="button is-danger is-outlined is-fullwidth is-unselectable">
|
|
<span class="icon">
|
|
<i class="icon-upload-cloud"></i>
|
|
</span>
|
|
<span>Upload URLs</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="field uploads"></div>
|
|
</div>
|
|
{%- endif %}
|
|
<div id="tab-config" class="tab-content is-hidden"></div>
|
|
</div>
|
|
<div class="column is-hidden-mobile"></div>
|
|
</div>
|
|
|
|
<div id="tpl" class="is-hidden">
|
|
<div class="field">
|
|
<i class="icon is-hidden"></i>
|
|
<img class="is-unselectable is-hidden">
|
|
<p class="name"></p>
|
|
<p class="descriptive-progress"></p>
|
|
<p class="error is-hidden"></p>
|
|
<p class="link is-hidden">
|
|
<a target="_blank"></a>
|
|
</p>
|
|
<p class="help expiry-date is-hidden"></p>
|
|
<p class="clipboard-mobile is-hidden">
|
|
<a class="button is-small is-info is-outlined is-flex clipboard-js">
|
|
<span class="icon">
|
|
<i class="icon-clipboard"></i>
|
|
</span>
|
|
<span>Copy link to clipboard</span>
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<h3 class="subtitle">
|
|
<a href="auth" id="loginLinkText"></a>
|
|
</h3>
|
|
|
|
{% include "_partial/links.njk" %}
|
|
|
|
{% if gitHash -%}
|
|
<div class="git-commit columns is-gapless">
|
|
<div class="column is-hidden-mobile"></div>
|
|
<div class="column">
|
|
<span>Git commit: </span><a href="https://github.com/BobbyWibowo/lolisafe/commit/{{ gitHash }}" target="_blank" rel="noopener">{{ gitHash }}</a>
|
|
</div>
|
|
<div class="column is-hidden-mobile"></div>
|
|
</div>
|
|
{%- endif %}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{% include "_partial/noscript.njk" %}
|
|
{% endblock %}
|