Skip to content

Creating a Theme

Andy Byers edited this page Sep 12, 2017 · 2 revisions

We have tried to keep theming within Janway was easy as possible. To create a new theme you require to create a folder with the following structure:

  • ThemeName (Must be one word)

    • assets
    • templates
    • init.py (Can be left blank)
    • build_assets.py
  • The assets folder should contain any static assets required to render the theme inc. CSS or JS.

  • The templates folder should contain a copy of all of Janeway's templates that you want to override. Any templates that are missing will be rendered from the default theme.

  • build_assets.py should contain code that compiles any scss using the SASS module (import sass and sass.compile(filename=app_scss_file, include_paths=paths)) and then copies or compiles those files into /src/static/THEMENAME/.

A good place to start with theming would be to copy the default theme it (bootstrap) or copy the OLH theme (foundation) and modify it. If using an entirely different framework copy default and strip the contents of its assets and templates folders.

New themes should be placed in the /src/themes/ folder, python3 manage.py build_assets should be run and then you can select the theme from the Journal Setting page.

Wiki has moved to read the docs.

Clone this wiki locally