Module reahl.web.bootstrap.navbar

New in version 3.2.

A Bootstrap Navbar is a header for a web application with all manner of useful content, including a navigation menu.

ResponsiveLayout

class reahl.web.bootstrap.navbar.ResponsiveLayout(collapse_below_device_class, center_contents=False, fixed_to=None, align_toggle_left=False, collapse_brand_with_content=False, colour_theme=None, bg_scheme=None, text=None)

Makes the Navbar responsive and collapseable depending on the device.

Parameters
  • collapse_below_device_class – Which device class should trigger responsive collapsing. Valid values: xs, sm, md, lg, xl

  • center_contents – If True, all the contents of the Navbar is centered within the Navbar itself.

  • fixed_to – May be one of ‘fixed-top’,’fixed-bottom’ or ‘sticky-top’. The Navbar will stick to the top or bottom of the viewport.

  • align_toggle_left – If True align the toggle on the left (the default is to align it right).

  • collapse_brand_with_content – When set to True, the brand should collapse with the content.

  • colour_theme – Use ‘light’ for use with light background colors, or ‘dark’ with dark background colors.

  • bg_scheme – Whether the Navbar should use ‘primary’ colors, a ‘dark’ (light on dark) scheme or a ‘light’ background.

  • text – Text to be used on the toggle link. If None, the boostrap navbar-toggler-icon is used.

customise_widget()

Override this method in subclasses to allow your Layout to change its Widget upon construction. There is no need to call super(), as the superclass implementation does nothing.