Version 12 (modified by 14 years ago) (diff) | ,
---|
Contents
Modular styles manager
Description
This plugin simplifies the process of distributing and deploying themes and styles.
In the 0.10 version, the WebAdmin plugin is required.
Options
All of these are under [theme]
.
- theme
- Specify which theme to use.
- override_logo
-
If set to true, the theme can override your
header_logo
settings with its own logo. (Note: This is true by default)
API Basics
Most themes should simply subclass ThemeBase
(in themeengine.api
). This works similarly
to WikiMacroBase
, use your theme name followed by "Theme" as the class name, and put the
description as the class's docstring. There are a number of class variable you can define to affect
how your theme will be loaded, if any is set to True
, it will take on a default value (see below):
- header
-
The path to the header template. (Defaults to
templates/header.cs
) - footer
-
The path to the footer template. (Defaults to
templates/footer.cs
) - css
-
The path to the CSS template. (Defaults to
templates/css.cs
) - htdocs
-
The folder containing the static content. (Defaults to
htdocs
) - screenshot
-
The path to the screenshot file. (Defaults to
htdocs/screenshot.png
) - header_logo
-
A dict containing the data normally in
[header_logo]
in trac.ini. (Defaults to{}
)
Packaging A Theme
For lack of a decent guide right now, check out some of the existing themes.
One request, when taking screenshots please make them of the first wiki page, preferably with its default content. Also please make them match the aspect ratio of 640x400.
Choosing a Theme
To select a theme you can either specify it in trac.ini (see below), or use the WebAdmin interface. The web interface does require JavaScript in your browser.
Bugs/Feature Requests
Existing bugs and feature requests for ThemeEnginePlugin are here.
If you have any issues, create a new ticket.
Download and Source
Download the zipped source from [download:themeengineplugin here]. You can check out ThemeEnginePlugin from here using Subversion, or browse the source with Trac.
Example
To enable:
[components] themeengine.* = enabled
To specify a theme:
[theme] theme = <Name>
Recent Changes
- 18454 by rjollos on 2021-10-18 16:56:07
-
ThemeEnginePlugin: Release version 2.3.1
Version 2.3.0 had a packaging problem.
Refs #14058.
- 18453 by rjollos on 2021-10-16 20:00:03
-
TracThemeEngine: Add release command
- 18452 by rjollos on 2021-10-16 19:57:10
-
ThemeEnginePlugin: Release version 2.3.0
Refs #14058.
(more)
Author/Contributors
Author: coderanger
Maintainer: coderanger
Contributors:
Attachments (3)
-
admin_theme.png (46.7 KB) - added by 14 years ago.
Screenshot of theme selector
-
admin_customize.png (52.7 KB) - added by 14 years ago.
Screenshot of theme customization system
-
admin_advanced.png (48.3 KB) - added by 14 years ago.
Screenshot of the advanced theme customization system
Download all attachments as: .zip