|
@@ -1,41 +1,55 @@
|
|
|
"""Styles for the app."""
|
|
|
import reflex as rx
|
|
|
|
|
|
-border_radius = ("0.375rem",)
|
|
|
-box_shadow = ("0px 0px 0px 1px rgba(84, 82, 95, 0.14)",)
|
|
|
+from .state import State
|
|
|
+
|
|
|
+border_radius = "0.375rem"
|
|
|
+box_shadow = "0px 0px 0px 1px rgba(84, 82, 95, 0.14)"
|
|
|
border = "1px solid #F4F3F6"
|
|
|
text_color = "black"
|
|
|
accent_text_color = "#1A1060"
|
|
|
accent_color = "#F5EFFE"
|
|
|
+hover_accent_color = {"_hover": {"color": accent_color}}
|
|
|
+hover_accent_bg = {"_hover": {"bg": accent_color}}
|
|
|
+content_width_vw = "90vw"
|
|
|
+sidebar_width = "20em"
|
|
|
|
|
|
template_page_style = {
|
|
|
- "height": "100vh",
|
|
|
- "width": "100%",
|
|
|
"padding_top": "5em",
|
|
|
"padding_x": "2em",
|
|
|
}
|
|
|
|
|
|
template_content_style = {
|
|
|
- "width": "100%",
|
|
|
+ "width": rx.cond(
|
|
|
+ State.sidebar_displayed,
|
|
|
+ f"calc({content_width_vw} - {sidebar_width})",
|
|
|
+ content_width_vw,
|
|
|
+ ),
|
|
|
+ "min-width": sidebar_width,
|
|
|
"align_items": "flex-start",
|
|
|
- "height": "90%",
|
|
|
- "box_shadow": "0px 0px 0px 1px rgba(84, 82, 95, 0.14)",
|
|
|
+ "box_shadow": box_shadow,
|
|
|
"border_radius": border_radius,
|
|
|
"padding": "1em",
|
|
|
+ "margin_bottom": "2em",
|
|
|
}
|
|
|
|
|
|
link_style = {
|
|
|
"color": text_color,
|
|
|
"text_decoration": "none",
|
|
|
- "_hover": {
|
|
|
- "color": accent_color,
|
|
|
- },
|
|
|
+ **hover_accent_color,
|
|
|
+}
|
|
|
+
|
|
|
+overlapping_button_style = {
|
|
|
+ "background_color": "white",
|
|
|
+ "border": border,
|
|
|
+ "border_radius": border_radius,
|
|
|
}
|
|
|
|
|
|
base_style = {
|
|
|
- rx.MenuItem: {
|
|
|
- "_hover": {
|
|
|
- "bg": accent_color,
|
|
|
- },
|
|
|
+ rx.MenuButton: {
|
|
|
+ "width": "3em",
|
|
|
+ "height": "3em",
|
|
|
+ **overlapping_button_style,
|
|
|
},
|
|
|
+ rx.MenuItem: hover_accent_bg,
|
|
|
}
|