Skip to content

Commit 0eff3da

Browse files
committed
Add theme example file + Fix font not found
1 parent 7d1a0b5 commit 0eff3da

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
1111
## [6.0.0-beta.6](https://github.com/userfrosting/UserFrosting/compare/6.0.0-beta.5...6.0.0-beta.6)
1212
- Remove Limax from optimizeDeps
13+
- Add example file on how to overwrite the Less/CSS theme
1314

1415
## [6.0.0-beta.5](https://github.com/userfrosting/UserFrosting/compare/6.0.0-beta.4...6.0.0-beta.5)
1516
- Update Docker setup (@ssnukala)

app/assets/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ import AdminSprinkle from '@userfrosting/sprinkle-admin'
2727
app.use(AdminSprinkle)
2828

2929
/** Setup Theme */
30-
import '@userfrosting/theme-pink-cupcake/less/main.less'
3130
import PinkCupcake from '@userfrosting/theme-pink-cupcake'
3231
app.use(PinkCupcake)
3332

33+
// Import custom theme overrides
34+
import './theme.less'
35+
3436
// Done
3537
app.mount('#app')

app/assets/theme.less

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@import '@userfrosting/theme-pink-cupcake/less/main.less';
2+
3+
/**
4+
* Custom Theme Variables and Overrides
5+
*
6+
* This file serves as a customization layer for overriding default Less variables
7+
* and CSS styles in your project. It allows you to:
8+
*
9+
* - Override default Less variables (colors, fonts, spacing, etc.)
10+
* - Add project-specific CSS rules and modifications
11+
*
12+
* Usage:
13+
* 1. Define custom Less variables to override defaults
14+
* 2. Add custom CSS rules and styles
15+
*
16+
* Example variable overrides:
17+
* @primary-color: #your-custom-color;
18+
* @font-family-base: 'Your Custom Font', sans-serif;
19+
* @navbar-background: 'Custom navbar color'
20+
*
21+
* Check UserFrosting documentation and UiKit documentation for a list of
22+
* available variables to override.
23+
*/
24+
25+
// Example: Uncomment below to change the navbar background color to green
26+
// @navbar-background: #009556;

0 commit comments

Comments
 (0)