mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-20 12:25:51 +00:00
feat(registry): add yt-doc-lower-third — documentary lower third
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: "Documentary Lower Third"
|
||||
description: "Name and role lower third: accent bar draws down, text slides in, hairline rule grows; overlay and light schemes"
|
||||
---
|
||||
|
||||
# Documentary Lower Third
|
||||
|
||||
Name and role lower third: accent bar draws down, text slides in, hairline rule grows; overlay and light schemes
|
||||
|
||||
`lower-third` `title` `creator`
|
||||
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/yt-doc-lower-third.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/yt-doc-lower-third.png" autoPlay muted loop playsInline />
|
||||
|
||||
## Install
|
||||
|
||||
<CodeGroup>
|
||||
|
||||
```bash Terminal
|
||||
npx hyperframes add yt-doc-lower-third
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
## Details
|
||||
|
||||
| Property | Value |
|
||||
| --- | --- |
|
||||
| Type | Block |
|
||||
| Dimensions | 1920×1080 |
|
||||
| Duration | 6s |
|
||||
|
||||
## Files
|
||||
|
||||
| File | Target | Type |
|
||||
| --- | --- | --- |
|
||||
| `yt-doc-lower-third.html` | `compositions/yt-doc-lower-third.html` | hyperframes:composition |
|
||||
|
||||
## Usage
|
||||
|
||||
After installing, add the block to your host composition:
|
||||
|
||||
```html
|
||||
<div data-composition-id="yt-doc-lower-third" data-composition-src="compositions/yt-doc-lower-third.html" data-start="0" data-duration="6" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||||
```
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
||||
"name": "yt-doc-lower-third",
|
||||
"type": "hyperframes:block",
|
||||
"title": "Documentary Lower Third",
|
||||
"description": "Name and role lower third: accent bar draws down, text slides in, hairline rule grows; overlay and light schemes",
|
||||
"tags": [
|
||||
"lower-third",
|
||||
"title",
|
||||
"creator"
|
||||
],
|
||||
"dimensions": {
|
||||
"width": 1920,
|
||||
"height": 1080
|
||||
},
|
||||
"duration": 6,
|
||||
"files": [
|
||||
{
|
||||
"path": "yt-doc-lower-third.html",
|
||||
"target": "compositions/yt-doc-lower-third.html",
|
||||
"type": "hyperframes:composition"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<style>
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
}
|
||||
#yt-lt-root {
|
||||
/* ---- yt tokens ---- */
|
||||
--yt-font: "Inter", -apple-system, sans-serif;
|
||||
--yt-ink: #1d1d1f;
|
||||
--yt-ink-dim: #5a5a5f;
|
||||
/* overlay-scheme text over footage — distinct from the --yt-ink board tokens */
|
||||
--yt-text: #ffffff;
|
||||
--yt-text-dim: rgba(255, 255, 255, 0.75);
|
||||
--yt-red: #e62e2e;
|
||||
|
||||
position: relative;
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
overflow: hidden;
|
||||
background: transparent; /* overlays footage */
|
||||
font-family: var(--yt-font);
|
||||
}
|
||||
#yt-lt-group {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
gap: 26px;
|
||||
align-items: stretch;
|
||||
}
|
||||
#yt-lt-bar {
|
||||
flex: none;
|
||||
width: 7px;
|
||||
border-radius: 4px;
|
||||
background: var(--yt-red);
|
||||
transform-origin: top center;
|
||||
}
|
||||
#yt-lt-name {
|
||||
font-weight: 700;
|
||||
font-size: 56px;
|
||||
line-height: 1.05;
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
#yt-lt-role {
|
||||
margin-top: 8px;
|
||||
font-weight: 500;
|
||||
font-size: 30px;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
#yt-lt-rule {
|
||||
margin-top: 14px;
|
||||
height: 2px;
|
||||
width: 320px;
|
||||
border-radius: 1px;
|
||||
transform-origin: left center;
|
||||
}
|
||||
.yt-overlay #yt-lt-name {
|
||||
color: var(--yt-text);
|
||||
text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
.yt-overlay #yt-lt-role {
|
||||
color: var(--yt-text-dim);
|
||||
text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.yt-overlay #yt-lt-rule {
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
}
|
||||
.yt-light #yt-lt-name {
|
||||
color: var(--yt-ink);
|
||||
}
|
||||
.yt-light #yt-lt-role {
|
||||
color: var(--yt-ink-dim);
|
||||
}
|
||||
.yt-light #yt-lt-rule {
|
||||
background: rgba(0, 0, 0, 0.18);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div
|
||||
id="yt-lt-root"
|
||||
data-composition-id="yt-doc-lower-third"
|
||||
data-start="0"
|
||||
data-duration="6"
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
>
|
||||
<div id="yt-lt-group">
|
||||
<div id="yt-lt-bar"></div>
|
||||
<div>
|
||||
<div id="yt-lt-name"></div>
|
||||
<div id="yt-lt-role"></div>
|
||||
<div id="yt-lt-rule"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
id="yt-lt-drv"
|
||||
class="clip"
|
||||
data-start="0"
|
||||
data-duration="6"
|
||||
data-track-index="0"
|
||||
style="position:absolute;width:1px;height:1px;opacity:0;pointer-events:none"
|
||||
></div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
window.__timelines = window.__timelines || {};
|
||||
|
||||
/* ---- published parameters ----
|
||||
The documentary lower third ("Lower 03" energy): red bar draws
|
||||
down, name slides in, role follows, hairline rule grows. */
|
||||
var CONFIG = {
|
||||
scheme: "overlay", // "overlay" (white over footage) | "light" (ink)
|
||||
name: "Alex Winters",
|
||||
role: "Field Producer",
|
||||
x: 120,
|
||||
y: 800, // top of the group
|
||||
animationIn: true,
|
||||
animationOut: true,
|
||||
};
|
||||
|
||||
var DUR = 6;
|
||||
function clamp(v, lo, hi) {
|
||||
return Math.min(hi, Math.max(lo, v));
|
||||
}
|
||||
var OUT = clamp(DUR * 0.06, 0.25, 0.6);
|
||||
|
||||
var root = document.getElementById("yt-lt-root");
|
||||
var group = document.getElementById("yt-lt-group");
|
||||
root.classList.add(CONFIG.scheme === "light" ? "yt-light" : "yt-overlay");
|
||||
document.getElementById("yt-lt-name").textContent = CONFIG.name;
|
||||
document.getElementById("yt-lt-role").textContent = CONFIG.role;
|
||||
group.style.left = CONFIG.x + "px";
|
||||
group.style.top = CONFIG.y + "px";
|
||||
|
||||
var tl = gsap.timeline({ paused: true });
|
||||
|
||||
if (CONFIG.animationIn) {
|
||||
gsap.set("#yt-lt-bar", { scaleY: 0 });
|
||||
gsap.set(["#yt-lt-name", "#yt-lt-role"], { opacity: 0, x: -28 });
|
||||
gsap.set("#yt-lt-rule", { scaleX: 0 });
|
||||
tl.to("#yt-lt-bar", { scaleY: 1, duration: 0.5, ease: "power2.inOut" }, 0.15);
|
||||
tl.to("#yt-lt-name", { opacity: 1, x: 0, duration: 0.55, ease: "power3.out" }, 0.4);
|
||||
tl.to("#yt-lt-role", { opacity: 1, x: 0, duration: 0.55, ease: "power3.out" }, 0.55);
|
||||
tl.to("#yt-lt-rule", { scaleX: 1, duration: 0.6, ease: "power2.inOut" }, 0.7);
|
||||
} else {
|
||||
gsap.set("#yt-lt-bar", { scaleY: 1 });
|
||||
}
|
||||
|
||||
if (CONFIG.animationOut) {
|
||||
tl.to(group, { opacity: 0, x: -20, duration: OUT, ease: "power2.in" }, DUR - OUT - 0.05);
|
||||
}
|
||||
tl.set(root, { visibility: "hidden" }, DUR - 0.02);
|
||||
|
||||
window.__timelines["yt-doc-lower-third"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -583,6 +583,10 @@
|
||||
"name": "yt-vertical-fill",
|
||||
"type": "hyperframes:block"
|
||||
},
|
||||
{
|
||||
"name": "yt-doc-lower-third",
|
||||
"type": "hyperframes:block"
|
||||
},
|
||||
{
|
||||
"name": "parallax-zoom",
|
||||
"type": "hyperframes:component"
|
||||
|
||||
Reference in New Issue
Block a user