返回 html-video
overlays.html
1 <template id="overlays-template">
2 <div data-composition-id="overlays" data-width="1080" data-height="1920" data-duration="16.88">
3 <!-- 6-Column Grid Overlay (for visual reference during development, hidden by default) -->
4 <div class="vignelli-grid">
5 <div class="col"></div>
6 <div class="col"></div>
7 <div class="col"></div>
8 <div class="col"></div>
9 <div class="col"></div>
10 <div class="col"></div>
11 </div>
12
13 <!-- 1. 47% Motion Graphics -->
14 <div class="overlay-item motion-graphics-stat" id="stat-47">
15 <div class="red-bar"></div>
16 <div class="stat-content">
17 <div class="number">47%</div>
18 <div class="label">Motion Graphics</div>
19 </div>
20 </div>
21
22 <!-- 2. 62% Static Content (Full Canvas) -->
23 <div class="overlay-item static-content-stat" id="stat-62">
24 <div class="bg-charcoal"></div>
25 <div class="full-content">
26 <div class="large-number">62%</div>
27 <div class="large-label">Static Content</div>
28 <div class="red-accent"></div>
29 </div>
30 </div>
31
32 <!-- 3. 3 out of 4 lack editing skills -->
33 <div class="overlay-item editing-skills-stat" id="stat-3-4">
34 <div class="text-block">
35 <span class="highlight">3 out of 4</span>
36 <br />lack editing skills
37 </div>
38 <div class="side-bar"></div>
39 </div>
40
41 <!-- 4. Hyperframes Branding -->
42 <div class="overlay-item branding-reveal" id="branding">
43 <div class="logo-container">
44 <div class="logo-text"><span class="heavy">HYPERFRAMES</span></div>
45 <div class="logo-underline"></div>
46 </div>
47 </div>
48
49 <style>
50 [data-composition-id="overlays"] {
51 position: relative;
52 width: 1080px;
53 height: 1920px;
54 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
55 color: #000000;
56 overflow: hidden;
57 pointer-events: none;
58 }
59
60 /* Grid System */
61 [data-composition-id="overlays"] .vignelli-grid {
62 position: absolute;
63 top: 0;
64 left: 0;
65 width: 100%;
66 height: 100%;
67 display: grid;
68 grid-template-columns: repeat(6, 1fr);
69 pointer-events: none;
70 z-index: 100;
71 opacity: 0; /* Hidden */
72 }
73 [data-composition-id="overlays"] .vignelli-grid .col {
74 border-right: 1px solid rgba(204, 0, 0, 0.1);
75 }
76
77 [data-composition-id="overlays"] .overlay-item {
78 position: absolute;
79 opacity: 0;
80 display: flex;
81 z-index: 10;
82 }
83
84 /* 1. 47% Stat Styles */
85 [data-composition-id="overlays"] #stat-47 {
86 bottom: 200px;
87 left: 0;
88 width: 540px; /* 3 columns */
89 height: 240px;
90 background: #ffffff;
91 flex-direction: row;
92 align-items: stretch;
93 }
94 [data-composition-id="overlays"] #stat-47 .red-bar {
95 width: 20px;
96 background: #cc0000;
97 }
98 [data-composition-id="overlays"] #stat-47 .stat-content {
99 padding: 40px;
100 display: flex;
101 flex-direction: column;
102 justify-content: center;
103 }
104 [data-composition-id="overlays"] #stat-47 .number {
105 font-size: 120px;
106 font-weight: 900;
107 line-height: 1;
108 letter-spacing: -2px;
109 }
110 [data-composition-id="overlays"] #stat-47 .label {
111 font-size: 32px;
112 font-weight: 700;
113 text-transform: uppercase;
114 margin-top: 10px;
115 }
116
117 /* 2. 62% Stat Styles (Full Canvas) */
118 [data-composition-id="overlays"] #stat-62 {
119 top: 0;
120 left: 0;
121 width: 1080px;
122 height: 1920px;
123 z-index: 50;
124 }
125 [data-composition-id="overlays"] #stat-62 .bg-charcoal {
126 position: absolute;
127 top: 0;
128 left: 0;
129 width: 100%;
130 height: 100%;
131 background: #1a1a1a;
132 }
133 [data-composition-id="overlays"] #stat-62 .full-content {
134 position: relative;
135 width: 100%;
136 height: 100%;
137 display: flex;
138 flex-direction: column;
139 justify-content: center;
140 padding: 0 90px; /* Align with grid */
141 }
142 [data-composition-id="overlays"] #stat-62 .large-number {
143 font-size: 400px;
144 font-weight: 900;
145 color: #ffffff;
146 line-height: 0.8;
147 letter-spacing: -10px;
148 }
149 [data-composition-id="overlays"] #stat-62 .large-label {
150 font-size: 80px;
151 font-weight: 700;
152 color: #ffffff;
153 text-transform: uppercase;
154 margin-top: 20px;
155 max-width: 600px;
156 }
157 [data-composition-id="overlays"] #stat-62 .red-accent {
158 position: absolute;
159 top: 0;
160 right: 0;
161 width: 180px; /* 1 column */
162 height: 100%;
163 background: #cc0000;
164 }
165
166 /* 3. 3 out of 4 Stat Styles */
167 [data-composition-id="overlays"] #stat-3-4 {
168 top: 400px;
169 right: 0;
170 width: 360px; /* 2 columns */
171 background: #ffffff;
172 padding: 40px;
173 flex-direction: row-reverse;
174 }
175 [data-composition-id="overlays"] #stat-3-4 .text-block {
176 font-size: 48px;
177 font-weight: 700;
178 line-height: 1.1;
179 text-align: right;
180 }
181 [data-composition-id="overlays"] #stat-3-4 .highlight {
182 color: #cc0000;
183 font-size: 64px;
184 font-weight: 900;
185 }
186 [data-composition-id="overlays"] #stat-3-4 .side-bar {
187 width: 10px;
188 background: #000000;
189 margin-left: 20px;
190 }
191
192 /* 4. Branding Styles */
193 [data-composition-id="overlays"] #branding {
194 bottom: 100px;
195 left: 90px;
196 width: 900px;
197 justify-content: center;
198 z-index: 60;
199 }
200 [data-composition-id="overlays"] #branding .logo-container {
201 display: flex;
202 flex-direction: column;
203 align-items: center;
204 }
205 [data-composition-id="overlays"] #branding .logo-text {
206 font-size: 64px;
207 letter-spacing: 10px;
208 color: #000000;
209 }
210 [data-composition-id="overlays"] #branding .logo-text .heavy {
211 font-weight: 900;
212 }
213 [data-composition-id="overlays"] #branding .logo-text .light {
214 font-weight: 300;
215 }
216 [data-composition-id="overlays"] #branding .logo-underline {
217 width: 100%;
218 height: 8px;
219 background: #cc0000;
220 margin-top: 10px;
221 transform-origin: left;
222 }
223 </style>
224
225 <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
226 <script>
227 const tl = gsap.timeline({ paused: true });
228 const TRANSCRIPT = [
229 { text: "We", start: 0.14, end: 0.239 },
230 { text: "asked", start: 0.28, end: 0.459 },
231 { text: "what", start: 0.5, end: 0.619 },
232 { text: "you", start: 0.659, end: 0.779 },
233 { text: "needed.", start: 0.8, end: 1.179 },
234 { text: "Forty-seven", start: 1.199, end: 1.619 },
235 { text: "percent", start: 1.699, end: 1.96 },
236 { text: "of", start: 1.979, end: 2.059 },
237 { text: "you", start: 2.099, end: 2.299 },
238 { text: "said", start: 2.319, end: 2.499 },
239 { text: "motion", start: 2.559, end: 2.839 },
240 { text: "graphics,", start: 2.899, end: 3.759 },
241 { text: "sixty-two", start: 3.799, end: 4.159 },
242 { text: "percent", start: 4.239, end: 4.559 },
243 { text: "said", start: 4.639, end: 4.799 },
244 { text: "static", start: 4.859, end: 5.199 },
245 { text: "content", start: 5.239, end: 5.639 },
246 { text: "was", start: 5.679, end: 5.779 },
247 { text: "costing", start: 5.859, end: 6.219 },
248 { text: "you", start: 6.259, end: 6.339 },
249 { text: "attention,", start: 6.379, end: 7.299 },
250 { text: "and", start: 7.319, end: 7.439 },
251 { text: "three", start: 7.48, end: 7.599 },
252 { text: "out", start: 7.679, end: 7.779 },
253 { text: "of", start: 7.799, end: 7.879 },
254 { text: "four", start: 7.94, end: 8.139 },
255 { text: "said", start: 8.279, end: 8.46 },
256 { text: "you", start: 8.519, end: 8.6 },
257 { text: "know", start: 8.619, end: 8.739 },
258 { text: "the", start: 8.8, end: 8.88 },
259 { text: "look", start: 8.92, end: 9.079 },
260 { text: "you", start: 9.119, end: 9.259 },
261 { text: "want", start: 9.279, end: 9.619 },
262 { text: "but", start: 9.779, end: 9.88 },
263 { text: "don't", start: 9.92, end: 10.1 },
264 { text: "have", start: 10.159, end: 10.3 },
265 { text: "the", start: 10.3, end: 10.42 },
266 { text: "editing", start: 10.5, end: 10.779 },
267 { text: "skills", start: 10.86, end: 11.139 },
268 { text: "to", start: 11.159, end: 11.239 },
269 { text: "get", start: 11.279, end: 11.439 },
270 { text: "there.", start: 11.46, end: 12.239 },
271 { text: "So", start: 12.3, end: 12.38 },
272 { text: "we", start: 12.399, end: 12.519 },
273 { text: "built", start: 12.539, end: 12.759 },
274 { text: "Hyperframes", start: 12.84, end: 13.119 },
275 ];
276
277 // Requirement 1: "47% Motion Graphics" (Start: 1.199, End: 3.759)
278 // Positioned in bottom half, columns 1-3.
279 tl.fromTo(
280 "#stat-47",
281 { x: -540, opacity: 1 },
282 { x: 0, duration: 0.8, ease: "expo.out" },
283 1.199,
284 );
285 tl.to("#stat-47", { x: -540, duration: 0.6, ease: "expo.in" }, 3.759 - 0.6);
286
287 // Requirement 2: "62% Static Content" (Start: 3.799, End: 7.299)
288 // Full canvas moment. Large bold typography across columns.
289 tl.set("#stat-62", { opacity: 1 }, 3.799);
290 tl.from("#stat-62 .bg-charcoal", { x: "100%", duration: 0.8, ease: "expo.out" }, 3.799);
291 tl.from("#stat-62 .red-accent", { x: "100%", duration: 0.8, ease: "expo.out" }, 3.899);
292 tl.from(
293 "#stat-62 .large-number",
294 { y: 100, opacity: 0, duration: 1, ease: "expo.out" },
295 4.099,
296 );
297 tl.from("#stat-62 .large-label", { y: 50, opacity: 0, duration: 1, ease: "expo.out" }, 4.299);
298
299 tl.to("#stat-62", { x: "-100%", duration: 0.8, ease: "expo.in" }, 7.299 - 0.8);
300
301 // Requirement 3: "3 out of 4 lack editing skills" (Start: 7.319, End: 12.239)
302 // Positioned in columns 5-6 (right side) to avoid face (x: 300-776)
303 tl.fromTo(
304 "#stat-3-4",
305 { x: 360, opacity: 1 },
306 { x: 0, duration: 0.8, ease: "expo.out" },
307 7.319,
308 );
309 tl.to("#stat-3-4", { x: 360, duration: 0.6, ease: "expo.in" }, 12.239 - 0.6);
310
311 // Requirement 4: "Hyperframes" (Start: 12.84, End: 13.84)
312 tl.set("#branding", { opacity: 1 }, 12.84);
313 tl.from(
314 "#branding .logo-text",
315 { y: 20, opacity: 0, duration: 0.6, ease: "expo.out" },
316 12.84,
317 );
318 tl.from("#branding .logo-underline", { scaleX: 0, duration: 0.8, ease: "expo.out" }, 13.04);
319
320 window.__timelines = window.__timelines || {};
321 window.__timelines["overlays"] = tl;
322 </script>
323 </div>
324 </template>
325
325 lines HTML