Skip to content

Commit 7f8a7c5

Browse files
committed
use reflex ui lemcal component
1 parent 3da7a69 commit 7f8a7c5

File tree

11 files changed

+514
-404
lines changed

11 files changed

+514
-404
lines changed

pcweb/components/docpage/navbar/navbar.py

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import reflex as rx
44

5-
from reflex_ui.blocks.lemcal import lemcal_calendar
65
from pcweb.components.button import button
76
from pcweb.components.docpage.navbar.navmenu.navmenu import nav_menu
87
from pcweb.components.hosting_banner import hosting_banner
@@ -14,7 +13,7 @@
1413
from pcweb.pages.framework.framework import framework
1514
from pcweb.pages.hosting.hosting import hosting_landing
1615
from pcweb.pages.use_cases.use_cases import use_cases_page
17-
16+
from reflex_ui.blocks.lemcal import lemcal_dialog
1817
from ...link_button import resources_button
1918
from ..sidebar import SidebarState
2019
from .buttons.discord import discord
@@ -23,18 +22,6 @@
2322
from .search import search_bar
2423

2524

26-
class LemcalModalState(rx.State):
27-
is_open: bool = False
28-
29-
@rx.event
30-
def open(self):
31-
self.is_open = True
32-
33-
@rx.event
34-
def close(self):
35-
self.is_open = False
36-
37-
3825
def resource_item(text: str, url: str, icon: str, index):
3926
return rx.el.li(
4027
rx.link(
@@ -546,10 +533,11 @@ def new_component_section() -> rx.Component:
546533
class_name="desktop-only",
547534
),
548535
nav_menu.item(
549-
button(
550-
"Book a Demo",
551-
class_name="!h-8 !font-small-smbold !rounded-[0.625rem] whitespace-nowrap",
552-
on_click=LemcalModalState.open,
536+
lemcal_dialog(
537+
button(
538+
"Book a Demo",
539+
class_name="!h-8 !font-small-smbold !rounded-[0.625rem] whitespace-nowrap",
540+
),
553541
),
554542
class_name="xl:flex hidden",
555543
),
@@ -563,11 +551,6 @@ def new_component_section() -> rx.Component:
563551
)
564552

565553

566-
@rx.memo
567-
def lemcal_booking_calendar():
568-
return lemcal_calendar()
569-
570-
571554
@rx.memo
572555
def navbar() -> rx.Component:
573556
return rx.box(
@@ -576,16 +559,5 @@ def navbar() -> rx.Component:
576559
new_component_section(),
577560
class_name="flex flex-row items-center gap-12 bg-slate-1 shadow-[inset_0_-1px_0_0_var(--c-slate-3)] px-4 lg:px-6 w-screen h-[48px] lg:h-[65px]",
578561
),
579-
rx.cond(
580-
LemcalModalState.is_open,
581-
rx.box(
582-
rx.el.div(
583-
lemcal_booking_calendar(),
584-
class_name="fixed inset-0 bg-black/40 backdrop-blur-sm z-[9999]",
585-
on_click=LemcalModalState.close,
586-
),
587-
),
588-
rx.fragment(),
589-
),
590562
class_name="flex flex-col w-full top-0 z-[9999] fixed text-slate-12",
591563
)

pcweb/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
SPLINE_URL = "https://github.com/splinetool/react-spline"
4444
ENTERPRISE_DOCS_URL = "https://enterprise.reflex.dev"
4545
DATABRICKS_NOTION_URL = "https://reflex-dev.notion.site/reflex-x-databricks"
46-
DEMO_VIDEO_URL = "https://www.youtube.com/watch?v=s-kr8v7827g"
46+
DEMO_VIDEO_URL = "https://www.youtube.com/watch?v=lO-N_IRaWhQ"
4747

4848
# Install urls.
4949
BUN_URL = "https://bun.sh"

pcweb/pages/demo/book_demo.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
import reflex as rx
22
from pcweb.pages.framework.index_colors import index_colors
33
from pcweb.pages.framework.views.footer_index import footer_index
4-
from pcweb.meta.meta import hosting_meta_tags
4+
from pcweb.meta.meta import meta_tags
55
from pcweb.pages.demo.header import header
6+
from pcweb.templates.mainpage import mainpage
7+
from pcweb.components.icons.patterns import default_patterns
68

