Skip to content

design

konigle.managers.website.design

AsyncStylesheetManager

Bases: BaseStyleSheetManager

Asynchronous manager for managing design system stylesheet for the website.

get_content() async

Get the content of the design system stylesheet.

RETURNS DESCRIPTION
str

The stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

set_content(content) async

Set the content of the design system stylesheet. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

AsyncThemeManager

Bases: BaseThemeManager

Asynchronous manager for managing themes for the website.

get_reference_theme_template() async

Get the reference page for the current theme. Returns: str: The reference page URL or identifier.

get_theme_css() async

Get the theme css content for the website if set.

RETURNS DESCRIPTION
str

The theme CSS content. Empty string if no theme is set.

TYPE: str

set_reference_theme_template(html_content, backup=False) async

Set the reference page for the current theme.

PARAMETER DESCRIPTION
html_content

The HTML content to set as the reference page.

TYPE: str

backup

Whether to create a backup of the existing

TYPE: bool DEFAULT: False

Raises:

set_theme_css(css_content, backup=False) async

Set the theme CSS content for the website.

PARAMETER DESCRIPTION
css_content

The new theme CSS content.

TYPE: str

backup

Whether to create a backup of the existing CSS

TYPE: bool DEFAULT: False

Raises:

AsyncWebsiteJSManager

Bases: BaseWebsiteJSManager

Asynchronous manager for managing theme JS for the website.

get_theme_js() async

Get the content of the theme JS.

RETURNS DESCRIPTION
str

The theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.

set_theme_js(content) async

Set the content of the theme JS. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.

BaseStyleSheetManager

base_path = '/admin/api/storefront-assets' class-attribute instance-attribute

The API base path for this resource type.

resource_class = None class-attribute instance-attribute

The resource model class this manager handles.

BaseThemeManager

base_path = '/themes/api/v1/site-themes' class-attribute instance-attribute

The API base path for this resource type.

resource_class = None class-attribute instance-attribute

The resource model class this manager handles.

BaseWebsiteJSManager

base_path = '/admin/api/storefront-assets' class-attribute instance-attribute

The API base path for this resource type.

resource_class = None class-attribute instance-attribute

The resource model class this manager handles.

StylesheetManager

Bases: BaseStyleSheetManager

Manager for managing design system stylesheet for the website.

get_content()

Get the content of the design system stylesheet.

RETURNS DESCRIPTION
str

The stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

set_content(content)

Set the content of the design system stylesheet. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new stylesheet content.

TYPE: str

Raises: ValueError: If the stylesheet asset is not found.

ThemeManager

Bases: BaseThemeManager

Manager for managing themes for the website.

get_reference_theme_template()

Get the reference page for the current theme.

RETURNS DESCRIPTION
str

The reference page URL or identifier.

TYPE: str

get_theme_css()

Get the theme css content for the website if set.

RETURNS DESCRIPTION
str

The theme CSS content. Empty string if no theme is set.

TYPE: str

set_reference_theme_template(html_content, backup=False)

Set the reference page for the current theme.

PARAMETER DESCRIPTION
html_content

The HTML content to set as the reference page.

TYPE: str

backup

Whether to create a backup of the existing

TYPE: bool DEFAULT: False

Raises:

set_theme_css(css_content, backup=False)

Set the theme CSS content for the website.

PARAMETER DESCRIPTION
css_content

The new theme CSS content.

TYPE: str

backup

Whether to create a backup of the existing CSS

TYPE: bool DEFAULT: False

Raises:

WebsiteJSManager

Bases: BaseWebsiteJSManager

Manager for managing theme JS for the website.

get_theme_js()

Get the content of the theme JS.

RETURNS DESCRIPTION
str

The theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.

set_theme_js(content)

Set the content of the theme JS. This will overwrite the existing content.

PARAMETER DESCRIPTION
content

The new theme JS content.

TYPE: str

Raises: ValueError: If the theme JS asset is not found.