Skip to content

Commit c56f262

Browse files
authored
preview btn change (#1628)
* preview btn change * .png -> .webp * light + dark preview images
1 parent cc634ff commit c56f262

File tree

4 files changed

+23
-36
lines changed

4 files changed

+23
-36
lines changed
18.1 KB
Loading
25.8 KB
Loading

pcweb/pages/landing/landing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
from pcweb.pages.landing.views.products import products
1111
from pcweb.pages.landing.views.security import security
1212
from pcweb.pages.landing.views.start_building import start_building
13-
from pcweb.pages.landing.views.video_demo import video_demo
1413
from pcweb.templates.mainpage import mainpage
1514

1615

1716
@mainpage(path="/", title="Reflex · Web apps in Pure Python", meta=meta_tags)
1817
def landing() -> rx.Component:
1918
return rx.box(
2019
hero(),
21-
# video_demo(),
2220
products(),
2321
companies(),
2422
ai_section(),

pcweb/pages/landing/views/video_demo.py

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,28 @@
66
from pcweb.constants import DEMO_VIDEO_URL
77

88

9+
def icon_svg() -> rx.Component:
10+
return rx.html(
11+
"""<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 16 16" fill="none">
12+
<rect width="16" height="16" rx="2" fill="#6E56CF"/>
13+
<path d="M10 9V13H12V9H10Z" fill="white"/>
14+
<path d="M4 3V13H6V9H10V7H6V5H10V7H12V3H4Z" fill="white"/>
15+
</svg>""",
16+
class_name="flex justify-center items-center",
17+
)
18+
19+
920
def video_demo() -> rx.Component:
1021
return rx.el.section(
1122
rx.box(
1223
rx.el.span(
13-
"Get one month free",
14-
class_name="rounded-full border border-slate-6 text-slate-11 text-xs px-2 py-0.5 w-fit font-medium -mb-1.5",
15-
),
16-
rx.el.span(
17-
rx.el.span(
18-
"Reflex Build ",
19-
class_name="inline text-slate-12 font-semibold text-2xl",
24+
rx.box(
25+
icon_svg(),
26+
rx.el.span(
27+
"Reflex Build ",
28+
class_name="inline text-slate-12 font-semibold text-2xl",
29+
),
30+
class_name="flex flex-row items-center gap-x-2 justify-center lg:justify-start"
2031
),
2132
rx.el.span(
2233
"The first AI agent to build internal Python enterprise apps.",
@@ -37,15 +48,15 @@ def video_demo() -> rx.Component:
3748
class_name="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-110 z-[2] group-hover:scale-125 transition-transform duration-300 backdrop",
3849
),
3950
rx.image(
40-
"/landing/video/dark/video_placeholder.webp",
51+
"/landing/video/dark/video_demo_dark.webp",
4152
class_name="object-cover size-full dark:block hidden scale-110",
4253
),
4354
rx.image(
44-
"/landing/video/light/video_placeholder.webp",
55+
"/landing/video/light/video_demo_light.webp",
4556
class_name="object-cover size-full dark:hidden block scale-110",
4657
),
4758
rx.el.span(
48-
class_name="inset-0 size-full absolute z-[1] bg-[#0000001f] backdrop-blur-[1.5px] rounded-lg",
59+
class_name="inset-0 size-full absolute z-[1] dark:bg-[#0000001f] backdrop-blur-[0.1px] rounded-lg",
4960
),
5061
class_name="aspect-video rounded-lg overflow-hidden cursor-pointer relative isolate group border border-slate-4",
5162
),
@@ -64,31 +75,9 @@ def video_demo() -> rx.Component:
6475
),
6576
class_name="!max-w-[70rem] !p-0 !bg-transparent overflow-hidden",
6677
),
67-
class_name="h-full overflow-hidden grid grid-cols-1 lg:grid-cols-2 gap-12 relative isolate items-center",
78+
class_name="h-full overflow-hidden grid grid-cols-1 lg:grid-cols-2 gap-12 relative isolate items-center md:px-8 py-4 mt-10 scale-90",
6879
)
6980

7081

7182
def watch_preview() -> rx.Component:
72-
return dialog(
73-
trigger=button(
74-
"Watch Preview",
75-
variant="secondary",
76-
size="xl",
77-
class_name="w-fit flex flex-row-reverse gap-2 mt-10 -mb-10",
78-
icon=rx.icon("chevron-right", size=16),
79-
),
80-
content=rx.box(
81-
rx.image(
82-
"/logo.jpg",
83-
class_name="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-10 h-10 z-[-1] rounded-md",
84-
),
85-
rx.video(
86-
url=DEMO_VIDEO_URL,
87-
playing=True,
88-
controls=False,
89-
class_name="size-full z-[1]",
90-
),
91-
class_name="relative isolate aspect-video bg-slate-1 rounded-2xl overflow-hidden",
92-
),
93-
class_name="!max-w-[70rem] !p-0 !bg-transparent overflow-hidden",
94-
)
83+
return video_demo()

0 commit comments

Comments
 (0)