7-
@rx.page(route="/demo", title="Reflex · Book Demo", meta=hosting_meta_tags)
9+
10+
@mainpage(path="/demo", title="Reflex · Book Demo", meta=meta_tags)
811
def book_demo() -> rx.Component:
912
"""Get the Book Demo landing page."""
10-
from pcweb.components.docpage.navbar import navbar
1113

12-
return rx.box(
13-
index_colors(),
14-
navbar(),
15-
rx.el.main(
16-
rx.box(
17-
header(),
18-
class_name="flex flex-col relative justify-center items-center w-full",
19-
),
20-
class_name="flex flex-col w-full relative h-full justify-center items-center",
14+
return rx.el.main(
15+
rx.el.section(
16+
*default_patterns(),
17+
header(),
18+
class_name="overflow-hidden w-full relative mx-auto flex flex-col justify-center items-center max-w-[64.19rem]",
2119
),
22-
footer_index(),
2320
class_name="flex flex-col w-full max-w-[94.5rem] justify-center items-center mx-auto px-4 lg:px-5 relative overflow-hidden",
2421
)

pcweb/pages/demo/header.py

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import reflex as rx
2-
3-
from reflex_ui.blocks.demo_form import demo_form
2+
import reflex_ui as ui
3+
from reflex_ui.blocks.lemcal import lemcal_dialog
44
from pcweb.components.hosting_banner import HostingBannerState
55
from pcweb.pages.framework.views.companies import pricing_page_companies
66

@@ -9,37 +9,43 @@ def custom_quote_form() -> rx.Component:
99
"""Custom quote form component with clean, maintainable structure."""
1010
return rx.box(
1111
rx.box(
12-
# Left column - Content
13-
rx.box(
14-
rx.el.h2(
15-
"Book a Demo",
16-
class_name="text-slate-12 text-4xl font-bold mb-8",
17-
),
18-
rx.el.p(
19-
"Enterprise-ready solutions designed for scale, compliance, and support. Contact us for a tailored quote based on your infrastructure and team size.",
20-
class_name="text-slate-11 text-md leading-relaxed mb-12 max-w-lg",
21-
),
22-
rx.box(
23-
pricing_page_companies(),
24-
class_name="flex flex-col",
12+
rx.el.h2(
13+
"Book a Demo",
14+
class_name="text-slate-12 text-4xl font-bold",
15+
),
16+
rx.el.p(
17+
"Enterprise-ready solutions designed for scale, compliance, and support. Contact us for a tailored quote based on your infrastructure and team size.",
18+
class_name="text-slate-11 text-md leading-relaxed font-medium text-center max-w-xl mx-auto",
19+
),
20+
lemcal_dialog(
21+
rx.el.div(
22+
ui.button(
23+
"Contact Sales",
24+
class_name="font-semibold",
25+
size="lg",
26+
),
27+
class_name="p-3 border border-slate-3 rounded-[1.375rem] border-solid mt-2",
2528
),
26-
class_name="mb-8 lg:mb-0 text-center sm:text-left",
2729
),
28-
# Right column - Form
29-
demo_form(
30-
class_name="relative bg-slate-1 p-6 sm:p-8 rounded-2xl border-2 border-violet-9 shadow-lg w-full max-w-md mx-auto lg:max-w-none lg:mx-0"
30+
rx.box(
31+
rx.el.span(
32+
"Trusted by",
33+
class_name="text-slate-10 text-sm leading-relaxed font-medium text-center max-w-lg mx-auto mt-2",
34+
),
35+
pricing_page_companies(),
36+
class_name="flex flex-col items-center justify-center gap-4",
3137
),
32-
class_name="grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-16 max-w-7xl mx-auto items-start",
38+
class_name="flex flex-col items-center justify-center gap-6",
3339
),
3440
id="demo-form",
35-
class_name="py-12 sm:py-20 px-4 sm:px-8 scroll-m-20",
41+
class_name="pb-12 sm:pb-20 px-4 sm:px-8 scroll-m-20 text-center",
3642
)
3743

3844

3945
def header() -> rx.Component:
4046
return rx.box(
4147
custom_quote_form(),
42-
class_name="flex flex-col gap-2 justify-center items-center max-w-[64.19rem] 2xl:border-x border-slate-4 w-full -mb-10 pb-16 "
48+
class_name="flex flex-col gap-2 justify-center items-center max-w-[64.19rem] xl:border-x border-slate-4 w-full -mb-10 pb-16 "
4349
+ rx.cond(
4450
HostingBannerState.show_banner,
4551
"pt-[8rem] lg:pt-[11rem]",

0 commit comments

Comments
 (0)