Add edit page, dialog based item page. Consider switching to popups.

This commit is contained in:
Cole Deck
2024-12-20 21:40:24 +00:00
parent 2a8de79adb
commit 27169ff8a0
16 changed files with 686 additions and 137 deletions

View File

@ -16,7 +16,6 @@ class Footer(rio.Component):
def build(self) -> rio.Component:
return rio.Card(
content=rio.Column(
rio.Icon("rio/logo:fill", width=5, height=5),
rio.Text("Buzzwordz Inc."),
rio.Text(
"Hyper Dyper Website",

View File

@ -60,7 +60,7 @@ class Navbar(rio.Component):
# you've passed the app during creation. Since multiple pages can be
# active at a time (e.g. /foo/bar/baz), this is a list.
active_page = self.session.active_page_instances[0]
active_page_url_segment = active_page.page_url
active_page_url_segment = active_page.url_segment
# The navbar should appear above all other components. This is easily
# done by using a `rio.Overlay` component.
@ -80,7 +80,7 @@ class Navbar(rio.Component):
style=(
"major"
if active_page_url_segment == ""
else "plain"
else "plain-text"
),
),
"/",
@ -121,23 +121,35 @@ class Navbar(rio.Component):
style=(
"major"
if active_page_url_segment == "add"
else "plain"
else "plain-text"
),
),
"/add",
),
rio.Link(
rio.Button(
"Locations",
icon="material/news",
style=(
"major"
if active_page_url_segment == "addlocation"
else "plain-text"
),
),
"/addlocation",
),
# Same game, different button
rio.Link(
rio.Button(
"About",
"Settings",
icon="material/info",
style=(
"major"
if active_page_url_segment == "about-page"
else "plain"
if active_page_url_segment == "settings-page"
else "plain-text"
),
),
"/about-page",
"/settings-page",
),
spacing=1,
margin=1,