Skip to content

Commit 3b8f1d1

Browse files
feat(frontend): improve main video quality (windmill-labs#98)
* feat(frontend): improve main video quality * feat(frontend): add jobs + remove main video taba
1 parent 51d44f0 commit 3b8f1d1

File tree

3 files changed

+52
-18
lines changed

3 files changed

+52
-18
lines changed

src/landing/HeroExample.tsx

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState } from 'react';
22
import LandingSection from './LandingSection';
3-
import { Code, LayoutDashboard, List } from 'lucide-react';
3+
import { Code, LayoutDashboard, List, PlayCircle } from 'lucide-react';
44
import { useTabs } from './tabs/useTabs';
55
import { Framer } from './tabs/framer';
66

@@ -32,6 +32,7 @@ export default function HeroExample() {
3232
});
3333
const framer = useTabs(hookProps);
3434

35+
/*
3536
useEffect(() => {
3637
const video = document.getElementById('main-video') as HTMLVideoElement;
3738
@@ -65,29 +66,55 @@ export default function HeroExample() {
6566
};
6667
}, []);
6768
69+
<Framer.Tabs {...framer.tabProps} color="slate" />
70+
71+
72+
*/
73+
74+
const [played, setPlayed] = useState(false);
75+
76+
// When played toggles to true, start the video
77+
useEffect(() => {
78+
const video = document.getElementById('main-video') as HTMLVideoElement;
79+
if (played) {
80+
video.play();
81+
}
82+
}, [played]);
83+
6884
return (
6985
<LandingSection bgClass="bg-white">
7086
<div className="w-full gap-8 flex flex-col">
7187
<h1 className="tracking-tight leading-tight text-left font-bold text-transparent bg-clip-text bg-gradient-to-br from-slate-500 to-slate-800">
7288
Give your scripts Superpowers
7389
</h1>
7490
<p className="text-gray-600 max-w-5xl">
75-
Make your scripts production grade and build all of your internal tools
76-
with Python, Typescript, Go, Bash, Sql. Compose your scripts as workflows
77-
using low-code. <br />Share an autogenerated UI or build one using low-code. Run
78-
it reliably at scale on your infra or ours, with permissioning and monitoring included.
79-
Fully open-source and easy to deploy on small and large infra. Any dependency with zero-config.
91+
Make your scripts production grade and build all of your internal tools with Python,
92+
Typescript, Go, Bash, Sql. Compose your scripts as workflows using low-code. <br />
93+
Share an autogenerated UI or build one using low-code. Run it reliably at scale on your
94+
infra or ours, with permissioning and monitoring included. Fully open-source and easy to
95+
deploy on small and large infra. Any dependency with zero-config.
8096
</p>
81-
<Framer.Tabs {...framer.tabProps} color="slate" />
8297

83-
<video
84-
className="border-2 rounded-xl object-cover w-full h-full"
85-
autoPlay
86-
loop
87-
controls
88-
id="main-video"
89-
src="/videos/main.mp4"
90-
/>
98+
<div className="relative">
99+
{!played && (
100+
<div className="absolute top-0 bottom-0 left-0 right-0 bg-black opacity-75 rounded-xl z-50 flex justify-center items-center flex-col gap-2">
101+
<PlayCircle
102+
size={80}
103+
onClick={() => setPlayed(true)}
104+
className="text-white hover:text-blue-400 cursor-pointer transition-all"
105+
/>
106+
<span className="text-white font-bold text-2xl">Windmill in 58 secs</span>
107+
</div>
108+
)}
109+
110+
<video
111+
className="border-2 rounded-xl object-cover w-full h-full"
112+
loop
113+
controls={played}
114+
id="main-video"
115+
src="/videos/main.mp4"
116+
/>
117+
</div>
91118
</div>
92119
</LandingSection>
93120
);

src/landing/LandingHeader.jsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ const resources = [
1010
href: '/about'
1111
},
1212

13-
{ name: 'Blog', description: 'Stay up to date with our latest news and articles.', href: '/blog' }
13+
{
14+
name: 'Blog',
15+
description: 'Stay up to date with our latest news and articles.',
16+
href: '/blog'
17+
},
18+
{
19+
name: 'Jobs',
20+
description: 'See our current job openings and apply for a position.',
21+
href: 'https://www.ycombinator.com/companies/windmill/jobs'
22+
}
1423
];
1524

1625
function classNames(...classes) {
@@ -203,8 +212,6 @@ export default function Example() {
203212
Windmill Cloud
204213
</a>
205214
</div>
206-
207-
208215
</div>
209216
</div>
210217
</Popover.Panel>

static/videos/main.mp4

2.48 MB
Binary file not shown.

0 commit comments

Comments
 (0)