Skip to content

Commit 43649b6

Browse files
committed
feat: add Remotion hero animation loop and supporting assets to the site
1 parent f7d3cb7 commit 43649b6

17 files changed

Lines changed: 1042 additions & 64 deletions

site/bun.lock

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

site/components/home/Banner.tsx

Lines changed: 61 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,85 @@
11
import logo from "../../pages/public/images/logo.svg";
22
import GitHubButton from "./GitHubButton";
3-
import ParticleNetwork from "./ParticleNetwork";
43

54
interface BannerProps {
65
isMobile?: boolean;
76
}
87

98
function Banner({ isMobile }: BannerProps) {
109
return (
11-
<div className="relative pt-32 pb-20 lg:pt-48 lg:pb-32 overflow-hidden bg-gradient-to-br from-slate-950 via-[#0c1333] to-indigo-950 min-h-[600px] flex items-center">
12-
{/* Particle Network Animation */}
13-
<div className="absolute inset-0 z-0">
14-
<ParticleNetwork />
15-
</div>
10+
<div className="pushy-hero relative overflow-hidden min-h-[680px] lg:min-h-[760px] flex items-center bg-[#eee7dc]">
11+
<img
12+
src="/hero-loop/pushy-hero-loop-poster.png"
13+
className="pushy-hero__poster absolute inset-0 h-full w-full object-cover"
14+
alt=""
15+
aria-hidden="true"
16+
/>
17+
<video
18+
className="pushy-hero__video absolute inset-0 h-full w-full object-cover"
19+
autoPlay
20+
muted
21+
loop
22+
playsInline
23+
preload="metadata"
24+
poster="/hero-loop/pushy-hero-loop-poster.png"
25+
aria-hidden="true"
26+
>
27+
<source src="/hero-loop/pushy-hero-loop.webm" type="video/webm" />
28+
<source src="/hero-loop/pushy-hero-loop.mp4" type="video/mp4" />
29+
</video>
1630

17-
{/* Subtle overlay gradient for depth */}
18-
<div className="absolute inset-0 z-[1] pointer-events-none bg-gradient-to-b from-transparent via-transparent to-slate-950/40" />
31+
<div className="absolute inset-0 z-[1] pointer-events-none bg-[linear-gradient(90deg,rgba(249,246,240,0.96)_0%,rgba(248,244,236,0.88)_34%,rgba(248,244,236,0.42)_55%,rgba(25,24,22,0.06)_100%)]" />
32+
<div className="absolute inset-0 z-[2] pointer-events-none bg-[linear-gradient(180deg,rgba(255,255,255,0.24)_0%,rgba(255,255,255,0)_52%,rgba(45,38,30,0.2)_100%)]" />
1933

20-
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative w-full text-center z-10">
21-
<div className="flex justify-center mb-8 animate-fade-in-down">
34+
<div className="max-w-7xl mx-auto px-5 sm:px-6 lg:px-8 relative w-full z-10">
35+
<div className="max-w-2xl text-left pt-32 pb-20 lg:pt-40 lg:pb-28">
36+
<div className="flex justify-start mb-8 animate-fade-in-down">
2237
<img
2338
src={logo}
24-
className="w-24 h-24 sm:w-32 sm:h-32 hover:scale-105 transition-transform duration-500 drop-shadow-[0_0_24px_rgba(68,131,237,0.5)]"
39+
className="w-20 h-20 sm:w-24 sm:h-24 hover:scale-105 transition-transform duration-500 drop-shadow-[0_10px_28px_rgba(68,131,237,0.24)]"
2540
alt="Pushy Logo"
2641
/>
27-
</div>
42+
</div>
2843

29-
<h1 className="text-5xl sm:text-6xl md:text-7xl font-extrabold tracking-tight mb-6 animate-fade-in-up">
30-
<span className="bg-clip-text text-transparent bg-gradient-to-r from-blue-400 via-indigo-400 to-violet-400">
44+
<h1 className="text-5xl sm:text-6xl md:text-7xl font-extrabold tracking-tight mb-6 animate-fade-in-up text-[#182235]">
3145
Pushy
32-
</span>
33-
</h1>
46+
</h1>
3447

35-
<p className="text-xl sm:text-2xl md:text-3xl font-medium text-slate-200 mb-8 tracking-wide animate-fade-in-up animation-delay-100">
36-
极速热更新框架 for React Native
37-
</p>
48+
<p className="text-xl sm:text-2xl md:text-3xl font-semibold text-[#233248] mb-8 tracking-wide animate-fade-in-up animation-delay-100">
49+
让应用体验持续变好,不打断用户
50+
</p>
3851

39-
<div className="max-w-3xl mx-auto mb-12 animate-fade-in-up animation-delay-200">
40-
<p className="text-lg sm:text-xl text-slate-400 leading-relaxed font-light">
41-
<span className="block mb-4 text-base sm:text-lg font-medium text-blue-100">
52+
<div className="max-w-xl mb-12 animate-fade-in-up animation-delay-200">
53+
<p className="text-lg sm:text-xl text-[#4a5768] leading-relaxed font-normal">
54+
<span className="block mb-4 text-base sm:text-lg font-semibold text-[#1f3f6d]">
4255
官方 Skill 已支持 AI 自动完成接入、配置检查与常见问题排查。
43-
</span>
44-
<span className="inline-block mx-4 relative font-medium text-slate-300">高速节点勤分发</span>
45-
<span className="inline-block mx-4 relative font-medium text-slate-300">山河浩广若比邻</span>
46-
<br className="hidden sm:block" />
47-
<span className="inline-block mx-4 mt-2 sm:mt-4 relative font-medium text-slate-300">增量算法尽优化</span>
48-
<span className="inline-block mx-4 mt-2 sm:mt-4 relative font-medium text-slate-300">字节四两拨千斤</span>
49-
</p>
50-
</div>
56+
</span>
57+
<span className="inline-block mr-5 mt-2 relative font-medium text-[#334256]">高速节点勤分发</span>
58+
<span className="inline-block mr-5 mt-2 relative font-medium text-[#334256]">山河浩广若比邻</span>
59+
<br className="hidden sm:block" />
60+
<span className="inline-block mr-5 mt-3 relative font-medium text-[#334256]">增量算法尽优化</span>
61+
<span className="inline-block mr-5 mt-3 relative font-medium text-[#334256]">字节四两拨千斤</span>
62+
</p>
63+
</div>
5164

52-
<div className="flex flex-col sm:flex-row items-center justify-center gap-6 animate-fade-in-up animation-delay-300">
53-
<a href="/docs/skills" className="w-full sm:w-auto">
54-
<button className="w-full sm:w-auto px-8 py-4 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-bold rounded-2xl text-lg transition-all duration-300 shadow-lg shadow-blue-600/25 hover:shadow-blue-500/40 hover:-translate-y-1">
55-
优先:安装 Skill
56-
</button>
57-
</a>
58-
<a href="/docs/getting-started" className="w-full sm:w-auto">
59-
<button className="w-full sm:w-auto px-8 py-4 border border-slate-400/40 bg-slate-900/20 hover:bg-slate-900/35 text-slate-100 font-bold rounded-2xl text-lg transition-all duration-300 hover:-translate-y-1">
60-
查看手动接入
61-
</button>
62-
</a>
63-
<div className="scale-125 transform origin-center sm:origin-left hover:scale-150 transition-transform duration-300">
64-
<GitHubButton
65-
type="stargazers"
66-
namespace="reactnativecn"
67-
repo="react-native-update"
68-
/>
65+
<div className="flex flex-col sm:flex-row items-start sm:items-center justify-start gap-5 animate-fade-in-up animation-delay-300">
66+
<a href="/docs/skills" className="w-full sm:w-auto">
67+
<button className="w-full sm:w-auto px-8 py-4 bg-[#286be8] hover:bg-[#1f5ed4] text-white font-bold rounded-2xl text-lg transition-all duration-300 shadow-lg shadow-blue-600/25 hover:shadow-blue-500/35 hover:-translate-y-1">
68+
优先:安装 Skill
69+
</button>
70+
</a>
71+
<a href="/docs/getting-started" className="w-full sm:w-auto">
72+
<button className="w-full sm:w-auto px-8 py-4 border border-[#27384f]/20 bg-white/56 hover:bg-white/74 text-[#233248] font-bold rounded-2xl text-lg transition-all duration-300 hover:-translate-y-1 backdrop-blur-sm">
73+
查看手动接入
74+
</button>
75+
</a>
76+
<div className="scale-125 transform origin-left hover:scale-150 transition-transform duration-300">
77+
<GitHubButton
78+
type="stargazers"
79+
namespace="reactnativecn"
80+
repo="react-native-update"
81+
/>
82+
</div>
6983
</div>
7084
</div>
7185
</div>

site/components/home/home.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1+
.pushy-hero {
2+
isolation: isolate;
3+
}
14

5+
.pushy-hero__poster {
6+
z-index: 0;
7+
}
8+
9+
.pushy-hero__video {
10+
z-index: 0;
11+
}
12+
13+
@media (prefers-reduced-motion: reduce) {
14+
.pushy-hero__video {
15+
display: none;
16+
}
17+
}
18+
19+
@media (max-width: 767px) {
20+
.pushy-hero__poster,
21+
.pushy-hero__video {
22+
object-position: 64% center;
23+
}
24+
}

site/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
"dev": "rspress dev",
88
"build": "rspress build",
99
"preview": "rspress preview",
10-
"start": "rspress preview"
10+
"start": "rspress preview",
11+
"remotion:studio": "remotion studio remotion/index.ts --public-dir=pages/public",
12+
"remotion:poster:hero": "remotion still remotion/index.ts PushyHeroLoop pages/public/hero-loop/pushy-hero-loop-poster.png --frame=126 --public-dir=pages/public",
13+
"remotion:render:hero:mp4": "remotion render remotion/index.ts PushyHeroLoop pages/public/hero-loop/pushy-hero-loop.mp4 --codec=h264 --public-dir=pages/public",
14+
"remotion:render:hero:webm": "remotion render remotion/index.ts PushyHeroLoop pages/public/hero-loop/pushy-hero-loop.webm --codec=vp9 --public-dir=pages/public"
1115
},
1216
"dependencies": {
1317
"@ant-design/icons": "^6.1.1",
@@ -24,5 +28,9 @@
2428
"sass": "^1.99.0",
2529
"tailwindcss": "^4.2.4",
2630
"typescript": "^6.0.3"
31+
},
32+
"devDependencies": {
33+
"@remotion/cli": "4.0.454",
34+
"remotion": "4.0.454"
2735
}
2836
}
1.53 MB
Loading
2.45 MB
Loading
3.77 MB
Binary file not shown.
626 KB
Binary file not shown.

