MCPcopy Create free account
hub / github.com/codingforentrepreneurs/full-stack-python / sidebar

Function sidebar

full_stack_python/ui/sidebar.py:143–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141
142
143def sidebar() -> rx.Component:
144 return rx.box(
145 rx.desktop_only(
146 rx.vstack(
147 rx.hstack(
148 rx.image(
149 src="/logo.jpg",
150 width="2.25em",
151 height="auto",
152 border_radius="25%",
153 ),
154 rx.heading(
155 "Reflex", size="7", weight="bold"
156 ),
157 align="center",
158 justify="start",
159 padding_x="0.5rem",
160 width="100%",
161 ),
162 sidebar_items(),
163 rx.spacer(),
164 rx.vstack(
165 rx.vstack(
166 sidebar_dark_mode_toggle_item(),
167 sidebar_logout_item(),
168 spacing="1",
169 width="100%",
170 ),
171 rx.divider(),
172 sidebar_user_item(),
173 width="100%",
174 spacing="5",
175 ),
176 spacing="5",
177 # position="fixed",
178 # left="0px",
179 # top="0px",
180 # z_index="5",
181 padding_x="1em",
182 padding_y="1.5em",
183 bg=rx.color("accent", 3),
184 align="start",
185 height="100vh",
186 # height="650px",
187 width="16em",
188 ),
189 ),
190 rx.mobile_and_tablet(
191 rx.drawer.root(
192 rx.drawer.trigger(
193 rx.icon("align-justify", size=30)
194 ),
195 rx.drawer.overlay(z_index="5"),
196 rx.drawer.portal(
197 rx.drawer.content(
198 rx.vstack(
199 rx.box(
200 rx.drawer.close(

Callers 1

base_dashboard_pageFunction · 0.90

Calls 4

sidebar_itemsFunction · 0.85
sidebar_logout_itemFunction · 0.85
sidebar_user_itemFunction · 0.85

Tested by

no test coverage detected