MoinMoin 2.0 Themes
Contents
If you are interested in moin2 themes, please add your questions, comments, or answers.
Goals and Strategy
Moin2 should have a few well-supported themes in the core code. There should be one default theme and the other supported themes should subset the default theme, overriding or adding CSS, Javascript, templates, icons, core theme code, etc. when required. Subsetting will reduce work and bugs because many theme related enhancements to CSS, Javascript, etc. need only be done once in the default theme.
Supported themes should include:
- topbar - Modernized or successor
- sidebar - foobar or successor
explorer-like (because it is so different) - http://moinmo.in/ThemeMarket/Explorer
Custom Themes
Many sites that use MoinMoin have custom themes. Custom themes should be easy to create by subsetting any other installed theme. A custom theme that only changes the Moin2 modernized topbar background would require:
/MyTheme - folder name indicates theme name
- subsets.txt - file containing "modernized", the theme being subset
- /img - folder holding images to be overridden
- white-clouds.jpg - new background image (where maybe white-clouds.jpg should be a more generic name - topbar-background.jpg)
Optional MyTheme sub-folders include everything a theme may require:
- img
- js
- css
- templates
- python - macros or override/extend core code
currently we use flask-themes for theming, so we have to consider its features and limitations. There is already some docs about how to customize (parts of the) theme.
- Then we should have high expectations from the folks at Flask. I think copying all CSS, all IMG, all Javascript like we do in moin 1.x is the cause of many problems and a lot of rework.
How to Create a Custom Theme
Questions
- where to put theme folder
within a sibling of moin wiki folder named "CustomThemes" (visible and out of the way of core code upgrades)
- if overriding or extending CSS, Javascript, templates, are there file naming rules
- how to add jQuery or other library add-ons
- how to override core code or add custom macros
- must custom themes use stylus for CSS
How to Contribute a Custom Theme
Similar to current way, create announcement page, zip, and upload? Or recommend use of Bitbucket?
We shouldn't discuss this as part of theming. If possible, we can do this with the (TBD) plugin system (we also need to distribute plugins). -- ThomasWaldmann 2012-03-21 23:33:02
How to Install a Contributed Theme
Similar to current, download and unzip to custom theme folder?
We shouldn't discuss this as part of theming. If possible, we can do this with the (TBD) plugin system. -- ThomasWaldmann 2012-03-21 23:33:02
Top Bar (Modernized) Theme To Do
CSS
- remove unused
- convert to stylus
Item bar
- break into 2 or 3 sublists in prep for sidebar (this need not change current display, could hide group headings with CSS)
Editor help, edit preview
Side Bar Theme
Should folder structure of core theme mirror custom theme (but maybe different location)?
There are things you can do in a sidebar theme that are hard to do in topbar theme:
- Table of Contents
- add show/hide links to comments, transclusions
- add button to display location of macros (similar to transclusions)
- reorder sidebar column items
- show/hide sidebar, change width
Explorer Theme
Too much work, too little interest?
I don't think we should have this in core. We have lots to do with the other 2. I prefer 1 or 2 done right to a lot of half-assed themes. Because of that, I'ld even think about discouraging creation of new 3rd party themes and encourage contributions to the builtin themes (at least until they are in really good shape). For moin 1.x, we had a lot of themes. Many where only short lived and not maintained long term, some were improvements in some area, but (rather obvious) regressions in other areas. I think people should collaborate more to have a few good themes, before adding new ones. -- ThomasWaldmann 2012-03-21 23:19:05
I would enourage the creation of 3rd party themes now (or soon). Modernized on Moin2 is a good solid theme, it is already better than Modernized on moin 1.9x.
The number of sites listed on MoinMoinWikis Shows MoinMoin's prior success. Many of those sites have customized themes. While the thought of pink and green on moinmo.in may make us puke, it may work well on a site with an environmental agenda or a flower shop. Ease of customization is MoinMoin's most important feature.
It is unfortunate that moin 1.x has a number of broken and abandoned themes. But we made them hard to maintain by forcing the owners to copy all CSS and all Javascript. And then we broke them by making changes to the core. So let's try to fix that.
I think we are likely to gain more contributers by encouraging customized themes. If someone's first requirement for a better theme is pink and green, I think we should say "that's easy, read this". He may never have an idea that makes it into the core code, but he may help in other ways. Maybe he will discover and fix documentation errors. Maybe he will add his site to MoinMoinWikis. -- RogerHaase 2012-03-22 05:26:35