Epyk
latest
  • Getting started with Epyk
  • First Pages with Epyk
  • Ready to use examples
  • Epyk and full stack development
  • Design & Architecture
  • Web frameworks
  • Security and Control
  • Advanced features
  • External resources
  • Library extensions
  • Bugs & ToDo
Epyk
  • HtmlLinks Module
  • Edit on GitHub

HtmlLinks Module

class epyk.core.html.HtmlLinks.DataLink(page: PageModel, text: str, value: Any, width: tuple, height: tuple, fmt: str, options: Optional[str], profile: Optional[Union[bool, dict]])
error(status: bool = True, label: str = '', data: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None)

Display an error message in the component.

Usage:

btn.click([
    t.error(True, label="`Error: ${data.result}`", data={"result": "Wrong Parameter"}),
])
Parameters:
  • status – The message status (true is active)

  • label – The message template

  • data – The message parameter to feed the template

loading(status: bool = True, label: str = "`<i class='fas fa-cog fa-spin' style='margin-right:5px'></i>Loading....`", data: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None)

Display a loading message in the component.

Usage:

btn.click([
    t.loading(True, label="`Loading: ${data.result}`", data={"result": "Waiting for response"}),
])
Parameters:
  • status – The message status (true is active)

  • label – The message template

  • data – The message parameter to feed the template

property no_decoration

Property to remove the list default style.

property options: OptionsLink

Property to set all the possible object for a button.

class epyk.core.html.HtmlLinks.ExternalLink(page: PageModel, text: str, url: str, icon: str, helper: str, height: tuple, decoration: bool, html_code: Optional[str], options: Optional[dict], profile: Optional[Union[bool, dict]])
anchor(component: Html)

Create a link to an HTML component defined in the page.

This will create a shortcut to directly scroll to this component.

Parameters:

component – A link to this HTML component

build(data: Optional[Union[List[Union[str, JsDataModel]], str]] = None, options: Optional[dict] = None, profile: Optional[Union[bool, dict]] = False, component_id: Optional[str] = None, dataflows: Optional[List[dict]] = None, **kwargs)

Return the JavaScript fragment to refresh the component content.

Parameters:
  • data – The component expected content

  • options – Optional. Specific Python options available for this component

  • profile – Optional. A flag to set the component performance storage

  • component_id – Optional. The component reference (the htmlCode)

  • dataflows – Chain of data transformations

property dom: JsHtmlLink

Return all the Javascript functions defined for an HTML Component.

Those functions will use plain javascript by default.

Returns:

A Javascript Dom object

error(status: bool = True, label: str = '', data: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None)

Display an error message in the component.

Usage:

btn.click([
    t.error(True, label="`Error: ${data.result}`", data={"result": "Wrong Parameter"}),
])
Parameters:
  • status – The message status (true is active)

  • label – The message template

  • data – The message parameter to feed the template

property js: Href

Specific Javascript function for the input object.

loading(status: bool = True, label: str = "`<i class='fas fa-cog fa-spin' style='margin-right:5px'></i>Loading....`", data: Optional[Union[str, JsDataModel, float, dict, list, bool]] = None)

Display a loading message in the component.

Usage:

btn.click([
    t.loading(True, label="`Loading: ${data.result}`", data={"result": "Waiting for response"}),
])
Parameters:
  • status – The message status (true is active)

  • label – The message template

  • data – The message parameter to feed the template

no_decoration(color: Optional[str] = None)

Property to remove the list default style.

Parameters:

color – Optional. The color code.

property options: OptionsLink

Property to set all the possible object for a button.


© Copyright 2020, Epykure. Revision 0f853e61.

Built with Sphinx using a theme provided by Read the Docs.