Skip to content

Commit aeb448c

Browse files
authored
Update account.html
UI updates, general enhancements
1 parent 3cb9c7f commit aeb448c

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

account.html

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>Scratch Auth | Login & Dashboard | Coding Hut</title>
77
<style>
88
body {
9-
font-family: Sans-Serif;
9+
font-family: 'Arial', sans-serif;
1010
margin: 0;
1111
padding: 0;
1212
background-color: #f4f4f4;
@@ -16,18 +16,40 @@
1616
background-color: #c04d4d;
1717
color: white;
1818
padding: 20px;
19+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
1920
}
2021
.content {
2122
padding: 20px;
23+
max-width: 600px;
24+
margin: auto;
25+
background-color: white;
26+
border-radius: 8px;
27+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
2228
}
2329
.message {
2430
color: red;
2531
font-weight: bold;
32+
margin-top: 10px;
2633
}
2734
button {
28-
padding: 10px;
35+
padding: 10px 20px;
2936
margin: 10px;
3037
font-size: 16px;
38+
border: none;
39+
border-radius: 5px;
40+
cursor: pointer;
41+
background-color: #c04d4d;
42+
color: white;
43+
transition: background-color 0.3s;
44+
}
45+
button:hover {
46+
background-color: #a03a3a;
47+
}
48+
p {
49+
line-height: 1.5;
50+
}
51+
a {
52+
text-decoration: none;
3153
}
3254
</style>
3355
<script>
@@ -45,42 +67,41 @@
4567
}, 2000);
4668
}
4769

48-
// Simulate checking if the user is logged in
4970
function checkAuth() {
5071
const urlParams = new URLSearchParams(window.location.search);
5172
const authSuccess = urlParams.get('success'); // Example: Scratch Auth might return '?success=true'
52-
const username = urlParams.get('username')
53-
localStorage.setItem('username', username)
73+
const username = urlParams.get('username');
74+
if (username) {
75+
localStorage.setItem('username', username);
76+
}
5477

5578
if (authSuccess === 'true') {
56-
// Redirect to index.html if login was successful
5779
localStorage.setItem('loggedIn', 'true');
5880
window.location.href = 'index.html';
5981
}
6082
}
6183

62-
// Run this check when the page loads
6384
window.onload = checkAuth;
6485
</script>
6586
</head>
6687
<body>
67-
<div class="header"><h1>Scratch Authentication</h1></div>
88+
<div class="header">
89+
<h1>Scratch Authentication</h1>
90+
</div>
6891
<div class="content">
6992
<h2>Welcome! Please log in to continue.</h2>
7093
<button onclick="registerUser()">Register</button>
71-
<p id="message" class="message"></p>
94+
<p id="message" class="message" aria-live="polite"></p>
7295
<p>
7396
Please note: You will be redirected to an external site (Scratch Auth) for authentication. Once there,
7497
choose the "Cloud Data" option for the quickest sign-in method.
7598
</p>
7699
<p>
77-
If you are unable to use the "Cloud Data" option, other sign-in methods are available on Scratch Auth's page, for example profile commenting.
100+
If you are unable to use the "Cloud Data" option, other sign-in methods are available on Scratch Auth's page, for example, profile commenting.
78101
</p>
79-
80-
<a href="https://github.com/Scratch-Coding-Hut/Scratch-Coding-Hut.github.io/issues/new">
81-
<button>Having trouble signing in? Report an issue</button>
82-
</a>
83-
102+
<a href="https://github.com/Scratch-Coding-Hut/Scratch-Coding-Hut.github.io/issues/new">
103+
<button>Having trouble signing in? Report an issue</button>
104+
</a>
84105
</div>
85106
</body>
86107
</html>

0 commit comments

Comments
 (0)