Changes between Version 3 and Version 4 of ThemeEnginePlugin


Ignore:
Timestamp:
Dec 13, 2006 1:32:21 PM (8 years ago)
Author:
coderanger
Comment:

Add API guide

Legend:

Unmodified
Added
Removed
Modified
  • ThemeEnginePlugin

    v3 v4  
    55This plugin simplifies the process of distributing and deploying themes and styles.  
    66 
    7 Stay tuned for API information as things stabilize a bit (if you are really curious, take a look at `api.py`). 
     7== API Basics == 
     8Most themes should simply subclass `ThemeBase` (in `themeengine.api`). This works similarly 
     9to `WikiMacroBase`, use you theme name followed by "Theme" as the class name, and put the 
     10description as the class's docstring. There are a number of class variable you can define to affect  
     11how your theme will be loaded, if any is set to `True`, it will take on a default value (see below): 
     12 header:: 
     13   The path to the header template. (Defaults to `templates/header.cs`) 
     14 footer:: 
     15   The path to the footer template. (Defaults to `templates/footer.cs`) 
     16 css:: 
     17   The path to the CSS template. (Defaults to `templates/css.cs`) 
     18 htdocs:: 
     19   The folder containing the static content. (Defaults to `htdocs`) 
     20 screenshot:: 
     21   The path to the screenshot file. (Defaults to `htdocs/screenshot.png`) 
     22 header_logo:: 
     23   A dict containing the data normally in `[header_logo]` in trac.ini. (Defaults to `{}`) 
     24 
     25== Packaging A Theme == 
     26For lack of a decent guide right now, check out some of [wiki:GamedevTheme the] [wiki:ConsultantTheme existing] [wiki:PyDotOrgTheme themes]. 
     27 
     28One request, when taking screenshots please make them of the first wiki page, preferably with its default content. Also please make them match the aspect ration of 640x400. 
    829 
    930== Bugs/Feature Requests ==