I just separated bamboo into
- core
- themes
So the engine can have multiple front-end, bamboo is also more lightweight :)
/==============================\
| code : 1436 |
| comment : 106 |
|------------------------------|
| ratio: |
| comment/code : 0.07 |
\==============================/
As a result, when bamboo is bootstrapped by bamboo-launcher, the launcher imports both bamboo and bamboo-theme-blueprint, and download the template db directory accordingly.
Some attention to software engineering makes bamboo -Wall -fno-warn-orphans clean.
A note on using theme, there are 3 parts from a theme:
- a theme module to import, this happens in code, as theme is now a parameter to the bamboo middleware
- a theme specific resource pointer, this is configured in
site.txt:theme_name, you then putjsandcssconfig options insidedb/config/theme/theme_name.txt, seedb/config/theme/blueprint.txtfor example. The reason to have a theme resource field insite.txtis to allow the theme to be configured without re-compililation, which might take some time. However, a theme is not required to use the resource field. - the actual theme resource, placed under
db/public/theme/theme_name, e.g.db/public/theme/blueprint.
So a theme is about both the code, that generates html, and static resources, referred from html. There could be a better approach, but I think separating code and data should be a pleasant experience.
The same applies to developing a theme, you need to provide both the code and data.
Finally the theme interface:
1 | |