Implement dark mode with medieval grey/brown theme as default for web client#32
Conversation
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the web client’s UI styling so dark mode becomes the default theme across the login and game pages.
Changes:
- Updated global stylesheet colors (backgrounds, text, panels, inputs/selects, scrollbar track) for a dark theme.
- Updated
login.htmlinline styles to match the dark theme. - Updated
game.htmlto use a dark user-info bar and to explicitly paint a dark canvas background before drawing.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
web-client/src/main/resources/templates/login.html |
Dark-themed inline CSS for the login page (background, container, inputs, error state). |
web-client/src/main/resources/templates/game.html |
Darker user-info bar and canvas background fill to avoid bright flashes/transparent clears. |
web-client/src/main/resources/static/css/style.css |
Dark default styling for the main game UI, including panels, form controls, and canvas container. |
Comments suppressed due to low confidence (1)
web-client/src/main/resources/static/css/style.css:81
- In
style.css, headings now use the new accent color#7b8cff, but.info-sectionstill uses the old accent#667eeafor its left border. Consider updating this border color (or centralizing accents via a CSS variable) so the theme stays consistent and avoids mixed accent colors.
.info-section {
background: #2a2a3d;
padding: 15px;
border-radius: 8px;
border-left: 4px solid #667eea;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <style> | ||
| body { | ||
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | ||
| background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); | ||
| margin: 0; | ||
| padding: 0; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| min-height: 100vh; | ||
| color: #e0e0e0; | ||
| } | ||
|
|
||
| .login-container { | ||
| background: white; | ||
| background: #1e1e2f; | ||
| padding: 40px; | ||
| border-radius: 15px; | ||
| box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); | ||
| box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); | ||
| max-width: 400px; | ||
| width: 90%; | ||
| } |
There was a problem hiding this comment.
login.html duplicates most of the global theme styling (body/container/error/button colors) instead of reusing the shared stylesheet used by game.html. This will make future theme changes require editing both files and increases the risk of visual drift; consider linking /css/style.css here and moving the login-specific rules into the shared CSS (or a small login-only CSS file).
There was a problem hiding this comment.
Moved all login page inline styles to the shared style.css and replaced the inline <style> block with a <link> to /css/style.css. Login-specific layout overrides (flexbox centering, no padding) are kept in a minimal inline <style> tag. See fb4fee8.
| <div class="user-info" style="text-align: center; margin-bottom: 20px; padding: 10px; background: #2a2a3d; border-radius: 8px;"> | ||
| <p style="margin: 5px 0;"><strong>Player:</strong> <span id="currentUsername">Loading...</span></p> | ||
| <button onclick="logout()" style="background: #dc3545; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-weight: bold;">Logout</button> |
There was a problem hiding this comment.
The .user-info element uses a class but still relies on a long inline style attribute for layout and background color. Moving these styles into style.css (e.g., .user-info { ... }) will keep them consistent with the rest of the page theme and reduce inline-style maintenance.
There was a problem hiding this comment.
Moved all .user-info inline styles into style.css (including .user-info, .user-info p, and .user-info .logout-button rules). The HTML now uses just class references with no inline style attribute. See fb4fee8.
| // Clear canvas | ||
| ctx.clearRect(0, 0, canvas.width, canvas.height); |
There was a problem hiding this comment.
drawMap() now does clearRect() immediately followed by a full-canvas fillRect(). Since the fillRect() overwrites every pixel, the clearRect() is redundant work each frame; removing it would slightly reduce per-frame drawing cost.
| // Clear canvas | |
| ctx.clearRect(0, 0, canvas.width, canvas.height); | |
| // Clear canvas by drawing background |
There was a problem hiding this comment.
Removed the redundant clearRect() call since the fillRect() overwrites every pixel. Updated the comment to "Fill canvas with background color" for clarity. See 91cb4db.
|
@copilot abandon purple theme, go for grey and brown for a medieval look |
… to shared CSS, move user-info inline styles to CSS, remove redundant clearRect Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Replaced the purple theme with a grey/brown medieval color scheme in fb4fee8. Key colors: dark brown backgrounds ( |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| label { | ||
| display: block; | ||
| margin-bottom: 8px; | ||
| color: #d4cfc8; | ||
| font-weight: bold; |
There was a problem hiding this comment.
The global label { display: block; margin-bottom: 8px; ... } rule will also apply to the game page policy controls (.policy-section is a flex row). This can introduce unintended vertical spacing / layout changes there. Consider scoping these label styles to the login form (e.g., .login-container label or .form-group label) or explicitly overriding in .policy-section label (e.g., margin-bottom: 0;).
There was a problem hiding this comment.
Scoped the label rule to .form-group label so it only applies within login form groups and won't interfere with .policy-section flex layout. See 9e97ac5.
|
@copilot address comment |
…icy-section flex layout Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>


.user-infoinline styles to style.css (reviewer feedback)clearRect()in canvas drawing (reviewer feedback)labelstyles to.form-group labelto avoid layout interference with.policy-sectionflex rows (reviewer feedback)Screenshots
Game Page (Medieval Theme):

Login Page (Medieval Theme):

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.