Brand

class bootlace.nav.elements.Brand(link: ~bootlace.links.LinkBase, a: ~bootlace.util.Tag = Tag(tag=<class 'dominate.tags.a'>, classes={'nav-link'}, attributes={}), id: str = NOTHING)[source]

Bases: Link

The brand for the navbar, typically the site’s logo or name

You can pass Link or View as the source link, and

Attributes Summary

a

active

Whether the link is active.

enabled

Whether the link is enabled.

id

The ID of the brand

link

The link to display, either a URL or a view

url

The URL for the link.

Methods Summary

__tag__()

element_state(tag)

Apply active and enabled states to the tag.

with_url(url, text, **kwargs)

Create a link with a URL.

with_view(endpoint, text, **kwargs)

Create a link with a view.

Attributes Documentation

a: Tag
active

Whether the link is active.

enabled

Whether the link is enabled.

id: str

The ID of the brand

The link to display, either a URL or a view

url

The URL for the link.

Methods Documentation

__tag__() dom_tag[source]
element_state(tag: dom_tag) dom_tag

Apply active and enabled states to the tag.

classmethod with_url(url: str, text: Taggable | dom_tag | str | Iterable[Taggable | dom_tag], **kwargs: Any) Link

Create a link with a URL.

classmethod with_view(endpoint: str, text: Taggable | dom_tag | str | Iterable[Taggable | dom_tag], **kwargs: Any) Link

Create a link with a view.