= Themes = [[TOC]] Sahana Eden supports custom Themes as part of it's overall [DeveloperGuidelines/Templates Templates] system. This allows customisation of: * Layout * CSS NOTE: This is still a work-in-progress: not everything here is ready yet & the details may change! === Default Theme === By default these files are used: * {{{/private/templates/default/views/layout.html}}} * {{{/private/templates/default/views/load.html}}} in non-Debug mode: * {{{/static/themes/default/css/sahana.min.css}}} in Debug mode: * {{{/private/templates/default/css.cfg}}} * {{{/static/themes/default/css/layout.css}}} * {{{/static/themes/default/reset.css}}} * {{{/static/themes/default/layout.css}}} * {{{/static/themes/default/shortcut.css}}} * {{{/static/themes/default/widgets.css}}} * {{{/static/themes/default/style.css}}} * {{{/static/themes/default/homepage.css}}} etc === User Theme === A new Theme should match the name of the controlling Template. To create a new theme: 1. Specify the Theme name in your template's {{{/private/templates//config.py}}}: * {{{settings.base.theme = "themename"}}} 1. Create new folders to hold the theme elements: * {{{/static/themes//css}}} which will usually contain these files: {{{layout.css}}}, {{{style.css}}} (it is normally assumed that {{{/static/themes/default/css/widgets.css}}} is also used) * {{{/static/themes//img}}} 1. If not already using a template create one: {{{/private/templates/}}} 1. Create these files in your templates folder: * {{{/private/templates//__init__.py}}} - this can be empty but must be present. * {{{/private/templates//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 ({{{static/scripts/tools/build.sahana.py}}}) into: * {{{/static/themes//css/sahana.min.css}}} * {{{/private/templates//views/layout.html}}} - overall layout of the HTML. 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 ==== Ext Theme ==== Use [http://www.codebeautifier.com CodeBeautifier] to merge the {{{ext-all-notheme.css}}} with {{{xtheme-gray.css}}} (merges properties on the same selectors which most minifiers don't): * {{{static/scripts/ext/resources/css/ext-theme.min.css}}} Can also use this to merge a custom theme, e.g. built with http://extbuilder.dynalias.com == See Also == * [DeveloperGuidelines/Templates Templates] * [DeveloperGuidelines/Menus Menus] * [DeveloperGuidelines/CustomPages Custom Pages]