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:
|
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:
|
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:
|
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:
|
backup
|
Whether to create a backup of the existing
TYPE:
|
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:
|
backup
|
Whether to create a backup of the existing CSS
TYPE:
|
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:
|
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:
|
Raises: ValueError: If the theme JS asset is not found.
BaseStyleSheetManager
¶
BaseThemeManager
¶
BaseWebsiteJSManager
¶
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:
|
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:
|
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:
|
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:
|
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:
|
backup
|
Whether to create a backup of the existing
TYPE:
|
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:
|
backup
|
Whether to create a backup of the existing CSS
TYPE:
|
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:
|
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:
|
Raises: ValueError: If the theme JS asset is not found.