Skip to content

Commit 9655422

Browse files
Alek99claude
andauthored
doc page touch ups (#1802)
* doc page touch ups Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix pre-commit: ruff format and unused import cleanup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 069c724 commit 9655422

File tree

5 files changed

+36
-29
lines changed

5 files changed

+36
-29
lines changed

assets/tailwind-theme.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,11 +1691,11 @@
16911691
font-weight: 400;
16921692
line-height: normal;
16931693
letter-spacing: -0.00406rem;
1694-
color: var(--c-violet-9);
1695-
background-color: var(--c-violet-3);
1694+
color: var(--c-slate-11);
1695+
background-color: var(--c-slate-3);
16961696
border-radius: 0.25rem;
16971697
border-width: 1px;
1698-
border-color: var(--c-violet-4);
1698+
border-color: var(--c-slate-4);
16991699
/* padding: 0rem 0.125rem 0rem 0.125rem; */
17001700
}
17011701

pcweb/templates/docpage/blocks/typography.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ def doclink(text: str, href: str, **props) -> rx.Component:
7878
The styled link.
7979
"""
8080
return rx.link(
81-
text, underline="always", href=href, **props, class_name="text-violet-10"
81+
text,
82+
underline="always",
83+
href=href,
84+
**props,
85+
class_name="!text-m-slate-12 dark:!text-m-slate-3 !decoration-m-slate-12 dark:!decoration-m-slate-3",
8286
)
8387

8488

@@ -93,4 +97,10 @@ def doclink2(text: str, **props) -> rx.Component:
9397
Returns:
9498
The styled link.
9599
"""
96-
return rx.link(text, underline="always", **props, style=fonts.base)
100+
return rx.link(
101+
text,
102+
underline="always",
103+
**props,
104+
style=fonts.base,
105+
class_name="!text-m-slate-12 dark:!text-m-slate-3 !decoration-m-slate-12 dark:!decoration-m-slate-3",
106+
)

pcweb/templates/docpage/docpage.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def feedback_button_toc() -> rx.Component:
269269
size="sm",
270270
type="button",
271271
on_click=FeedbackState.set_score(1),
272-
class_name="justify-start text-m-slate-7 dark:text-m-slate-6",
272+
class_name="justify-start pl-0 text-m-slate-7 dark:text-m-slate-6",
273273
),
274274
content=feedback_content(),
275275
)
@@ -290,7 +290,7 @@ def copy_to_markdown(text: str) -> rx.Component:
290290
type="button",
291291
size="sm",
292292
variant="ghost",
293-
class_name="justify-start text-m-slate-7 dark:text-m-slate-6",
293+
class_name="justify-start pl-0 text-m-slate-7 dark:text-m-slate-6",
294294
on_click=[
295295
rx.call_function(copied.set_value(True)),
296296
rx.set_clipboard(text),
@@ -308,7 +308,7 @@ def ask_ai_chat() -> rx.Component:
308308
"Ask AI about this page",
309309
size="sm",
310310
variant="ghost",
311-
class_name="justify-start text-m-slate-7 dark:text-m-slate-6",
311+
class_name="justify-start pl-0 text-m-slate-7 dark:text-m-slate-6",
312312
native_button=False,
313313
),
314314
to=ai_builder_pages.integrations.mcp_overview.path,
@@ -334,7 +334,7 @@ def docpage_footer(path: str):
334334
from pcweb.pages.faq import faq
335335
from pcweb.pages.framework.views.footer_index import dark_mode_toggle
336336
from pcweb.pages.gallery import gallery
337-
from pcweb.views.footer import menu_socials, newsletter_form, ph_1
337+
from pcweb.views.footer import menu_socials
338338

