3 Commits

Author SHA1 Message Date
Gregory Wells
01ca68e16b make login page use the card style 2026-03-31 19:53:48 -04:00
Gregory Wells
6c435e6135 get a simple change password dialogue to popup on press change password 2026-03-31 19:51:21 -04:00
Gregory Wells
e1f992e052 dim and block profile page when executing change profile request 2026-03-25 15:16:13 -04:00
6 changed files with 71 additions and 37 deletions

View File

@@ -6,10 +6,11 @@
rel="stylesheet" rel="stylesheet"
/> />
<link rel="stylesheet" href="static/style.css" /> <link rel="stylesheet" href="static/style.css" />
<link rel="stylesheet" href="static/card.css" />
<link rel="stylesheet" href="static/login_page.css" /> <link rel="stylesheet" href="static/login_page.css" />
<img id="logo_image" alt="logo" src="/logo" /> <img id="logo_image" alt="logo" src="/logo" />
<form id="login_card" method="POST"> <form id="login_card" class="card" method="POST">
<div id="welcome_text"> <div id="welcome_text">
Welcome to Astral Tech, Please Sign in to your account below Welcome to Astral Tech, Please Sign in to your account below
</div> </div>

View File

@@ -9,6 +9,15 @@
<link rel="stylesheet" href="static/card.css" /> <link rel="stylesheet" href="static/card.css" />
<link rel="stylesheet" href="static/profile_page.css" /> <link rel="stylesheet" href="static/profile_page.css" />
<div id="popup_background" class="blocked hidden"></div>
<div id="change_password_dialouge" class="hidden card">
<input type="password" placeholder="Current Password" />
<input type="password" placeholder="New Password" />
<input type="password" placeholder="New Password(repeat)" />
<button>Change Password</button>
</div>
<img id="logo_image" alt="logo" src="/logo" /> <img id="logo_image" alt="logo" src="/logo" />
<div id="main_content"> <div id="main_content">
<div class="cards"> <div class="cards">
@@ -51,28 +60,8 @@
<div class="data-value">{{.Email}}</div> <div class="data-value">{{.Email}}</div>
</div> </div>
<form <form action="/logout" method="POST" style="display: inline-block">
action="/logout" <button class="bottom_button" id="signout_button">
method="POST"
style="
color: var(--primary-accent);
text-decoration: none;
font-weight: bold;
margin-top: 20px;
display: inline-block;
"
>
<button
style="
background: none;
border-style: none;
color: var(--primary-accent);
text-decoration: none;
font-weight: bold;
font-size: 20px;
"
id="signout_button"
>
<input <input
id="csrf_token_storage" id="csrf_token_storage"
type="hidden" type="hidden"
@@ -82,6 +71,16 @@
Sign Out Sign Out
</button> </button>
</form> </form>
<button class="bottom_button" id="change_password_button">
<input
id="csrf_token_storage"
type="hidden"
name="csrf_token"
value="{{.CSRFToken}}"
/>
Change Password
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -95,10 +94,26 @@
}); });
</script> </script>
<script type="text/javascript">
const popup_botton = document.getElementById("change_password_button");
popup_botton.addEventListener("click", () => {
document.getElementById("popup_background").classList.remove("hidden");
document
.getElementById("change_password_dialouge")
.classList.remove("hidden");
// document.getElementById("change_password_dialouge").classList.add("hidden");
// document.getElementById("popup_background").classList.add("hidden");
});
</script>
<script type="text/javascript"> <script type="text/javascript">
var currentPreviewURL = null; var currentPreviewURL = null;
fileInput.addEventListener("change", async () => { fileInput.addEventListener("change", async () => {
document.getElementById("popup_background").classList.remove("hidden");
const file = fileInput.files[0]; const file = fileInput.files[0];
if (!file) return; if (!file) return;
if (file.type !== "image/jpeg") { if (file.type !== "image/jpeg") {
@@ -118,7 +133,9 @@
credentials: "include", credentials: "include",
}); });
const text = await res.text(); const text = await res.text();
// show the picture (so we don't need to re render the whole page)
document.getElementById("popup_background").classList.add("hidden");
const img = document.querySelector(".profile-pic"); const img = document.querySelector(".profile-pic");
if (currentPreviewURL != null) { if (currentPreviewURL != null) {

View File

@@ -3,11 +3,11 @@
255, 255,
255, 255,
255, 255,
0.8 1
); /* Semi-transparent white for light theme */ ); /* Semi-transparent white for light theme */
border: 1px solid var(--border-subtle); border: 1px solid var(--border-subtle);
border-radius: 12px; border-radius: 12px;
padding: 24px; padding: 2.5rem;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
transition: transform 0.2s ease; transition: transform 0.2s ease;
} }

View File

@@ -15,17 +15,7 @@
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%);
background-color: var(--bg-card);
border: 1px solid var(--border-subtle);
padding: 2.5rem;
border-radius: 8px;
width: 350px; width: 350px;
/* Soft shadow for depth in light mode */
box-shadow:
0 4px 12px rgba(0, 0, 0, 0.05),
0 1px 3px rgba(0, 0, 0, 0.1);
} }
#login_card input { #login_card input {

View File

@@ -100,6 +100,20 @@
line-height: 0; line-height: 0;
} }
#signout_button:hover { .bottom_button:hover {
text-decoration: underline !important; text-decoration: underline !important;
} }
.bottom_button {
background: none;
border-style: none;
color: var(--primary-accent);
text-decoration: none;
font-weight: bold;
font-size: 20px;
}
#change_password_dialouge {
z-index: 10000;
position: fixed;
}

View File

@@ -27,3 +27,15 @@ body {
.hidden { .hidden {
display: none; display: none;
} }
.blocked {
position: fixed; /* or absolute */
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999; /* higher = on top */
background-color: black;
opacity: 10%;
}