Skip to content

Commit 3afe1da

Browse files
committed
feat: improve theme selection accessibility and styling in index, stats, and studio pages
1 parent 43dd4fb commit 3afe1da

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/views/pages/index.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@
100100
<input type="text" name="username" placeholder="pphatdev" required class="w-full px-4 py-3 rounded-xl bg-slate-800 border border-slate-700 text-white focus:ring-2 focus:ring-primary"/>
101101
</div>
102102
<div>
103-
<label class="block text-sm font-semibold text-slate-300 mb-2">Theme</label>
104-
<select name="theme" class="w-full px-4 py-3 rounded-xl bg-slate-800 border border-slate-700 text-white focus:ring-2 focus:ring-primary">
103+
<label for="tryItTheme" class="block text-sm font-semibold text-slate-300 mb-2">Theme</label>
104+
<select id="tryItTheme" name="theme" class="w-full px-4 py-3 rounded-xl bg-slate-800 border border-slate-700 text-white focus:ring-2 focus:ring-primary">
105105
<% themes.forEach(function(themeName) { %>
106106
<option value="<%= themeName %>" <%= themeName === 'dark' ? 'selected' : '' %>>
107107
<%= themeName.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ') %>
108108
</option>
109109
<% }); %>
110110
</select>
111111
</div>
112-
<button type="submit" class="w-full bg-primary hover:bg-primary/90 text-white font-semibold px-6 py-3 rounded-xl transition-colors flex items-center justify-center gap-2">
112+
<button type="submit" class="w-full bg-primary/80 hover:bg-primary/90 text-white font-semibold px-6 py-3 rounded-xl transition-colors flex items-center justify-center gap-2">
113113
Generate Stats Card
114114
<span class="material-icons-outlined">arrow_forward</span>
115115
</button>
@@ -248,7 +248,7 @@
248248
<!-- Footer -->
249249
<footer class="border-t border-slate-800 mt-24 bg-card-dark">
250250
<div class="max-w-7xl mx-auto px-6 py-8 text-center">
251-
<p class="text-slate-500 dark:text-slate-400">Made with ❤️ by <a href="https://pphat.top" class="text-primary hover:underline">pphatdev</a></p>
251+
<p class="text-slate-300">Made with ❤️ by <a href="https://pphat.top" class="text-primary hover:underline">pphatdev</a></p>
252252
</div>
253253
</footer>
254254

src/views/pages/stats.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
</div>
5757
<div class="grid md:grid-cols-3 gap-4">
5858
<div>
59-
<label class="block text-sm font-semibold text-slate-300 mb-2">Theme</label>
60-
<select name="theme" class="w-full px-4 py-2 rounded-lg bg-slate-800 border border-slate-700 text-white">
59+
<label for="statsTheme" class="block text-sm font-semibold text-slate-300 mb-2">Theme</label>
60+
<select id="statsTheme" name="theme" class="w-full px-4 py-2 rounded-lg bg-slate-800 border border-slate-700 text-white">
6161
<% themes.forEach(function(themeName) { %>
6262
<option value="<%= themeName %>" <%= theme === themeName ? 'selected' : '' %>>
6363
<%= themeName.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ') %>
@@ -71,7 +71,7 @@
7171
</div>
7272
<div class="grid">
7373
<label class="block text-sm font-semibold text-slate-300 mb-2 invisible">Custom Title</label>
74-
<button type="submit" class="bg-primary w-full hover:bg-primary/90 text-white font-semibold px-6 py-2 rounded-xl transition-colors">
74+
<button type="submit" class="bg-primary/80 w-full hover:bg-primary/90 text-white font-semibold px-6 py-2 rounded-xl transition-colors">
7575
Update Preview
7676
</button>
7777
</div>
@@ -124,7 +124,7 @@
124124
<!-- Footer -->
125125
<footer class="border-t border-slate-800 mt-24 bg-card-dark">
126126
<div class="max-w-7xl mx-auto px-6 py-8 text-center">
127-
<p class="text-slate-400">Made with ❤️ by <a href="https://pphat.top" class="text-primary hover:underline">pphatdev</a></p>
127+
<p class="text-slate-300">Made with ❤️ by <a href="https://pphat.top" class="text-primary hover:underline">pphatdev</a></p>
128128
</div>
129129
</footer>
130130

src/views/pages/studio.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<div class="flex flex-col gap-4">
157157
<!-- Theme Selector -->
158158
<div class="flex flex-col gap-2 mt-4 px-2 pt-2">
159-
<label class="block text-xs font-medium text-slate-400 uppercase tracking-wide">Theme Preset</label>
159+
<label for="themeSelect" class="block text-xs font-medium text-slate-400 uppercase tracking-wide">Theme Preset</label>
160160
<select id="themeSelect" class="w-full px-3 py-2.5 text-sm rounded-lg bg-slate-800/50 border border-slate-700/50 text-white focus:border-primary/50 focus:ring-2 focus:ring-primary/20 transition-all">
161161
<option value="">Custom</option>
162162
<optgroup label="Built-in Themes">

0 commit comments

Comments
 (0)