diff options
Diffstat (limited to 'templates/index.html.j2')
-rw-r--r-- | templates/index.html.j2 | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/templates/index.html.j2 b/templates/index.html.j2 new file mode 100644 index 0000000..75f97ee --- /dev/null +++ b/templates/index.html.j2 @@ -0,0 +1,83 @@ +{% set prefix_s = prefix | trim('/') ~ '/' %}{% set s_prefix_s = ( '/' ~ prefix | trim('/') ~ '/' ) | replace ("//","/") %}{% set ulp_s = ulp | trim('/') ~ '/' %}{% set server_prefix = ( server | replace("//","##") ~ '/' ~ prefix ~ '/' ) | replace("///","/") | replace("//", "/") | replace("##","//") %}{% set prefix_ulp = ( '/' ~ prefix ~ '/' ~ ulp ~ '/' ) | replace("///","/") | replace("//", "/") %}{% set server_prefix_ulp = ( server | replace("//","##") ~ '/' ~ prefix ~ '/' ~ ulp ~ '/' ) | replace("///","/") | replace("//", "/") | replace("##","//") %}<!DOCTYPE html> +<html> +<head> +<title>FUSS: File Upload and Storage Service</title> +<link rel="stylesheet" href="{{ s_prefix_s }}static/index.css"/> +<meta name="viewport" content="width=device-width, initial-scale=1"> +</head> +<!-- +server = "{{ server }}" +prefix = "{{ prefix }}" +ulp = "{{ ulp }}" +file_count = "{{ file_count }}" +max_size = "{{ max_size }}" +mimetype_blacklist = "{{ mimetype_blacklist }}" +meta = "{{ meta }}" +meta_visible = "{{ meta_visible }}" +meta_headers = "{{ meta_headers }}" +icons = "{{ icons }}" +--> +<body> +<h1>FUSS</h1> +<input id="intro" class="toggle" type="checkbox" checked><label for="intro" class="lbl-toggle" tabindex="0">Introduction</label> +<div id="intro" class="content"> +<div class="content-inner"> +<a href="{{ server_prefix }}">FUSS</a> is a simple file upload and storage web app. +Features include: +<ul> +<li>Maximum upload size</li> +<li>Accept original file modification timestamp</li> +<li>Filter out mimetypes</li> +<li>Handle duplicate files gracefully</li> +<li>Handle up to so many dissimilar files with same name</li> +<li>Drag and drop upload</li> +<li>Display mimetype icons</li> +</ul> +<p style="font-size: 66%;"><a href="https://gitlab.com/bgstack15/fuss/">source</a> (GPL-3.0)</p> +</div> <!-- content-inner --> +</div> <!-- content --> +<input id="use" class="toggle" type="checkbox" checked><label for="use" class="lbl-toggle" tabindex="0">How to use</label> +<div id="use" class="content"> +<div class="content-inner"> +{% if ulp != "" %}Visit the upload form at <a href="{{ prefix_ulp }}">{{ ulp_s }}</a>. +Or f{% else %}F{% endif %}rom the command line: +<pre> +curl -F 'file=@/path/to/file' {{ server_prefix_ulp }} +</pre> +To save the original last modified timestamp from the command line, use script <a href="{{ s_prefix_s }}fuss-upload">fuss-upload</a>. +<pre> +./fuss-upload /path/to/file {{ server_prefix_ulp }} +</pre> +</div> <!-- content-inner --> +</div> <!-- content --> +<input id="stats" class="toggle" type="checkbox" checked><label for="stats" class="lbl-toggle" tabindex="0">Current status for this instance</label> +<div id="stats" class="content"> +<div class="content-inner"> +<ul> +<li>Max file size: {{ max_size }}</li> +<li>Files stored: <a href="{{ s_prefix_s }}dump_files/">{{ file_count }}</a> +(<a href="{{ s_prefix_s }}dump_files/json">json</a> +<a href="{{ s_prefix_s }}dump_files/html">html</a> +<a href="{{ s_prefix_s }}dump_files/html-long">html details</a>) +</li> +<li>Mimetype blacklist +{% if mimetype_blacklist %} +<ul>{% endif %} +{% for m in mimetype_blacklist %}<li>{{ m }}</li>{% endfor %} +{% if mimetype_blacklist %}</ul>{% endif %} +<li>Max duplicate filenames: {{ max_dupe }}</li> +<li>Metadata{% if not meta %} is disabled{% endif %} +{% if meta %} +<ul> +<li>User queriable: {% if meta_visible %}yes{% else %}no{% endif %}</li> +<li>Add to headers: {% if meta_visible and (meta_headers|length) > 0 %}yes{% else %}no{% endif %}</li> +<li>Mimetype icons: {% if icons %}yes{% else %}no{% endif %}</li> +{% endif %} +</ul> <!-- metadata sublist --> +</ul> +<p style="font-size: 66%;"><a href="{{ s_prefix_s }}dump_config/">dump config</a> (<a href="{{ s_prefix_s }}dump_config/json">json</a>) +</div> <!-- content-inner --> +</div> <!-- content --> +<script src="{{ s_prefix_s }}static/index.js"></script> +</body> +</html> |