Changes between Version 2 and Version 3 of DeveloperGuidelines/Themes


Ignore:
Timestamp:
06/22/12 14:16:43 (9 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Themes

    v2 v3  
    99* CSS
    1010
     11NOTE: This is still a work-in-progress: not everything here is ready yet & the details may change!
     12
     13=== Default Theme ===
     14By default these files are used:
     15* {{{/private/templates/default/views/layout.html}}}
     16in non-Debug mode:
     17* {{{/static/themes/default/sahana.min.css}}}
     18in Debug mode:
     19* {{{/private/templates/default/css.cfg}}}
     20* {{{/static/themes/default/layout.css}}}
     21* {{{/static/styles/S3/sahana.css}}}
     22
     23=== User Theme ===
     24A new Theme should match the name of the controlling Template.
     25
    1126To 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}}}
     271. Specify the Theme name in your template's {{{/private/templates/<templatename>/config.py}}}:
     28 * {{{settings.base.theme = "themename"}}}
     291. 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}}}
    14321. If not already using a template create one: {{{/private/templates/<templatename>}}}
    15331. Create these files in your templates folder:
    1634 * {{{/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
     39NB 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