Add footer

This commit is contained in:
Dendy 2024-02-14 14:01:25 +01:00
parent 7bc2858cd6
commit 46ca66acb9
4 changed files with 29 additions and 4 deletions

View File

@ -1,8 +1,9 @@
name = "Folder share" name = "Folder share"
base_path = "/path/to/folder" base_path = "/path/to/folder"
favicon = "/.favicon.png" favicon = "/.favicon.png"
password = "publicpass" #password = "publicpass"
admin_password = "verysecurepass" admin_password = "verysecurepass"
#footer = "Something something, made with love or whatever"
[qbittorrent] [qbittorrent]
base_url = "http://127.0.0.1:8080" base_url = "http://127.0.0.1:8080"

View File

@ -55,6 +55,7 @@ def index(path):
path=path, path=path,
dirs=dirs, dirs=dirs,
files=files, files=files,
footer=config.get("footer"),
), ),
200, 200,
) )
@ -74,6 +75,7 @@ def search():
"error.html", "error.html",
code=400, code=400,
msg='No search string provided.', msg='No search string provided.',
footer=config.get('footer'),
), ),
400, 400,
) )

View File

@ -1,7 +1,12 @@
html {
min-height: 100%;
}
body { body {
background-color: #191919; background-color: #191919;
color: white; color: white;
font-family: monospace; font-family: monospace;
margin-bottom: 100px;
} }
a { a {
@ -18,6 +23,17 @@ input {
background-color: white; background-color: white;
} }
footer {
background-color: black;
position: fixed;
left: 0;
bottom: 0;
width: calc(100vw - 20px);
padding: 10px;
text-align: center;
overflow: hidden;
}
.base_path { .base_path {
color: grey; color: grey;
} }

View File

@ -29,4 +29,10 @@
<a href="{{ path_join(path, file) }}">{{ file }}</a><br /> <a href="{{ path_join(path, file) }}">{{ file }}</a><br />
{% endfor %} {% endfor %}
{% if footer not in [None, False, ""] %}
<footer>
{{ footer }}
</footer>
{% endif %}
{% endblock %} {% endblock %}