Skip to content

Commit 61d2ece

Browse files
Demo-gate + Navbar improvements (#3026)
* Demo-only page and testing for UX * Demo-gating the product / mobile navbar + menu * Removed "home" routing from dropdowns for create new project * WIP - simpler changes * Last bit of cleanup * Last bit * Last cleanup * Pricing page adjustments * Remove magic links * Try pinning nextjs version --------- Co-authored-by: Satya Patel <[email protected]>
1 parent f3b30a4 commit 61d2ece

File tree

36 files changed

+1462
-759
lines changed

36 files changed

+1462
-759
lines changed

apps/web/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"lucide-react": "^0.486.0",
8282
"mobx-react-lite": "^4.1.0",
8383
"motion": "^12.23.19",
84-
"next": ">=15.5.3",
84+
"next": "15.5.4",
8585
"next-intl": "^4.0.2",
8686
"next-themes": "^0.4.6",
8787
"octokit": "^5.0.3",
84.8 KB
Loading

apps/web/client/public/onlook-preload-script.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/web/client/src/app/_components/hero/builder-features-hero.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@ import { motion } from 'motion/react';
55

66
import { Button } from '@onlook/ui/button';
77

8-
import { Routes } from '@/utils/constants';
8+
import { ExternalRoutes, Routes } from '@/utils/constants';
99
import { useGitHubStats } from '../top-bar/github';
1010
import { UnicornBackground } from './unicorn-background';
1111

1212
export function BuilderFeaturesHero() {
1313
const router = useRouter();
1414
const { formatted: starCount } = useGitHubStats();
1515

16-
const handleStartBuilding = () => {
17-
router.push(Routes.HOME);
18-
};
19-
2016
return (
2117
<div className="relative flex h-full w-full flex-col items-center justify-center gap-12 p-8 text-center text-lg">
2218
<UnicornBackground />
@@ -58,12 +54,14 @@ export function BuilderFeaturesHero() {
5854
style={{ willChange: 'opacity, filter', transform: 'translateZ(0)' }}
5955
>
6056
<Button
57+
asChild
6158
variant="secondary"
6259
size="lg"
6360
className="hover:bg-foreground-primary hover:text-background-primary cursor-pointer p-6 transition-all duration-300"
64-
onClick={handleStartBuilding}
6561
>
66-
Start Building React Apps
62+
<a href={ExternalRoutes.BOOK_DEMO} target="_blank" rel="noopener noreferrer">
63+
Book a Demo
64+
</a>
6765
</Button>
6866
</motion.div>
6967
<motion.div

apps/web/client/src/app/_components/hero/features-hero.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@ import { motion } from 'motion/react';
55

66
import { Button } from '@onlook/ui/button';
77

8-
import { Routes } from '@/utils/constants';
8+
import { ExternalRoutes, Routes } from '@/utils/constants';
99
import { useGitHubStats } from '../top-bar/github';
1010
import { UnicornBackground } from './unicorn-background';
1111

1212
export function FeaturesHero() {
1313
const router = useRouter();
1414
const { formatted: starCount } = useGitHubStats();
1515

16-
const handleStartBuilding = () => {
17-
router.push(Routes.HOME);
18-
};
19-
2016
return (
2117
<div className="relative flex h-full w-full flex-col items-center justify-center gap-12 p-8 text-center text-lg">
2218
<UnicornBackground />
@@ -57,12 +53,14 @@ export function FeaturesHero() {
5753
style={{ willChange: 'opacity, filter', transform: 'translateZ(0)' }}
5854
>
5955
<Button
56+
asChild
6057
variant="secondary"
6158
size="lg"
6259
className="hover:bg-foreground-primary hover:text-background-primary cursor-pointer p-6 transition-all duration-300"
63-
onClick={handleStartBuilding}
6460
>
65-
START BUILDING
61+
<a href={ExternalRoutes.BOOK_DEMO} target="_blank" rel="noopener noreferrer">
62+
Book a Demo
63+
</a>
6664
</Button>
6765
</motion.div>
6866
<motion.div

apps/web/client/src/app/_components/hero/index.tsx

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,18 @@
33
import { useEffect, useState } from 'react';
44
import { motion } from 'motion/react';
55

6+
import { Button } from '@onlook/ui/button';
67
import { Icons } from '@onlook/ui/icons';
78

8-
import { api } from '@/trpc/react';
9+
import { ExternalRoutes } from '@/utils/constants';
910
import { vujahdayScript } from '../../fonts';
10-
import { Create } from './create';
1111
import { CreateError } from './create-error';
1212
import { HighDemand } from './high-demand';
13-
import { Import } from './import';
1413
import { MobileEmailCapture } from './mobile-email-capture';
15-
import { StartBlank } from './start-blank';
1614
import { UnicornBackground } from './unicorn-background';
1715

1816
export function Hero() {
19-
const [cardKey, setCardKey] = useState(0);
2017
const [isShortScreen, setIsShortScreen] = useState(false);
21-
const [isCreatingProject, setIsCreatingProject] = useState(false);
22-
const { data: user } = api.user.get.useQuery();
2318

2419
useEffect(() => {
2520
const checkScreenHeight = () => {
@@ -86,31 +81,25 @@ export function Hero() {
8681
<HighDemand />
8782
<CreateError />
8883
</div>
89-
<div className="relative z-20 hidden flex-col items-center gap-4 sm:flex">
84+
<div className="relative z-20 hidden flex-row items-center gap-4 sm:flex">
9085
<motion.div
91-
initial={{ opacity: 0 }}
92-
animate={{ opacity: 1 }}
93-
transition={{ duration: 0.6, delay: 0.3, ease: 'easeOut' }}
94-
onAnimationComplete={() => {
95-
setCardKey((prev) => prev + 1);
96-
}}
86+
initial={{ opacity: 0, y: 10 }}
87+
animate={{ opacity: 1, y: 0 }}
88+
transition={{ duration: 0.6, delay: 0.4, ease: 'easeOut' }}
9789
>
98-
<Create
99-
user={user ?? null}
100-
cardKey={cardKey}
101-
isCreatingProject={isCreatingProject}
102-
setIsCreatingProject={setIsCreatingProject}
103-
/>
104-
</motion.div>
105-
<motion.div
106-
className="mt-0 flex gap-12"
107-
initial={{ opacity: 0, filter: 'blur(4px)' }}
108-
animate={{ opacity: 1, filter: 'blur(0px)' }}
109-
transition={{ duration: 0.6, delay: 0.6, ease: 'easeOut' }}
110-
style={{ willChange: 'opacity, filter', transform: 'translateZ(0)' }}
111-
>
112-
<StartBlank />
113-
<Import />
90+
<Button
91+
asChild
92+
className="bg-foreground-primary text-background-primary hover:bg-foreground-hover"
93+
>
94+
<a
95+
href={ExternalRoutes.BOOK_DEMO}
96+
target="_blank"
97+
rel="noopener noreferrer"
98+
>
99+
Book a Demo
100+
<Icons.ArrowRight className="h-4 w-4" />
101+
</a>
102+
</Button>
114103
</motion.div>
115104
</div>
116105
<MobileEmailCapture />

apps/web/client/src/app/_components/landing-page/contributor-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export function ContributorSection({
181181
Supported by you &<br />
182182
{isLoading ? '...' : starCount} other builders
183183
</h2>
184-
<p className="text-foreground-secondary text-regular text-center mb-8 max-w-xl">Join the community building <br /> the open source prompt-to-build app</p>
184+
<p className="text-foreground-secondary text-regular text-center mb-8 max-w-xl">Join the community building <br /> the open source Cursor for Designers</p>
185185
<div className="flex gap-4 flex-col md:flex-row w-full justify-center items-center">
186186
<Link
187187
href={githubLink}

apps/web/client/src/app/_components/landing-page/cta-section.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface CTASectionProps {
1212
showSubtext?: boolean;
1313
}
1414

15-
export function CTASection({ href, onClick, ctaText = "Craft a website\nfor free today", buttonText = "Get Started", showSubtext = true }: CTASectionProps = {}) {
15+
export function CTASection({ href, onClick, ctaText = "Bring your team \nto Onlook today", buttonText = "Book a Demo", showSubtext = true }: CTASectionProps = {}) {
1616
const router = useRouter();
1717

1818
const handleGetStartedClick = () => {
@@ -63,11 +63,6 @@ export function CTASection({ href, onClick, ctaText = "Craft a website\nfor free
6363
>
6464
{buttonText}
6565
</Button>
66-
{showSubtext && (
67-
<span className="text-foreground-tertiary text-regular text-left ml-0 ">
68-
No credit card required.<br /> Cancel anytime.
69-
</span>
70-
)}
7166
</div>
7267
</div>
7368
</div>

apps/web/client/src/app/_components/landing-page/faq-dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useState } from 'react';
33

44
interface FAQ {
55
question: string;
6-
answer: string;
6+
answer: string | React.ReactNode;
77
}
88

99
interface FAQDropdownProps {

apps/web/client/src/app/_components/landing-page/faq-section.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { FAQDropdown } from './faq-dropdown';
66

77
interface FAQ {
88
question: string;
9-
answer: string;
9+
answer: string | React.ReactNode;
1010
}
1111

1212
interface FAQSectionProps {
@@ -18,25 +18,29 @@ interface FAQSectionProps {
1818
}
1919

2020
const defaultFaqs = [
21+
{
22+
question: 'Is there a free version of Onlook?',
23+
answer: 'Yes, Onlook can be self-hosted for free on GitHub. For the hosted cloud version, please contact our team or book a demo. We are working closely with teams to set up the best internal design and code workflow, and are happy to help you get started.',
24+
},
2125
{
2226
question: 'What kinds of things can I design with Onlook?',
2327
answer: 'You can prototype, ideate, and create websites from scratch with Onlook',
2428
},
2529
{
2630
question: 'Why would I use Onlook?',
27-
answer: 'When you design in Onlook you design in the real product – in other words, the source of truth. Other products are great for ideating, but Onlook is the only one that lets you design with the existing product and the only one that translates your designs to code instantly.',
31+
answer: 'When you design in Onlook you design in the real product – in other words, the source of truth. Other editors are great for ideating, but Onlook is the only one that lets you design with code using your existing design system instantly.',
2832
},
2933
{
3034
question: 'Who owns the code that I write with Onlook?',
31-
answer: "The code you make with Onlook is all yours. Your code is written locally directly to your files, and isn't hosted off your device.",
35+
answer: "The code you make with Onlook is all yours. You can export it on your local machine, publish it to GitHub, or host it at a link",
3236
},
3337
{
3438
question: 'What is the difference between Onlook and other design tools?',
35-
answer: 'Onlook is a visual editor for code. It allows you to create and style your own creations with code as the source of truth. While it is best suited for creating websites, it can be used for anything visual – presentations, mockups, and more. Because Onlook uses code as the source of truth, the types of designs you can create are unconstrained by Onlook interface.',
39+
answer: 'Onlook is a visual editor for code. It allows you to create and style your own creations with code as the source of truth. While it is best suited for creating web experiences, it can be used for anything visual – presentations, mockups, and more. Because Onlook uses code as the source of truth, the types of designs you can create are unconstrained by Onlook\'s interface.',
3640
},
3741
{
3842
question: 'Why is Onlook open-source?',
39-
answer: 'Developers have historically been second-rate citizens in the design process. Onlook was founded to bridge the divide between design and development, and we wanted to make developers first-class citizens alongside designers. We chose to be open-source to give developers transparency into how we are building Onlook and how the work created through Onlook will complement the work of developers.',
43+
answer: 'Developers have historically been second-rate citizens in the design process. Onlook was founded to bridge the divide between design and development, and we wanted to make developers first-class citizens alongside designers. We chose to be open-source Onlook to give developers transparency over the tool, and make it as flexible as possible for the unique ways teams set up their code.',
4044
},
4145
];
4246

0 commit comments

Comments
 (0)