mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 07:56:23 +00:00
89 lines
3.1 KiB
Plaintext
89 lines
3.1 KiB
Plaintext
{% set metaTitle = "No-JS uploader" %}
|
|
{% set metaUrl = '/nojs' %}
|
|
|
|
{% extends "_layout.njk" %}
|
|
|
|
{% set maxSizeInt = config.uploads.maxSize | int %}
|
|
{% set noJsMaxSizeInt = config.cloudflare.noJsMaxSize | int %}
|
|
|
|
{% block stylesheets %}
|
|
{{ super() }}
|
|
<link rel="stylesheet" href="css/home.css{{ versions[1] }}">
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{{ super() }}
|
|
<section id="home" class="hero is-fullheight">
|
|
<div class="hero-body">
|
|
<div class="container has-text-centered">
|
|
<p id="b">
|
|
<img class="logo" alt="logo" src="images/logo_smol.png{{ versions[2] }}">
|
|
</p>
|
|
<h1 class="title">{{ globals.name }}</h1>
|
|
<h2 class="subtitle">{{ globals.home_subtitle | safe }}</h2>
|
|
|
|
<p class="subtitle" id="maxSize">
|
|
Maximum total size per upload attempt is {{ noJsMaxSizeInt or maxSizeInt }} MB
|
|
</p>
|
|
|
|
<div class="columns is-gapless">
|
|
<div class="column is-hidden-mobile"></div>
|
|
<div class="column">
|
|
<form id="form" class="field" action="" method="post" enctype="multipart/form-data">
|
|
<div class="field">
|
|
<p class="control">
|
|
<input type="file" class="is-fullwidth" name="files[]" multiple="multiple" required="required">
|
|
</p>
|
|
</div>
|
|
<div class="field">
|
|
<p class="control">
|
|
<input type="text" class="input is-fullwidth" name="token" minLength="64" maxLength="64" placeholder="API token ({{ "required" if config.private else "optional"}})"{% if config.private %} required="required"{% endif %}>
|
|
</p>
|
|
</div>
|
|
<div class="field">
|
|
<p class="control">
|
|
<input type="submit" class="button is-danger is-outlined is-fullwidth" value="Upload">
|
|
</p>
|
|
<p class="help">
|
|
Files uploaded through this form will only be associated with your account if you specify your API token.
|
|
</p>
|
|
</div>
|
|
</form>
|
|
{% if files -%}
|
|
<div class="field uploads nojs">
|
|
{% for file in files -%}
|
|
<div class="field">
|
|
<p class="name">{{ file.original }}</p>
|
|
{% if errorMessage -%}
|
|
<p class="error">{{ errorMessage }}</p>
|
|
{%- endif %}
|
|
{% if file.url -%}
|
|
<p class="link">
|
|
<a href="{{ file.url }}" target="_blank">{{ file.url }}</a>
|
|
</p>
|
|
{%- endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{%- endif %}
|
|
</div>
|
|
<div class="column is-hidden-mobile"></div>
|
|
</div>
|
|
|
|
{% set plain_links = true %}
|
|
{% include "_partial/links.njk" %}
|
|
|
|
{% if utils.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/{{ utils.gitHash }}" target="_blank" rel="noopener">{{ utils.gitHash }}</a>
|
|
</div>
|
|
<div class="column is-hidden-mobile"></div>
|
|
</div>
|
|
{%- endif %}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|