This document describes the new UI features added to Bemo, including light/dark mode and compact/comfortable layout options.
- Light Mode: Clean, bright interface with white backgrounds (default)
- Dark Mode: Dark theme with comfortable colors for reduced eye strain
- Smooth transitions between themes
- Persistent across browser sessions (stored in localStorage)
- ACE code editor automatically switches between GitHub (light) and Monokai (dark) themes
- Comfortable Mode: Standard spacing and padding (default)
- Compact Mode: Reduced spacing for more content on screen
- Affects card padding, margins, table cell padding, and navbar height
- Great for users who prefer information-dense layouts
- New dedicated settings page accessible from user dropdown menu
- Visual toggle switches for theme and layout
- Real-time preview of changes
- Easy-to-use interface with icons and descriptions
- Theme can be toggled directly from the navbar dropdown
- Icon changes to reflect current theme (moon for light, sun for dark)
- One-click switching without navigating to settings
- Log in to your account
- Click on your profile picture in the navbar
- Select "Settings" from the dropdown menu
Option 1: Via Settings Page
- Go to Settings page
- Toggle the "Theme" switch
- Theme changes instantly
Option 2: Via Navbar
- Click on your profile picture
- Click "Toggle Theme" in the dropdown
- Theme switches immediately
- Go to Settings page
- Toggle the "Layout Density" switch
- Choose between Comfortable and Compact
bemo/static/theme.css- CSS variables and theme definitionsbemo/static/theme.js- JavaScript for theme managementbemo/templates/settings.html- Settings page template
bemo/templates/layout.html- Added theme CSS/JS and settings menu itembemo/templates/problem.html- Updated ACE editor to respect themebemo/templates/home.html- Cleaned up emoji usage, replaced with Bootstrap iconsbemo/templates/problems.html- Cleaned up UI textbemo/routes.py- Added settings route
The theme system uses CSS custom properties (variables) for easy theming:
Colors:
--bg-primary,--bg-secondary,--bg-tertiary- Background colors--text-primary,--text-secondary,--text-muted- Text colors--navbar-bg,--navbar-text- Navbar colors--card-bg,--card-border,--card-shadow- Card styling--table-bg,--table-hover,--table-border- Table styling
Spacing (affected by layout mode):
--spacing-unit- Base spacing unit--card-padding- Card body padding--navbar-padding- Navbar padding--container-margin-top- Main container top margin--element-margin- Standard element margins--table-cell-padding- Table cell padding
- Uses modern CSS features (CSS Custom Properties)
- Requires ES6 JavaScript support
- Tested on modern browsers (Chrome, Firefox, Safari, Edge)
- Uses localStorage for persistence
- Theme changes are instant with CSS transitions
- No page reload required
- Minimal JavaScript overhead
- Settings stored locally, no server requests
- Fixed light theme only
- Emoji-heavy interface
- No user customization options
- One layout density
- Light and dark themes
- Cleaner icon-based interface using Bootstrap Icons
- User-customizable appearance
- Two layout density options
- Settings persist across sessions
- Smooth transitions and animations
Possible additions for the future:
- Additional color themes (blue, green, etc.)
- Custom accent color picker
- Font size adjustment
- More granular spacing controls
- Theme-specific code editor color schemes
- High contrast mode for accessibility
- Auto theme based on system preferences




