Skip to content

Enhancement: Dark Mode#435

Open
baltinerdist wants to merge 2 commits intoamtgard:masterfrom
baltinerdist:feature/dark-mode
Open

Enhancement: Dark Mode#435
baltinerdist wants to merge 2 commits intoamtgard:masterfrom
baltinerdist:feature/dark-mode

Conversation

@baltinerdist
Copy link
Copy Markdown
Contributor

@baltinerdist baltinerdist commented Apr 3, 2026

Summary

  • Adds comprehensive dark mode support across the entire ORK, activated via a toggle button in the nav bar or automatically via prefers-color-scheme: dark
  • Introduces CSS custom properties (--ork-*) for all colors, with light/dark value sets in orkui.css
  • Converts hardcoded hex colors to CSS variables across all templates, stylesheets, and inline styles

Pages covered

  • Revised-frontend profiles: Player (Playernew), Kingdom (Kingdomnew), Park (Parknew), Unit
  • Reports: Active players, attendance, new player attendance, dues, top parks
  • Admin: New player attendance, top parks
  • Other: Login, Search, Attendance (park/kingdom), default theme/layout

Key changes

  • orkui.css: ~1,400 lines of dark mode variable definitions and overrides (DataTables, jQuery UI, information tables, nav, footer, global elements)
  • revised.css: ~2,700 lines of dark mode support for all revised-frontend components (heroes, cards, stat rows, tabs, modals, tables, charts, maps, autocomplete)
  • reports.css: ~800 lines of dark mode for Highcharts, report tables, filter controls, and stat cards
  • default.tpl: Theme toggle button in nav, early data-theme attribute injection to prevent flash
  • default.theme: Dark mode overrides for nav bar, dropdowns, search, footer, What's New modal
  • revised.js: orkInitTheme() function for theme state management and toggle wiring
  • All .tpl files: Hardcoded inline color/background values replaced with var(--ork-*) equivalents

Test plan

  • Toggle dark mode via nav button — verify all pages render correctly
  • Verify prefers-color-scheme: dark auto-detection works when no explicit theme is set
  • Check Player, Kingdom, Park, and Unit profile pages (heroes, cards, tabs, modals)
  • Check Reports pages (charts, tables, filters)
  • Check Login, Search, and Attendance pages
  • Verify DataTables (pagination, search, sorting) render correctly in dark mode
  • Verify modals (edit, add member, heraldry upload) render correctly
  • Test light mode is unaffected (no regressions)
  • Test mobile responsive layouts in dark mode

🤖 Generated with Claude Code

Avery Krouse and others added 2 commits April 2, 2026 20:37
Implements a full dark mode across all ORK3 pages with toggle persistence.

- Add CSS custom property architecture (--ork-* vars) in orkui.css so dark mode
  vars are available on every page (home, reports, legacy templates, revised-frontend)
- Add html[data-theme="dark"] overrides and @media (prefers-color-scheme: dark) block
- revised.css: convert all base element rules (.kn-stat-card, .kn-card, .kn-tabs,
  .kn-tab-nav, .kn-park-tile, calendar, map sidebar, modals) from hardcoded #fff to
  CSS vars so dark mode redefines at root — no per-component override wars
- Kingdomnew, Parknew, Playernew templates: inline style specificity fixes scoped
  with #theme_container for officer/sidebar accent link colors; hero stat numbers use
  extracted hue vars
- default.theme: FOUC-prevention inline script in <head> sets data-theme before
  render; #ork-theme-toggle button in nav; self-contained toggle JS with sun/moon
  SVG icons and localStorage persistence for all non-revised-frontend pages
- default.tpl (home page): hm-* classes converted to CSS vars; dark mode card/stat
  text with subtle shadow
- reports.css: DataTables rows, pagination, filter cards, sidebar all dark mode aware
- revised.js: orkIsDarkMode(), orkInitTheme(), orkUpdateThemeIcon() helpers; hero
  color extraction adjusted for dark vs light; toggle reapplies all hero colors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add comprehensive dark mode support using CSS custom properties.
Covers DataTables, reports, search, attendance, login, admin pages,
and revised-frontend profiles (Player, Kingdom, Park, Unit).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant