-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (28 loc) · 752 Bytes
/
main.py
File metadata and controls
32 lines (28 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from nicegui import ui
from components.ui_elements.base.builder import BaseLayout
from pages.home import create as create_home
from pages.about import create as create_about
from pages.settings import create as create_settings
@ui.page('/')
def home_page():
"""Home page route"""
with BaseLayout() as content:
create_home()
@ui.page('/about')
def about_page():
"""About page route"""
with BaseLayout() as content:
create_about()
@ui.page('/settings')
def settings_page():
"""Settings page route"""
with BaseLayout() as content:
create_settings()
# Theme configuration
ui.run(
title='My NiceGUI App',
reload=False,
dark=False,
favicon='https://nicegui.io/favicon.ico',
port=8081
)