Skip to content

Commit 1d3037b

Browse files
58 - Thank you
1 parent 076af31 commit 1d3037b

File tree

3 files changed

+172
-5
lines changed

3 files changed

+172
-5
lines changed

Diff for: full_stack_python/full_stack_python.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,17 @@ def index() -> rx.Component:
3030

3131

3232

33+
app = rx.App(
34+
theme=rx.theme(
35+
appearance="dark",
36+
has_background=True,
37+
panel_background="solid",
38+
scaling="90%",
39+
radius="medium",
40+
accent_color="sky"
41+
)
3342

34-
app = rx.App()
43+
)
3544
app.add_page(index,
3645
on_load=ArticlePublicState.load_posts
3746
)

Diff for: full_stack_python/pages/landing.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
from .. import navigation
44
from ..articles.list import article_public_list_component
55

6+
67
def landing_component() -> rx.Component:
78
return rx.vstack(
9+
# rx.theme_panel(default_open=True),
810
rx.heading("Welcome to SaaS", size="9"),
911
rx.link(
10-
rx.button("About us"),
12+
rx.button("About us", color_scheme='gray'),
1113
href=navigation.routes.ABOUT_US_ROUTE
1214
),
1315
rx.divider(),

Diff for: full_stack_python/pages/pricing.py

+159-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,168 @@
22

33
from ..ui.base import base_page
44

5+
def feature_item(feature: str) -> rx.Component:
6+
return rx.hstack(
7+
rx.icon(
8+
"check", color=rx.color("blue", 9), size=21
9+
),
10+
rx.text(feature, size="4", weight="regular"),
11+
)
12+
13+
14+
def standard_features() -> rx.Component:
15+
return rx.vstack(
16+
feature_item("40 credits for image generation"),
17+
feature_item("Credits never expire"),
18+
feature_item("High quality images"),
19+
feature_item("Commercial license"),
20+
spacing="3",
21+
width="100%",
22+
align_items="start",
23+
)
24+
25+
26+
def popular_features() -> rx.Component:
27+
return rx.vstack(
28+
feature_item("250 credits for image generation"),
29+
feature_item("+30% Extra free credits"),
30+
feature_item("Credits never expire"),
31+
feature_item("High quality images"),
32+
feature_item("Commercial license"),
33+
spacing="3",
34+
width="100%",
35+
align_items="start",
36+
)
37+
38+
39+
def pricing_card_standard() -> rx.Component:
40+
return rx.vstack(
41+
rx.hstack(
42+
rx.hstack(
43+
rx.text(
44+
"$14.99",
45+
trim="both",
46+
as_="s",
47+
size="3",
48+
weight="regular",
49+
opacity=0.8,
50+
),
51+
rx.text(
52+
"$3.99",
53+
trim="both",
54+
size="6",
55+
weight="regular",
56+
),
57+
width="100%",
58+
spacing="2",
59+
align_items="end",
60+
),
61+
height="35px",
62+
align_items="center",
63+
justify="between",
64+
width="100%",
65+
),
66+
rx.text(
67+
"40 Image Credits",
68+
weight="bold",
69+
size="7",
70+
width="100%",
71+
text_align="left",
72+
),
73+
standard_features(),
74+
rx.spacer(),
75+
rx.button(
76+
"Purchase",
77+
size="3",
78+
variant="outline",
79+
width="100%",
80+
color_scheme="blue",
81+
),
82+
spacing="6",
83+
border=f"1.5px solid {rx.color('gray', 5)}",
84+
background=rx.color("gray", 1),
85+
padding="28px",
86+
width="100%",
87+
max_width="400px",
88+
min_height="475px",
89+
border_radius="0.5rem",
90+
)
91+
92+
93+
def pricing_card_popular() -> rx.Component:
94+
return rx.vstack(
95+
rx.hstack(
96+
rx.hstack(
97+
rx.text(
98+
"$69.99",
99+
trim="both",
100+
as_="s",
101+
size="3",
102+
weight="regular",
103+
opacity=0.8,
104+
),
105+
rx.text(
106+
"$18.99",
107+
trim="both",
108+
size="6",
109+
weight="regular",
110+
),
111+
width="100%",
112+
spacing="2",
113+
align_items="end",
114+
),
115+
rx.badge(
116+
"POPULAR",
117+
size="2",
118+
radius="full",
119+
variant="soft",
120+
color_scheme="blue",
121+
),
122+
align_items="center",
123+
justify="between",
124+
height="35px",
125+
width="100%",
126+
),
127+
rx.text(
128+
"250 Image Credits",
129+
weight="bold",
130+
size="7",
131+
width="100%",
132+
text_align="left",
133+
),
134+
popular_features(),
135+
rx.spacer(),
136+
rx.button(
137+
"Purchase",
138+
size="3",
139+
width="100%",
140+
color_scheme="blue",
141+
),
142+
spacing="6",
143+
border=f"1.5px solid {rx.color('blue', 6)}",
144+
background=rx.color("blue", 1),
145+
padding="28px",
146+
width="100%",
147+
max_width="400px",
148+
min_height="475px",
149+
border_radius="0.5rem",
150+
)
151+
152+
153+
def pricing_cards() -> rx.Component:
154+
return rx.flex(
155+
pricing_card_standard(),
156+
pricing_card_popular(),
157+
spacing="4",
158+
flex_direction=["column", "column", "row"],
159+
width="100%",
160+
align_items="center",
161+
)
162+
5163
def pricing_page() -> rx.Component:
6164
my_child = rx.vstack(
7165
rx.heading("Pricing", size="9"),
8-
rx.text(
9-
"Our Pricing",
10-
),
166+
pricing_cards(),
11167
spacing="5",
12168
justify="center",
13169
align="center",

0 commit comments

Comments
 (0)