Changes between Version 2 and Version 3 of DeveloperGuidelines/Themes
- Timestamp:
- 06/22/12 14:16:43 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Themes
v2 v3 9 9 * CSS 10 10 11 NOTE: This is still a work-in-progress: not everything here is ready yet & the details may change! 12 13 === Default Theme === 14 By default these files are used: 15 * {{{/private/templates/default/views/layout.html}}} 16 in non-Debug mode: 17 * {{{/static/themes/default/sahana.min.css}}} 18 in Debug mode: 19 * {{{/private/templates/default/css.cfg}}} 20 * {{{/static/themes/default/layout.css}}} 21 * {{{/static/styles/S3/sahana.css}}} 22 23 === User Theme === 24 A new Theme should match the name of the controlling Template. 25 11 26 To create a new theme: 12 1. Create a new folder to hold the theme elements: {{{/static/themes/<themename>}}} 13 * subfolders: {{{/static/themes/<themename>/css}}}, {{{/static/themes/<themename>/img}}} 27 1. Specify the Theme name in your template's {{{/private/templates/<templatename>/config.py}}}: 28 * {{{settings.base.theme = "themename"}}} 29 1. Create new folders to hold the theme elements: 30 * {{{/static/themes/<themename>/css}}} which will usually contain these files: {{{layout.css}}}, {{{theme.css}}} (it is normally assumed that {{{/static/styles/S3/sahana.css}}} is also used) 31 * {{{/static/themes/<themename>/img}}} 14 32 1. If not already using a template create one: {{{/private/templates/<templatename>}}} 15 33 1. Create these files in your templates folder: 16 34 * {{{/private/templates/<templatename>/__init__.py}}} - this can be empty but must be present. 17 * {{{/private/templates/<templatename>/css.cfg}}} - list of CSS fiels to use in Debug mode, or be compressed together for the normal non-debug mode by the Build script. 35 * {{{/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 ({{{static/scripts/tools/build.sahana.py}}}) into: 36 * {{{/static/themes/<themename>/css/sahana.min.css}}} 37 * {{{/private/templates/<templatename>/views/layout.html}}} - overall layout of the HTML. 38 39 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