extract out error login
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="stylesheet" href="static/style.css" />
|
||||
<link rel="stylesheet" href="static/error.css" />
|
||||
<link rel="stylesheet" href="static/card.css" />
|
||||
<link rel="stylesheet" href="static/login_page.css" />
|
||||
|
||||
@@ -15,9 +16,9 @@
|
||||
Welcome to Astral Tech, Please Sign in to your account below
|
||||
</div>
|
||||
|
||||
<div id="incorrect_password_text" class="{{.IsHiddenClassList}}">
|
||||
<div class="error {{.IsHiddenClassList}}">
|
||||
⚠️ Invalid username or password.
|
||||
<button id="incorrect_password_close_button">X</button>
|
||||
<button class="close_error_button">X</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -32,12 +33,4 @@
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document
|
||||
.getElementById("incorrect_password_close_button")
|
||||
.addEventListener("click", function () {
|
||||
document
|
||||
.getElementById("incorrect_password_text")
|
||||
.classList.add("hidden");
|
||||
});
|
||||
</script>
|
||||
<script src="/static/error.js" type="text/javascript"></script>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
/>
|
||||
<link rel="stylesheet" href="static/style.css" />
|
||||
<link rel="stylesheet" href="static/card.css" />
|
||||
<link rel="stylesheet" href="static/error.css" />
|
||||
<link rel="stylesheet" href="static/profile_page.css" />
|
||||
|
||||
<div id="popup_background" class="blocked hidden"></div>
|
||||
@@ -188,3 +189,5 @@
|
||||
currentPreviewURL = img.src;
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="/static/error.js" type="text/javascript"></script>
|
||||
|
||||
29
static/error.css
Normal file
29
static/error.css
Normal file
@@ -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;
|
||||
}
|
||||
7
static/error.js
Normal file
7
static/error.js
Normal file
@@ -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");
|
||||
});
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user