town6.theme.town_theme

Attributes

HELVETICA

ARIAL

VERDANA

COURIER_NEW

ROBOTO_CONDENSED

MERRIWEATHER

user_options

default_font_families

Classes

TownTheme

Base class for Zurb Foundation based themes. Use this class to

Module Contents

town6.theme.town_theme.HELVETICA = '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif !default'[source]
town6.theme.town_theme.ARIAL = 'Arial, sans-serif !default'[source]
town6.theme.town_theme.VERDANA = 'Verdana, Geneva, sans-serif !default'[source]
town6.theme.town_theme.COURIER_NEW = '"Courier New", Courier, monospace !default'[source]
town6.theme.town_theme.ROBOTO_CONDENSED = '"Roboto Condensed", sans-serif !default'[source]
town6.theme.town_theme.MERRIWEATHER = 'Merriweather, sans-serif !default'[source]
town6.theme.town_theme.user_options[source]
town6.theme.town_theme.default_font_families[source]
class town6.theme.town_theme.TownTheme(compress: bool = True)[source]

Bases: onegov.foundation6.BaseTheme

Base class for Zurb Foundation based themes. Use this class to create a theme that customizes Zurb Foundation somehow.

If you don’t want to customize it at all, use Theme.

To customize start like this:

from onegov.foundation import BaseTheme

class MyTheme(BaseTheme):
    name = 'my-theme'
    version = '1.0'

You can then add paths with your own scss files, as well as imports that should be added before the foundation theme, and imports that should be added after the foundation theme.

Finally, options passed to the compile() function take this form:

options = {
    'rowWidth': '1000px',
    'columnGutter': '30px'
}

Those options result in variables added at the very top of the sass source (but after the _settings.scss) before it is compiled:

$rowWidth: 1000px;
$columnGutter: 30px;

If your variables rely on a certain order you need to pass an ordered dict.

If use_flex is set to False on the theme itself, the float grid is used instead.

If $xy-grid is set to false by the subclassing theme, the flex grid is used.

name = 'onegov.town6.foundation'[source]
_force_compile = False[source]
use_flex = True[source]
include_motion_ui = True[source]
property default_options: dict[str, Any][source]

Default options used when compiling the theme.

property foundation_styles: Sequence[str][source]

The default styles

property foundation_components: tuple[str, Ellipsis][source]

Foundation components except the grid without the prefix as in app.scss that will be included. Be aware that order matters. These are included, not imported.

property pre_imports: list[str][source]

Imports added before the foundation import. The imports must be found in one of the paths (see extra_search_paths).

The form of a single import is ‘example’ (which would search for files named ‘example.scss’)

property post_imports: list[str][source]

Our scss code split into various files

property extra_search_paths: list[str][source]

A list of absolute search paths added before the actual foundation search path.

property font_search_path: str[source]

Load fonts of the current theme folder and ignore fonts from parent applications if OrgTheme is inherited.

property font_families: dict[str, str][source]
property additional_font_families: dict[str, str][source]

Returns the filenames as they are to use as label in the settings as well as to construct the font-family string. Only sans-serif fonts are supported by now.