HtmlMenu Module
- class epyk.core.html.HtmlMenu.ContextMenu(page: PageModel, components: List[Html], width: str, height: str, visible: bool, html_code: Optional[str], options: Optional[dict], profile: Optional[Union[bool, dict]])
-
- add_item(value: str, icon: Optional[str] = None)
Add Item to the context menu.
- Parameters:
value –
icon – Optional. The Font awesome icon
- class epyk.core.html.HtmlMenu.HtmlFooter(page: PageModel, components: List[Html], width: tuple, height: tuple, options: Optional[dict], profile: Optional[Union[bool, dict]])
- add_menu(context_menu)
Attach a context menu to an existing component. A context menu must have a component attached to otherwise the report will not be triggered.
- Parameters:
context_menu – A Python context menu object
- property sections
- property style: ClassFooter
Property to the CSS Style of the component.
- class epyk.core.html.HtmlMenu.HtmlNavBar(page: PageModel, components: Optional[List[Html]], width: tuple, height: tuple, options: Optional[dict], html_code: str, profile: Optional[Union[bool, dict]])
- add_right(component: Html, css: Optional[dict] = None, prepend: bool = False, with_css_cls: bool = True) → Html
Add component to the right.
- Parameters:
component – Internal component to the framework
css – Optional. The CSS attributes
prepend – Optional
with_css_cls – Add the default hover CSS class to the component
- add_text(text: Union[Html, str]) → Html
Add an item to the nav bar.
Usage:
n = page.ui.navbar() n.add_text("Nav bar title")
- Parameters:
text – The link to be added to the navbar
- move()
Move the object to this position in the final page.
- no_background(to_top: bool = True)
Remove the default navigation bar background and remove the padding.
- Parameters:
to_top – Optional. To define if the padding must be removed
- set_theme()
- property style: ClassNav
Property to the CSS Style of the component.
- class epyk.core.html.HtmlList.Li(page: PageModel, text: Union[str, Html], options: Optional[dict] = None, html_code: Optional[str] = None)
- add_label(text: str, css: Optional[dict] = None, position: str = 'before', for_: Optional[Html] = None, html_code: Optional[str] = None, options: Optional[dict] = None)
Add an elementary label component.
Related Pages:
- Parameters:
text – The label content
css – Optional. A dictionary with the CSS style to be added to the component
position – Optional. The position
for – Optional. Specifies which form element a label is bound to
html_code – Optional. An identifier for this component (on both Python and Javascript side)
options – Optional. Specific Python options available for this component
- click(js_funcs: Union[List[Union[str, JsDataModel]], str], profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)
Add a click event to the component.
- Parameters:
js_funcs – Javascript functions
profile – Optional. A flag to set the component performance storage
source_event – Optional. The source target for the event
on_ready – Optional. Specify if the event needs to be trigger when the page is loaded
- property dom: JsHtmlLi
Return all the Javascript functions defined for an HTML Component.
Those functions will use plain javascript by default.
- Returns:
A Javascript Dom object
- no_decoration()
Remove the list default style.
- class epyk.core.html.HtmlMenu.PanelsBar(page: PageModel, width: tuple, height: tuple, options: Optional[dict], helper: str, profile: Optional[Union[bool, dict]])
- class epyk.core.html.HtmlMenu.Shortcut(page: PageModel, components: List[Html], logo: Union[str, Html], width: tuple, height: tuple, html_code: Optional[str], options: Optional[dict], profile: Optional[Union[bool, dict]])
- add_logo(icon: str, path: Optional[str] = None, align: str = 'center', width: tuple = (32, 'px'), height: tuple = (32, 'px'))
- Parameters:
icon – The component icon content from font-awesome references
path – Optional.
align – Optional. A string with the horizontal position of the component
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
- property style: ClassShortcut
Property to the CSS Style of the component.