Add edit page, dialog based item page. Consider switching to popups.
This commit is contained in:
@ -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",
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user