town6.theme.town_theme ====================== .. py:module:: town6.theme.town_theme Attributes ---------- .. autoapisummary:: town6.theme.town_theme.HELVETICA town6.theme.town_theme.ARIAL town6.theme.town_theme.VERDANA town6.theme.town_theme.COURIER_NEW town6.theme.town_theme.ROBOTO_CONDENSED town6.theme.town_theme.MERRIWEATHER town6.theme.town_theme.user_options town6.theme.town_theme.default_font_families Classes ------- .. autoapisummary:: town6.theme.town_theme.TownTheme Module Contents --------------- .. py:data:: HELVETICA :value: '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif !default' .. py:data:: ARIAL :value: 'Arial, sans-serif !default' .. py:data:: VERDANA :value: 'Verdana, Geneva, sans-serif !default' .. py:data:: COURIER_NEW :value: '"Courier New", Courier, monospace !default' .. py:data:: ROBOTO_CONDENSED :value: '"Roboto Condensed", sans-serif !default' .. py:data:: MERRIWEATHER :value: 'Merriweather, sans-serif !default' .. py:data:: user_options .. py:data:: default_font_families .. py:class:: TownTheme(compress: bool = True) Bases: :py:obj:`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 :class:`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 :meth:`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. .. py:attribute:: name :value: 'onegov.town6.foundation' The name of the theme, must be unique. .. py:attribute:: _force_compile :value: False .. py:attribute:: use_flex :value: True .. py:attribute:: include_motion_ui :value: True .. py:property:: default_options :type: dict[str, Any] Default options used when compiling the theme. .. py:property:: foundation_styles :type: collections.abc.Sequence[str] The default styles .. py:property:: foundation_components :type: tuple[str, Ellipsis] 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. .. py:property:: pre_imports :type: list[str] Imports added before the foundation import. The imports must be found in one of the paths (see :attr:`extra_search_paths`). The form of a single import is 'example' (which would search for files named 'example.scss') .. py:property:: post_imports :type: list[str] Our scss code split into various files .. py:property:: extra_search_paths :type: list[str] A list of absolute search paths added before the actual foundation search path. .. py:property:: font_search_path :type: str Load fonts of the current theme folder and ignore fonts from parent applications if OrgTheme is inherited. .. py:property:: font_families :type: dict[str, str] .. py:property:: additional_font_families :type: dict[str, str] 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.