add temporary workaround for mobile resolutions
This commit is contained in:
@@ -9,7 +9,34 @@ import rio
|
||||
from .. import components as comps
|
||||
|
||||
|
||||
def build_page(main_component: rio.Component) -> rio.Component:
|
||||
def build_page(main_component: rio.Component, window_width: float) -> rio.Component:
|
||||
# FixMe: Temporary fix for low screen widths. Fixable once Rio offers better mobile-targeted layouting
|
||||
if window_width < 55.625:
|
||||
return rio.Column(
|
||||
rio.Row(
|
||||
comps.Header()
|
||||
),
|
||||
rio.Column(
|
||||
rio.Column(
|
||||
comps.Navigation(),
|
||||
width="natural",
|
||||
align_y=0
|
||||
),
|
||||
rio.Column(
|
||||
main_component,
|
||||
width="grow",
|
||||
align_y=0,
|
||||
margin_left=1
|
||||
),
|
||||
width="grow",
|
||||
height="grow"
|
||||
),
|
||||
spacing=2,
|
||||
margin=0,
|
||||
width="grow",
|
||||
height="grow"
|
||||
)
|
||||
|
||||
return rio.Column(
|
||||
rio.Row(
|
||||
comps.Header()
|
||||
|
||||
Reference in New Issue
Block a user