diff --git a/src/pages/login_page.html b/src/pages/login_page.html index 84eeb3d..96ca398 100644 --- a/src/pages/login_page.html +++ b/src/pages/login_page.html @@ -6,6 +6,7 @@ rel="stylesheet" /> + @@ -15,9 +16,9 @@ Welcome to Astral Tech, Please Sign in to your account below -
+
⚠️ Invalid username or password. - +
@@ -32,12 +33,4 @@ - + diff --git a/src/pages/profile_page.html b/src/pages/profile_page.html index 1230a43..9372f50 100644 --- a/src/pages/profile_page.html +++ b/src/pages/profile_page.html @@ -7,6 +7,7 @@ /> + @@ -188,3 +189,5 @@ currentPreviewURL = img.src; }); + + diff --git a/static/error.css b/static/error.css new file mode 100644 index 0000000..74e8060 --- /dev/null +++ b/static/error.css @@ -0,0 +1,29 @@ +.error { + background-color: var(--error-red) !important; + border-radius: 10px; + padding: 20px; + border-style: solid; + border-color: var(--error-border-red); + border-width: 1px; + box-sizing: border-box; + font-size: 12px; + position: relative; + color: white; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); +} + +.close_error_button { + position: absolute !important; + background-color: rgba(0, 0, 0, 0) !important; + padding: 0px !important; + top: 20px; + right: 20px; + color: black !important; + font-weight: normal !important; + border: none; +} + +.close_error_button:hover { + cursor: default; + font-weight: bold !important; +} diff --git a/static/error.js b/static/error.js new file mode 100644 index 0000000..61ac8b4 --- /dev/null +++ b/static/error.js @@ -0,0 +1,7 @@ +var error_close_buttons = document.getElementsByClassName("close_error_button"); + +for (const close_button of error_close_buttons) { + close_button.addEventListener("click", function () { + this.parentElement.classList.add("hidden"); + }); +} diff --git a/static/login_page.css b/static/login_page.css index 4a28cfa..ac17278 100644 --- a/static/login_page.css +++ b/static/login_page.css @@ -75,32 +75,3 @@ font-size: 1.25rem; margin-bottom: 8px; } - -#incorrect_password_text { - background-color: var(--error-red) !important; - border-radius: 10px; - padding: 20px; - border-style: solid; - border-color: var(--error-border-red); - border-width: 1px; - box-sizing: border-box; - font-size: 12px; - position: relative; - color: white; - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); -} - -#incorrect_password_close_button { - position: absolute !important; - background-color: rgba(0, 0, 0, 0) !important; - padding: 0px !important; - top: 20px; - right: 20px; - color: black !important; - font-weight: normal !important; -} - -#incorrect_password_close_button:hover { - cursor: default; - font-weight: bold !important; -}