diff --git a/config.toml.example b/config.toml.example
index a88fe54..daf8ff3 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -1,8 +1,9 @@
name = "Folder share"
base_path = "/path/to/folder"
favicon = "/.favicon.png"
-password = "publicpass"
+#password = "publicpass"
admin_password = "verysecurepass"
+#footer = "Something something, made with love or whatever"
[qbittorrent]
base_url = "http://127.0.0.1:8080"
diff --git a/src/__init__.py b/src/__init__.py
index 1a7ad0d..19722f6 100644
--- a/src/__init__.py
+++ b/src/__init__.py
@@ -55,6 +55,7 @@ def index(path):
path=path,
dirs=dirs,
files=files,
+ footer=config.get("footer"),
),
200,
)
@@ -74,6 +75,7 @@ def search():
"error.html",
code=400,
msg='No search string provided.',
+ footer=config.get('footer'),
),
400,
)
diff --git a/static/style/main.css b/static/style/main.css
index dfae75e..7d3dc5d 100644
--- a/static/style/main.css
+++ b/static/style/main.css
@@ -1,7 +1,12 @@
+html {
+ min-height: 100%;
+}
+
body {
- background-color: #191919;
- color: white;
- font-family: monospace;
+ background-color: #191919;
+ color: white;
+ font-family: monospace;
+ margin-bottom: 100px;
}
a {
@@ -18,6 +23,17 @@ input {
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 {
color: grey;
}
diff --git a/templates/directory.html b/templates/directory.html
index 8af51ec..b434236 100644
--- a/templates/directory.html
+++ b/templates/directory.html
@@ -29,4 +29,10 @@
{{ file }}
{% endfor %}
+ {% if footer not in [None, False, ""] %}
+
+ {% endif %}
+
{% endblock %}