wip - nicegui

This commit is contained in:
Stephan Lüscher 2024-05-06 15:16:52 +00:00
parent c3ed45a21b
commit 85b0b3fdc5
No known key found for this signature in database
GPG key ID: 445779060FF3D3CF
39 changed files with 2748 additions and 896 deletions

26
anvil/nicegui/theme.py Normal file
View file

@ -0,0 +1,26 @@
from contextlib import contextmanager
from menu import menu
from nicegui import ui
@contextmanager
def frame(navigation_title: str, enable_right_drawer: bool = False):
"""Custom page frame to share the same styling and behavior across all pages"""
ui.colors(primary="#4051b5", secondary="#dddbff", accent="#171d9a")
with ui.header():
with ui.row():
menu()
ui.space()
with ui.link(target="https://github.com/ublue-os/forge", new_tab=True):
ui.icon("eva-github").classes("text-2xl")
with ui.column().classes():
ui.label(navigation_title).classes("text-h4")
yield
with ui.footer(value=False):
ui.add_head_html(
'<link href="https://unpkg.com/eva-icons@1.1.3/style/eva-icons.css" rel="stylesheet" />'
)