diff --git a/webfm/static/css/main.css b/webfm/static/css/main.css
index c8e2077..0580881 100644
--- a/webfm/static/css/main.css
+++ b/webfm/static/css/main.css
@@ -4,7 +4,8 @@
top: 0%;
left: 0%;
width: 100%;
- height: 100%;
+ /* height: 100%; */
+ height: auto;
z-index: -999;
}
diff --git a/webfm/static/imgs/backgrounds/000.png b/webfm/static/imgs/backgrounds/000.png
new file mode 100644
index 0000000..18563de
Binary files /dev/null and b/webfm/static/imgs/backgrounds/000.png differ
diff --git a/webfm/static/imgs/backgrounds/particles.mp4 b/webfm/static/imgs/backgrounds/particles.mp4
new file mode 100644
index 0000000..f4f1f75
Binary files /dev/null and b/webfm/static/imgs/backgrounds/particles.mp4 differ
diff --git a/webfm/static/imgs/backgrounds/000.jpg b/webfm/static/imgs/backgrounds/seasons.jpg
similarity index 100%
rename from webfm/static/imgs/backgrounds/000.jpg
rename to webfm/static/imgs/backgrounds/seasons.jpg
diff --git a/webfm/static/js/post-ajax.js b/webfm/static/js/post-ajax.js
index 895b2d4..701d7ea 100644
--- a/webfm/static/js/post-ajax.js
+++ b/webfm/static/js/post-ajax.js
@@ -73,9 +73,9 @@ const updateHTMLDirList = async (data) => {
// Setup background if there is a 000.* in selection
if (background_image.match(/000\.(jpg|png|gif)\b/) != null) {
background_image = formatURL("files/" + images[i][1]);
- updateBackground(background_image);
+ updateBackground(background_image, false);
} else {
- background_image = formatURL("static/imgs/backgrounds/000.jpg");
+ background_image = formatURL("static/imgs/backgrounds/particles.mp4");
updateBackground(background_image);
}
diff --git a/webfm/static/js/ui-logic.js b/webfm/static/js/ui-logic.js
index 7a28c06..f346737 100644
--- a/webfm/static/js/ui-logic.js
+++ b/webfm/static/js/ui-logic.js
@@ -175,9 +175,17 @@ const disableEdit = (elm) => {
elm.readOnly = "true";
}
-const updateBackground = (img_src) => {
+const updateBackground = (srcLink, isvideo = true) => {
try {
- document.getElementById("bg").src = img_src;
+ if (isvideo) {
+ let elm = document.getElementById("bg");
+ if (elm.getAttribute('src') === "") {
+ elm.src = srcLink;
+ }
+ } else {
+ document.getElementById("bg").src = "";
+ document.getElementById("bg").setAttribute("poster", srcLink);
+ }
} catch (e) { }
}
diff --git a/webfm/templates/index.html b/webfm/templates/index.html
index ae9d47a..f16738e 100644
--- a/webfm/templates/index.html
+++ b/webfm/templates/index.html
@@ -48,7 +48,19 @@
-
+ {% if isLoggedIn %}
+
+
+
+ {% else %}
+
+
+
+ {% endif %}
@@ -228,7 +240,13 @@
-
+
+
+
+
{% block body_content_additional %}
{% endblock body_content_additional%}