From fc3ea2dd4bb81bd5a09fcae8bcc8d4958818eda4 Mon Sep 17 00:00:00 2001
From: Tara Rostami <132676256+TaraRostami@users.noreply.github.com>
Date: Thu, 22 Feb 2024 22:50:38 +0330
Subject: Ultra Dark Theme for 3X-UI (#1871)
---
web/html/login.html | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 172 insertions(+), 7 deletions(-)
(limited to 'web/html/login.html')
diff --git a/web/html/login.html b/web/html/login.html
index b622a080..4605a4fd 100644
--- a/web/html/login.html
+++ b/web/html/login.html
@@ -2,9 +2,14 @@
{{template "head" .}}
@@ -269,8 +393,13 @@
-
- {{ i18n "pages.login.title" }}
+
+
+
+ {{ i18n "pages.login.title" }}
+ 3X-UI
+
+
@@ -377,6 +506,42 @@
},
},
});
+ document.addEventListener("DOMContentLoaded", function() {
+ var animationDelay = 2000;
+ initHeadline();
+
+ function initHeadline() {
+ animateHeadline(document.querySelectorAll('.headline'));
+ }
+
+ function animateHeadline(headlines) {
+ var duration = animationDelay;
+ headlines.forEach(function(headline) {
+ setTimeout(function() {
+ hideWord(headline.querySelector('.is-visible'));
+ }, duration);
+ });
+ }
+
+ function hideWord(word) {
+ var nextWord = takeNext(word);
+ switchWord(word, nextWord);
+ setTimeout(function() {
+ hideWord(nextWord);
+ }, animationDelay);
+ }
+
+ function takeNext(word) {
+ return (word.nextElementSibling) ? word.nextElementSibling : word.parentElement.firstElementChild;
+ }
+
+ function switchWord(oldWord, newWord) {
+ oldWord.classList.remove('is-visible');
+ oldWord.classList.add('is-hidden');
+ newWord.classList.remove('is-hidden');
+ newWord.classList.add('is-visible');
+ }
+ });
--
cgit v1.2.3