First time here? Check out the FAQ!
1

Current state of skins

The last question about skins (from August) I could find says that skins can only be loaded from the existing skins directory, and that it would be better to defer HTML customisation until the skins are re-written in Jinja2.

I notice that some things have changed: doing pip install askbot installed jinja2, so it is presumably now used, there is a skin setting in /settings, and the default settings.py has the following line:

os.path.join(os.path.dirname(__file__),'askbot','skins').replace('\\','/')

Does this all mean that we can more easily customise and do it in an askbot/settings directory?

graeme's avatar
319
graeme
asked 2010-11-01 16:38:57 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

It is possible to add custom footer, css, js, and the HTML <head> element via the settings user interface and the possibility to add top portion of the site will be included shortly (there will be other useful changes as well).

So, the easiest method to modify appearance of the site is through the "settings" interface and the admin account.

A caveat is that some names of the element selectors might still change so the customization may require some maintenance upon upgrades.

The second method is to edit the html template files directly.

If you choose the second method, keep using the "default" skin and edit its html template files, while maintaining a local git repository (which does not have to be publicly accessible). That's how I maintain skin for askbot.org. askbot.org is not too different from the default application, but there are substantial modifications in some places. When default skin changes - you'll just need to merge the modification into your local skin. This is quite simple and manageable in git if you keep up with the updates.

The first template to look at is askbot/skins/default/templates/base.html, it is quite simple and you can substantially change the appearance by modifying that template in the combination with adding some custom css.

Another helpful bit when customizing the templates is installing askbot application in the "developer" mode:

python setup.py develop

That way the askbot app will stay in the local directory and the files can be accessed more easily.

Evgeny's avatar
13.2k
Evgeny
updated 2010-12-26 00:33:22 -0500, answered 2010-11-01 16:55:39 -0500
edit flag offensive 0 remove flag delete link

Comments

I will probably stick to CSS changes to fonts and colours for the moment then. I like your default theme better than the OSQA's - my only real dislike is that it does not scale down to small, and it may be possible to improve even this with CSS. I tend to prefer fluid layouts and try to avoid pixel widths and font sizes but I think I will live with that for now. Thanks.
graeme's avatar graeme (2010-11-02 06:51:47 -0500) edit
add a comment see more comments