]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/docs/files/index.html
wiki: Only match usernames when a word starts with @
[ipfire.org.git] / src / templates / docs / files / index.html
1 {% extends "../base.html" %}
2
3 {% block title %}{{ _("Files") }}{% end block %}
4
5 {% block main %}
6 {% if files %}
7 <section class="section">
8 <div class="container">
9 <div class="columns is-multiline">
10 {% for f in files %}
11 <div class="column is-flex is-flex-direction-column is-half is-one-quarter-desktop">
12 <div class="notification has-text-centered is-flex is-flex-direction-column" style="height: 100%">
13 <div class="block is-flex is-flex-grow-1 is-flex-direction-column is-justify-content-center">
14 {% if f.is_image() %}
15 <a href="{{ f.url }}?action=detail">
16 <figure class="image">
17 <img src="{{ f.url }}?s=512" alt="{{ f.filename }}">
18 </figure>
19 </a>
20 {% elif "pdf" in f.mimetype %}
21 <span class="icon">
22 <i class="fas fa-file-pdf fa-5x"></i>
23 </span>
24 {% else %}
25 <span class="icon">
26 <i class="fas fa-file fa-5x"></i>
27 </span>
28 {% end %}
29 </div>
30
31 <div class="block">
32 <h6 class="title is-6">
33 <a href="{{ f.url }}?action=detail">{{ f.filename }}</a>
34 </h6>
35 </div>
36 </div>
37 </div>
38 {% end %}
39 </div>
40 </div>
41 </section>
42 {% end %}
43
44 <section class="section">
45 <div class="container">
46 <h5 class="title is-5">{{ _("Upload File") }}</h5>
47
48 <form method="POST" action="/docs/_upload" enctype="multipart/form-data">
49 {% raw xsrf_form_html() %}
50
51 <input type="hidden" name="path" value="{{ path }}">
52
53 <div class="block">
54 <div class="file">
55 <label class="file-label">
56 <input class="file-input" type="file" name="file" required>
57 <span class="file-cta">
58 <span class="file-icon">
59 <i class="fas fa-upload"></i>
60 </span>
61 <span class="file-label">
62 {{ _("Choose a file to upload") }}
63 </span>
64 </span>
65 </label>
66 </div>
67 </div>
68
69 <div class="block">
70 <input class="button is-primary" type="submit" value="{{ _("Upload") }}">
71 </div>
72 </form>
73 </div>
74 </div>
75 {% end block %}