Add ViewEngine for easy server integration
- ViewEngine manages views directory with path resolution - Auto-loads mixins from views/mixins/ directory - Simplifies template paths (relative to views dir, auto-adds extension) - Updated example app to use ViewEngine - Added example mixins (buttons.pug, cards.pug) - Updated CLAUDE.md with ViewEngine documentation
This commit is contained in:
11
src/examples/app_01/views/mixins/cards.pug
Normal file
11
src/examples/app_01/views/mixins/cards.pug
Normal file
@@ -0,0 +1,11 @@
|
||||
mixin card(title)
|
||||
.card
|
||||
.card-header
|
||||
h3= title
|
||||
.card-body
|
||||
block
|
||||
|
||||
mixin card-simple(title, body)
|
||||
.card
|
||||
h3= title
|
||||
p= body
|
||||
Reference in New Issue
Block a user