feat(nicegui): add about section

This commit is contained in:
Stephan Lüscher 2024-05-20 18:14:29 +00:00
parent f5c95c8d1e
commit f67774443f
No known key found for this signature in database
GPG key ID: 445779060FF3D3CF
7 changed files with 83 additions and 31 deletions

View file

@ -10,7 +10,7 @@ class GuiProgressSpinner(ui.spinner):
type: str = "dots",
size: str = "lg",
color: str | None = "red",
thickness: float = 5
thickness: float = 5,
) -> None:
super().__init__(type, size=size, color=color, thickness=thickness)
with self, ui.spinner():
@ -24,21 +24,26 @@ class GuiProgressSpinner(ui.spinner):
@contextmanager
def frame(navigation_title: str, enable_right_drawer: bool = False):
def frame(
navigation_title: str,
):
"""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.grid(columns=3).classes("w-full gap-0"):
with ui.row(wrap=False).classes("col-span-1 justify-start"):
menu()
ui.label(text="uBlue-OS Forge").classes("text-h5")
with ui.row(wrap=False).classes("col-span-1 justify-center"):
ui.label(text=navigation_title).classes("text-h5")
with ui.row(wrap=False).classes("col-span-1 justify-end"):
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" />'
'<link href="https://unpkg.com/eva-icons@1.1.3/style/eva-icons.css" rel="stylesheet"/>'
)