Skip to content

Commit 60cfa96

Browse files
authored
Docs page update (#1754)
* Docs page update * update margins * update team image
1 parent 6d85c72 commit 60cfa96

File tree

10 files changed

+173
-135
lines changed

10 files changed

+173
-135
lines changed

assets/about/team_3.avif

-28.8 KB
Binary file not shown.

assets/tailwind-theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,7 @@
11451145
--text-6xl: 3.5rem;
11461146
--text-6xl--line-height: 4rem;
11471147
--text-6xl--letter-spacing: -0.1925rem;
1148+
--breakpoint-3xl: 110rem;
11481149

11491150
/* Animation */
11501151
--animate-accordion-down: accordion-down 0.2s ease-out;

pcweb/components/docpage/navbar/buttons/sidebar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def navbar_sidebar_drawer(trigger) -> rx.Component:
107107
rx.cond(
108108
HostingBannerState.is_banner_visible,
109109
"!top-[137px]",
110-
"!top-[74px]",
110+
"!top-[77px]",
111111
),
112112
),
113113
)

pcweb/components/docpage/sidebar/sidebar.py

Lines changed: 75 additions & 61 deletions
Large diffs are not rendered by default.

pcweb/flexdown.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,16 @@ def markdown_with_shiki(*args, **kwargs):
672672
"""
673673
return rx.markdown(
674674
*args,
675-
component_map={"pre": markdown_codeblock},
675+
component_map={
676+
"h1": lambda text: h1_comp_xd(text=text),
677+
"h2": lambda text: h2_comp_xd(text=text),
678+
"h3": lambda text: h3_comp_xd(text=text),
679+
"h4": lambda text: h4_comp_xd(text=text),
680+
"p": lambda text: text_comp(text=text),
681+
"li": lambda text: list_comp(text=text),
682+
"a": doclink2,
683+
"pre": markdown_codeblock,
684+
"img": lambda src: img_comp_xd(src=src),
685+
},
676686
**kwargs,
677687
)

pcweb/pages/landing/views/products.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def product_card(
4545
class_name="size-4 text-secondary-11 group-hover:text-slate-12 group-hover:translate-x-1 transition-all duration-300",
4646
),
4747
to=url,
48-
class_name="flex flex-row items-center gap-2 justify-between group h-[4rem] px-10 hover:bg-slate-2 transition-colors border-t max-lg:border-b border-slate-3",
48+
class_name="flex flex-row items-center gap-2 justify-between group h-[4rem] px-10 hover:bg-slate-2 transition-colors border-t max-lg:border-b border-slate-3 mt-auto shrink-0",
4949
),
5050
class_name="flex flex-col",
5151
)

pcweb/templates/docpage/blocks/headings.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def create(
9191
href = rx.State.router.page.full_path + "#" + id_
9292
scroll_margin = rx.cond(
9393
HostingBannerState.is_banner_visible,
94-
"scroll-m-[8.5rem]",
95-
"scroll-m-[5rem]",
94+
"scroll-mt-[113px]",
95+
"scroll-mt-[77px]",
9696
)
9797

9898
return super().create(
@@ -113,7 +113,7 @@ def create(
113113
href=href,
114114
on_click=lambda: rx.set_clipboard(href),
115115
# as_child=True,
116-
class_name="flex flex-row items-center gap-6 hover:!text-violet-11 text-slate-12 cursor-pointer mb-2 transition-colors group",
116+
class_name="flex flex-row items-center gap-6 hover:!text-violet-11 cursor-pointer mb-6 transition-colors group text-m-slate-12 dark:text-m-slate-3 ",
117117
)
118118

119119

@@ -125,7 +125,7 @@ def h1_comp(text: str) -> rx.Component:
125125
return h_comp_common(
126126
text=text,
127127
heading="h1",
128-
class_name="font-x-large lg:font-xx-large",
128+
class_name="lg:text-5xl text-3xl font-[525]",
129129
)
130130

131131

@@ -134,7 +134,7 @@ def h1_comp_xd(text: str) -> rx.Component:
134134
return h_comp_common(
135135
text=text,
136136
heading="h1",
137-
class_name="font-x-large lg:font-xx-large",
137+
class_name="lg:text-5xl text-3xl font-[525]",
138138
)
139139

140140

@@ -144,7 +144,7 @@ def h2_comp(text: str) -> rx.Component:
144144
text=text,
145145
heading="h2",
146146
mt="8",
147-
class_name="font-large lg:font-x-large",
147+
class_name="lg:text-4xl text-2xl font-[525]",
148148
)
149149

150150

@@ -154,7 +154,7 @@ def h2_comp_xd(text: str) -> rx.Component:
154154
text=text,
155155
heading="h2",
156156
mt="8",
157-
class_name="font-large lg:font-x-large",
157+
class_name="lg:text-3xl text-2xl font-[525]",
158158
)
159159

160160

@@ -164,7 +164,7 @@ def h3_comp(text: str) -> rx.Component:
164164
text=text,
165165
heading="h3",
166166
mt="4",
167-
class_name="font-large",
167+
class_name="lg:text-2xl text-xl font-[525]",
168168
)
169169

170170

@@ -174,7 +174,7 @@ def h3_comp_xd(text: str) -> rx.Component:
174174
text=text,
175175
heading="h3",
176176
mt="4",
177-
class_name="font-large",
177+
class_name="lg:text-2xl text-lg font-[525]",
178178
)
179179

180180

@@ -184,7 +184,7 @@ def h4_comp(text: str) -> rx.Component:
184184
text=text,
185185
heading="h4",
186186
mt="2",
187-
class_name="font-md-smbold",
187+
class_name="lg:text-xl text-lg font-[525]",
188188
)
189189

190190

@@ -194,7 +194,7 @@ def h4_comp_xd(text: str) -> rx.Component:
194194
text=text,
195195
heading="h4",
196196
mt="2",
197-
class_name="font-md-smbold",
197+
class_name="lg:text-xl text-lg font-[525]",
198198
)
199199

200200

pcweb/templates/docpage/blocks/typography.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,24 @@ def definition(title: str, *children) -> rx.Component:
3535

3636
@rx.memo
3737
def text_comp(text: rx.Var[str]) -> rx.Component:
38-
return rx.text(text, class_name="font-normal text-slate-12 mb-4 leading-7")
38+
return rx.text(
39+
text, class_name="font-[475] text-m-slate-8 dark:text-m-slate-6 mb-4 leading-7"
40+
)
3941

4042

4143
@rx.memo
4244
def text_comp_2(text: rx.Var[str]) -> rx.Component:
43-
return rx.text(text, class_name="font-normal text-slate-12 max-w-[80%] mb-10")
45+
return rx.text(
46+
text,
47+
class_name="font-[475] text-m-slate-8 dark:text-m-slate-6 max-w-[80%] mb-10",
48+
)
4449

4550

4651
@rx.memo
4752
def list_comp(text: rx.Var[str]) -> rx.Component:
48-
return rx.list_item(text, class_name="font-normal text-slate-12 mb-4")
53+
return rx.list_item(
54+
text, class_name="font-[475] text-m-slate-8 dark:text-m-slate-6 mb-4"
55+
)
4956

5057

5158
@rx.memo

0 commit comments

Comments
 (0)