site/remotion/HERO_LOOP.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Pushy Homepage Hero Loop
2+
3+
This Remotion composition creates a 10-second seamless homepage background loop for a non-technical business audience. The source keeps the left side quiet for headline and CTA copy, while the right side shows a calm professional using a phone as a small app improvement arrives.
4+
5+
## Composition
6+
7+
- `PushyHeroLoop`
8+
- 1920x1080
9+
- 30 fps
10+
- 300 frames
11+
- Source asset: `/hero-loop/office-phone-base.png`
12+
- Suggested poster frame: frame `126`
13+
14+
## Preview
15+
16+
```bash
17+
bun run remotion:studio
18+
```
19+
20+
## Render
21+
22+
```bash
23+
bun run remotion:poster:hero
24+
bun run remotion:render:hero:mp4
25+
bun run remotion:render:hero:webm
26+
```
27+
28+
Use WebM first for modern browsers and MP4 as the compatibility fallback. Keep both muted, looping, inline, and behind a left-side readability gradient.
29+
30+
## Website Embed
31+
32+
```tsx
33+
<video
34+
className="absolute inset-0 h-full w-full object-cover"
35+
autoPlay
36+
muted
37+
loop
38+
playsInline
39+
preload="metadata"
40+
poster="/hero-loop/pushy-hero-loop-poster.png"
41+
aria-hidden="true"
42+
>
43+
<source src="/hero-loop/pushy-hero-loop.webm" type="video/webm" />
44+
<source src="/hero-loop/pushy-hero-loop.mp4" type="video/mp4" />
45+
</video>
46+
```
47+
48+
Recommended CSS behavior:
49+
50+
- Put text and CTAs in the left 42% of the hero.
51+
- Add a light-to-transparent overlay from left to right for contrast.
52+
- Respect `prefers-reduced-motion` by falling back to the poster image.
53+
- Use `object-fit: cover`; avoid cropping the phone on the right at desktop widths.

site/remotion/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { registerRoot } from "remotion";
2+
import { RemotionRoot } from "./root";
3+
4+
registerRoot(RemotionRoot);

0 commit comments

Comments
 (0)