339339
return rx.el.footer(
340340
rx.box(
@@ -359,7 +359,6 @@ def docpage_footer(path: str):
359359
),
360360
class_name="flex flex-row justify-center lg:justify-between items-center border-slate-4 border-y-0 lg:border-y pt-0 lg:pt-8 pb-6 lg:pb-8 w-full",
361361
),
362-
rx.box(newsletter_form(), class_name="pt-8 pb-10"),
363362
rx.box(
364363
rx.box(
365364
footer_link_flex(
@@ -395,21 +394,17 @@ def docpage_footer(path: str):
395394
class_name="flex flex-wrap justify-between gap-12 w-full",
396395
),
397396
rx.box(
398-
rx.box(
399-
ph_1(),
400-
rx.text(
401-
f"Copyright © {datetime.now().year} Pynecone, Inc.",
402-
class_name="font-small text-slate-9",
403-
),
404-
dark_mode_toggle(),
405-
class_name="flex flex-col gap-6",
406-
),
397+
rx.box(dark_mode_toggle(), class_name="[&>div]:!ml-0"),
407398
menu_socials(),
408399
class_name="flex flex-row gap-6 justify-between items-end w-full",
409400
),
401+
rx.text(
402+
f"Copyright © {datetime.now().year} Pynecone, Inc.",
403+
class_name="font-small text-slate-9",
404+
),
410405
class_name="flex flex-col justify-between gap-10 py-6 lg:py-8 w-full",
411406
),
412-
class_name="flex flex-col max-w-full lg:max-w-auto",
407+
class_name="flex flex-col w-full max-w-full lg:max-w-auto",
413408
)
414409

415410

@@ -723,8 +718,13 @@ def wrapper(*args, **kwargs) -> rx.Component:
723718
rx.el.nav(
724719
rx.box(
725720
rx.el.p(
721+
rx.icon(
722+
"align-left",
723+
size=14,
724+
class_name="dark:text-m-slate-3 text-m-slate-12",
725+
),
726726
"On This Page",
727-
class_name="text-sm h-8 flex items-center justify-start font-[525] dark:text-m-slate-3 text-m-slate-12",
727+
class_name="text-sm h-8 flex items-center gap-1.5 justify-start font-[525] dark:text-m-slate-3 text-m-slate-12",
728728
),
729729
rx.el.ul(
730730
*[

pcweb/views/docs_navbar.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pcweb.components.docpage.navbar.search import search_bar
77
from pcweb.components.marketing_button import button
88
from pcweb.constants import REFLEX_ASSETS_CDN
9-
from pcweb.pages.docs import ai_builder, enterprise, getting_started, hosting
9+
from pcweb.pages.docs import ai_builder, getting_started, hosting
1010

1111

1212
def logo() -> rx.Component:
@@ -53,10 +53,9 @@ def menu_item(text: str, href: str, active_str: str = "") -> rx.Component:
5353
# Framework is active when in /docs but not in other specific sections
5454
is_docs = router_path.contains("/docs")
5555
is_ai_builder = router_path.contains("ai-builder")
56-
is_enterprise = router_path.contains("enterprise")
5756
is_hosting = router_path.contains("hosting")
5857
is_start = router_path == "/docs"
59-
active = is_docs & ~is_ai_builder & ~is_enterprise & ~is_hosting & ~is_start
58+
active = is_docs & ~is_ai_builder & ~is_hosting & ~is_start
6059
else:
6160
active = router_path.contains(active_str)
6261

@@ -81,12 +80,11 @@ def menu_item(text: str, href: str, active_str: str = "") -> rx.Component:
8180
def navigation_menu() -> rx.Component:
8281
return ui.navigation_menu.root(
8382
ui.navigation_menu.list(
84-
menu_item("Start", "/docs", "/docs"),
83+
menu_item("Overview", "/docs", "/docs"),
8584
menu_item(
86-
"AI Builder", ai_builder.overview.best_practices.path, "ai-builder"
85+
"Build with AI", ai_builder.overview.best_practices.path, "ai-builder"
8786
),
8887
menu_item("Framework", getting_started.introduction.path, "framework"),
89-
menu_item("Enterprise Package", enterprise.overview.path, "enterprise"),
9088
menu_item("Cloud", hosting.deploy_quick_start.path, "hosting"),
9189
class_name="flex flex-row items-center gap-2 m-0 h-full list-none",
9290
custom_attrs={"role": "menubar"},

pcweb/views/secondary_navbar.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ def menu_item(text: str, href: str, active_str: str = "") -> rx.Component:
2929
# Framework is active when in /docs but not in other specific sections
3030
is_docs = router_path.contains("/docs")
3131
is_ai_builder = router_path.contains("ai-builder")
32-
is_enterprise = router_path.contains("enterprise")
3332
is_hosting = router_path.contains("hosting")
3433
is_start = router_path == "/docs"
35-
active = is_docs & ~is_ai_builder & ~is_enterprise & ~is_hosting & ~is_start
34+
active = is_docs & ~is_ai_builder & ~is_hosting & ~is_start
3635
else:
3736
active = router_path.contains(active_str)
3837

0 commit comments

Comments
 (0)