|Version 8 (modified by 9 years ago) ( diff ),|
Sahana Eden supports custom Themes as part of it's overall Templates system.
This allows customisation of:
NOTE: This is still a work-in-progress: not everything here is ready yet & the details may change!
By default these files are used:
in non-Debug mode:
in Debug mode:
A new Theme should match the name of the controlling Template.
To create a new theme:
- Specify the Theme name in your template's
settings.base.theme = "themename"
- Create a new folder to hold the theme elements:
/static/themes/<themename>which will usually contain these files:
style.css(it is normally assumed that
/static/themes/default/css/widgets.cssis also used)
- If not already using a template create one:
- Create these files in your templates folder:
/private/templates/<templatename>/__init__.py- this can be empty but must be present.
/private/templates/<templatename>/css.cfg- list of CSS files to use in Debug mode, or be compressed together for the normal non-debug mode by the Build script (
/private/templates/<templatename>/views/layout.html- overall layout of the HTML.
Note that all CSS files should be able to find their images both in debug mode & when compressed into eden.min.css
NB Production sites who wish to compile their code either need to hardcode the theme name in their
views/layout.html or upgrade to Web2Py version: 2.00.0 (2012-06-17 23:36:32), or newer.
Use CodeBeautifier to merge the
xtheme-gray.css (merges properties on the same selectors which most minifiers don't):
Can also use this to merge a custom theme, e.g. built with http://extbuilder.dynalias.com