Themes and Customization¶
Trunk8 includes 25+ beautiful themes from Bootswatch, allowing you to customize the appearance of both the main interface and markdown rendering.
Available Themes¶
Theme Gallery¶
Theme | Description | Best For |
---|---|---|
Cerulean | A calm blue sky | Professional, clean interfaces |
Cosmo | An ode to Metro | Modern, flat design |
Cyborg | Jet black and electric blue | Dark mode, tech focus |
Darkly | Flatly in night mode | Dark theme preference |
Flatly | Flat and modern | Minimalist design |
Journal | Crisp like a new sheet of paper | Content-focused sites |
Litera | The medium is the message | Typography emphasis |
Lumen | Light and shadow | Subtle, refined look |
Lux | A touch of class | Premium feel |
Materia | Material is the metaphor | Google Material Design |
Minty | A fresh feel | Light, refreshing |
Morph | A modern take | Contemporary design |
Pulse | A trace of purple | Vibrant accents |
Quartz | A gem of a theme | Clean, crystalline |
Sandstone | A touch of warmth | Friendly, approachable |
Simplex | Mini and minimalist | Ultra-minimal |
Sketchy | A hand-drawn look | Playful, informal |
Slate | Shades of gunmetal gray | Professional dark |
Solar | A spin on Solarized | Developer-friendly |
Spacelab | Silvery and sleek | Futuristic |
Superhero | The brave and the blue | Bold, heroic |
United | Ubuntu orange and unique font | Ubuntu-inspired |
Vapor | A subtle theme | Soft, muted tones |
Yeti | A friendly foundation | Approachable, clean |
Zephyr | Breezy and beautiful | Light, airy design |
Changing Themes¶
Via Web Interface¶
- Log in to Trunk8
- Click "Settings" in navigation
- Select themes from dropdowns:
- UI Theme: Main interface theme
- Markdown Theme: Theme for rendered markdown
- Click "Save Settings"
- Changes apply immediately
Via Configuration File¶
Edit config/config.toml
:
Save the file - Trunk8 reloads automatically.
Dual Theme System¶
Why Two Themes?¶
Trunk8 allows separate themes for:
- UI Theme: Admin interface, forms, navigation
- Markdown Theme: Rendered markdown content
This allows:
- Dark UI with light markdown for readability
- Consistent branding with varied content
- User preference accommodation
Example Combinations¶
UI Theme | Markdown Theme | Effect |
---|---|---|
Darkly | Flatly | Dark interface, light content |
Cosmo | Cosmo | Consistent modern look |
Slate | Solar | Professional dark with coder-friendly content |
Lux | Journal | Premium UI with readable content |
Theme Features¶
Responsive Design¶
All themes are:
- Mobile-friendly
- Tablet-optimized
- Desktop-perfect
- Print-ready
Accessibility¶
Themes include:
- High contrast options
- Screen reader support
- Keyboard navigation
- ARIA labels
Browser Support¶
Compatible with:
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Mobile browsers
Customization Options¶
CSS Overrides¶
Add custom CSS in app/static/css/custom.css
:
/* Custom brand colors */
.navbar {
background-color: #ff6b6b !important;
}
/* Custom fonts */
body {
font-family: 'Inter', sans-serif;
}
/* Custom link colors */
a {
color: #4ecdc4;
}
Include in base template:
Logo Customization¶
Replace the logo:
- Add your logo to
app/static/img/
- Update templates referencing
trunk8_logo.png
- Recommended: 200x200px PNG with transparency
Favicon¶
Change the favicon:
- Create favicon.ico
- Place in
app/static/
- Update base template
Theme Selection Guide¶
For Business Use¶
Professional themes:
- Cosmo: Clean, modern
- Flatly: Minimalist
- Lux: Premium feel
- United: Ubuntu-inspired
For Dark Mode¶
Dark themes:
- Darkly: Flat dark design
- Cyborg: High-tech dark
- Slate: Professional dark
- Solar: Developer-focused
For Creativity¶
Unique themes:
- Sketchy: Hand-drawn style
- Journal: Paper-like
- Pulse: Purple accents
- Vapor: Vaporwave aesthetic
For Readability¶
Content-focused:
- Litera: Typography-first
- Journal: Clean reading
- Flatly: Minimal distractions
- Simplex: Ultra-simple
Advanced Theming¶
Theme Variables¶
Bootswatch themes use CSS variables:
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
}
Override in custom CSS:
Component Styling¶
Target specific components:
/* Custom button styles */
.btn-primary {
border-radius: 50px;
text-transform: uppercase;
}
/* Custom card styles */
.card {
border: none;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* Custom navbar */
.navbar-brand {
font-weight: bold;
font-size: 1.5rem;
}
JavaScript Theming¶
Add theme toggle:
function toggleTheme() {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
}
Theme Development¶
Creating Custom Themes¶
- Start with a Bootswatch theme
- Modify variables
- Compile with Sass
- Test across devices
Theme Structure¶
// _variables.scss
$primary: #ff6b6b;
$secondary: #4ecdc4;
$font-family-base: 'Inter', sans-serif;
// _bootswatch.scss
.navbar {
border-radius: 0;
}
.btn {
text-transform: uppercase;
}
Testing Themes¶
Check:
- All page types
- Form elements
- Tables and lists
- Mobile responsiveness
- Print styling
Troubleshooting¶
Theme Not Changing¶
- Clear browser cache
- Hard refresh (Ctrl+Shift+R)
- Check config/config.toml syntax
- Verify theme name spelling
Broken Styling¶
- Check custom CSS for errors
- Disable browser extensions
- Try incognito mode
- Verify CDN accessibility
Performance Issues¶
- Minimize custom CSS
- Use browser caching
- Optimize images
- Enable compression
Best Practices¶
Do's¶
- ✅ Test on multiple devices
- ✅ Check accessibility
- ✅ Keep customizations minimal
- ✅ Document custom changes
- ✅ Backup before major changes
Don'ts¶
- ❌ Override too many styles
- ❌ Use !important excessively
- ❌ Forget mobile testing
- ❌ Ignore performance
- ❌ Break accessibility
Resources¶
Learning More¶
Next Steps¶
- Browse available themes
- Configure settings
- Learn about custom development
- Explore API documentation