Skip to content

Commit 9fa8330

Browse files
Simplify styles.
1 parent fc12a79 commit 9fa8330

File tree

5 files changed

+22
-28
lines changed

5 files changed

+22
-28
lines changed

authorization-code/client/public/styles.css

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
:root {
22
/* Color Variables */
3-
--primary-color: #000000;
4-
--secondary-color: #808080;
3+
--accent-color: #242424;
54
--danger-color: #dc3545;
65
--success-color: #28a745;
76
--white: #ffffff;
87

98
/* Background Colors */
109
--light-bg: #f8f9fa;
1110
--success-bg: #d4edda;
12-
--danger-bg: #f5c6cb;
1311

1412
/* Border Colors */
1513
--light-border: #dee2e6;
@@ -19,7 +17,7 @@
1917

2018
/* Spacing */
2119
--border-radius: 4px;
22-
--padding: 10px;
20+
--padding: 12px;
2321
--margin: 10px;
2422
}
2523

@@ -34,10 +32,18 @@ body {
3432
box-sizing: border-box;
3533
}
3634

35+
p {
36+
margin: 0 0 var(--margin);
37+
}
38+
39+
h4 {
40+
margin: 0 0 var(--margin);
41+
font-size: 18px;
42+
}
43+
3744
.button {
3845
display: inline-block;
3946
padding: var(--padding);
40-
margin: var(--margin);
4147
text-decoration: none;
4248
border-radius: var(--border-radius);
4349
cursor: pointer;
@@ -49,12 +55,7 @@ body {
4955
}
5056

5157
.primary {
52-
background: var(--primary-color);
53-
color: var(--white);
54-
}
55-
56-
.secondary {
57-
background: var(--secondary-color);
58+
background: var(--accent-color);
5859
color: var(--white);
5960
}
6061

@@ -65,7 +66,7 @@ body {
6566
}
6667

6768
.alert {
68-
padding: var(--padding);
69+
padding: calc(var(--padding) * 1.25);
6970
margin: var(--margin) 0;
7071
border-radius: var(--border-radius);
7172
}

authorization-code/client/views/authorize.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="stylesheet" href="/styles.css" />
66
</head>
77
<body class="auth-container">
8-
<h2>Authorization Request</h2>
8+
<h4>Authorization Request</h4>
99

1010
<div class="info alert">
1111
<p><strong>Client:</strong> <%= client.id %></p>

authorization-code/client/views/callback.ejs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,22 @@
55
<link rel="stylesheet" href="/styles.css" />
66
</head>
77
<body>
8-
<div id="loading" class="loading text-center">
9-
<h2>Processing Authorization...</h2>
10-
<p>Exchanging authorization code for access token...</p>
11-
</div>
12-
138
<div id="success" style="display: none">
149
<div class="alert success">
15-
<h2>Authentication Successful! ✓</h2>
10+
<h4>Authentication Successful! ✓</h4>
1611
<p>You have successfully obtained an access token.</p>
1712
</div>
1813

19-
<h3>Access Token</h3>
20-
<div class="code" id="accessTokenDisplay"></div>
14+
<h4>Access Token</h4>
15+
<div class="alert code" id="accessTokenDisplay"></div>
2116
<p>You can now access protected resources using your access token.</p>
2217

2318
<a href="/" class="button primary">Go to Homepage</a>
2419
</div>
2520

2621
<div id="error" style="display: none">
2722
<div class="alert danger">
28-
<h2>Error</h2>
23+
<h4>Error</h4>
2924
<p id="errorMessage"></p>
3025
</div>
3126

@@ -72,14 +67,12 @@
7267
}
7368
7469
function showSuccess(accessToken) {
75-
document.getElementById("loading").style.display = "none";
7670
document.getElementById("accessTokenDisplay").textContent =
7771
accessToken.substring(0, 20) + "...";
7872
document.getElementById("success").style.display = "block";
7973
}
8074
8175
function showError(message) {
82-
document.getElementById("loading").style.display = "none";
8376
document.getElementById("errorMessage").textContent = message;
8477
document.getElementById("error").style.display = "block";
8578
}

authorization-code/client/views/error.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</head>
77
<body>
88
<div class="alert info">
9-
<h2>Error</h2>
9+
<h4>Error</h4>
1010
<p><%= message %></p>
1111
</div>
1212

authorization-code/client/views/index.ejs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</div>
1515

1616
<div class="alert info">
17-
<h3>Resource Operations:</h3>
17+
<h4>Resource Operations:</h4>
1818
<p>Test your OAuth2 access token by calling the protected resource:</p>
1919
<a href="#" class="button danger" onclick="logout()">Logout</a>
2020
</div>
@@ -38,8 +38,8 @@
3838
<button class="button primary" onclick="accessPrivateResource()">
3939
Access Private Resource
4040
</button>
41-
<button class="button secondary" onclick="testPublic()">
42-
Test Public Resource
41+
<button class="button primary" onclick="testPublic()">
42+
Access Public Resource
4343
</button>
4444
</div>
4545

0 commit comments

Comments
 (0)