Forum OpenACS Q&A: Re: Current state of theming in OpenACS (without .LRN)

Hi Jim,

1. In your copy of openacs-default-theme, rename the function to something like my_new_theme::install::after_install and find/replace this function throughout the package copy. There are also some calls within this function that need to be updated before installing the package.

2. blank-master should only exist in one place for the whole instance, so its absence in the theme is by design. Your own templates combine with the blank-master. See openacs-default-theme for an example. If you want to branch the css files for lists and forms, places them in my_new_theme/www/resources/styles and add the path in your ThemeCSS theme package parameters. Alternate form templates can be placed in the theme and referred to in the formtemplate tag as style=/path/to/template.

Yes, once you have copied and updated openacs-default-theme, you will definitely want to install this new package.

If you need an example of a customised theme package, let me know.

Ryan

Collapse
Posted by Jim Lynch on
Heya Ryan!

the script I wrote is already doing (1), and also making sure package key, pretty name and pretty plural are unique within the openacs instance. It uses an xml parser (tdom) on the .info file, and it reads that file, finds the stuff that matches the old package name (likely and currently only openacs-default-theme) and replaces it in the tdom tree, which I then write back out.

Please check it out, a reference to the git repo is in this thread somewhere. I have tested packages copied by my script, and they are working fine; the default setter in the callback being a minor inconvenience and I want input to see if other people think it's not so minor.

About (2), on blank-master, I was thinking that since it contains the outer stuff (doctype and <html ...> ... </html>) one could be motivated to alter it as newer versions of html may require different things, and I may be motivated to preserve the original.

Yes! I would love to see a theme! I am also interested in documenting the existing css classes in a refcard-like format.

Thanks!

-Jim
.

Collapse
Posted by Dave Bauer on
For CSS I suggest throwing out everything except the forms and list CSS.

Use something like http://twitter.github.com/bootstrap/ (there are plenty of other HTML5/CSS frameworks). I did this on my latest theme and its great!