Redesign landing page: hero with gradient brand wordmark, value pills (no ads / no sign-in / offline playlists), and clickable quick-search chips; refresh Windows installers
This commit is contained in:
@@ -942,6 +942,14 @@ function wireUI() {
|
||||
|
||||
els.newPlaylistBtn.addEventListener('click', () => newPlaylist(null));
|
||||
|
||||
// Landing-hero quick-search chips
|
||||
document.querySelectorAll('.chip').forEach((c) => {
|
||||
c.addEventListener('click', () => {
|
||||
els.searchInput.value = c.dataset.q || c.textContent.trim();
|
||||
els.searchForm.requestSubmit();
|
||||
});
|
||||
});
|
||||
|
||||
// Now-playing: Save (preload) + Add to playlist
|
||||
els.saveBtn.addEventListener('click', async () => {
|
||||
if (!current || !current.meta) return;
|
||||
|
||||
@@ -68,8 +68,23 @@
|
||||
<img id="artImg" alt="" />
|
||||
</div>
|
||||
<div id="playerPlaceholder" class="player-placeholder">
|
||||
<div class="ph-logo">▶</div>
|
||||
<p>Search and pick a video to start watching — ad-free.</p>
|
||||
<div class="hero">
|
||||
<div class="ph-logo">▶</div>
|
||||
<h1 class="hero-title">YT Player</h1>
|
||||
<p class="hero-tagline">Ad-free YouTube — no login, no tracking. Search, play, and keep playlists right on your device.</p>
|
||||
<div class="hero-pills">
|
||||
<span class="hero-pill">No ads</span>
|
||||
<span class="hero-pill">No sign-in</span>
|
||||
<span class="hero-pill">Offline playlists</span>
|
||||
</div>
|
||||
<div class="hero-suggests">
|
||||
<span class="hero-suggests-label">Try</span>
|
||||
<button class="chip" data-q="lofi hip hop radio">lofi beats</button>
|
||||
<button class="chip" data-q="live news">live news</button>
|
||||
<button class="chip" data-q="relaxing music">relaxing music</button>
|
||||
<button class="chip" data-q="podcast highlights">podcasts</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bufferSpinner" class="spinner hidden"></div>
|
||||
</div>
|
||||
|
||||
@@ -289,22 +289,87 @@ body::after {
|
||||
|
||||
.player-placeholder {
|
||||
position: absolute; inset: 0;
|
||||
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
||||
color: var(--text-dim); gap: 18px; text-align: center; padding: 20px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
text-align: center; padding: 28px;
|
||||
background:
|
||||
radial-gradient(680px 420px at 50% 30%, rgba(255, 75, 50, 0.10), transparent 70%),
|
||||
radial-gradient(circle at 50% 120%, rgba(90, 120, 255, 0.06), transparent 60%),
|
||||
linear-gradient(180deg, var(--bg-1), #000);
|
||||
}
|
||||
.player-placeholder p { max-width: 320px; font-size: 14px; }
|
||||
/* Hero landing */
|
||||
.hero {
|
||||
display: flex; flex-direction: column; align-items: center;
|
||||
gap: 16px; max-width: 460px;
|
||||
animation: heroIn 0.6s var(--ease) both;
|
||||
}
|
||||
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
|
||||
.ph-logo {
|
||||
font-size: 30px;
|
||||
width: 84px; height: 84px;
|
||||
font-size: 32px;
|
||||
width: 88px; height: 88px;
|
||||
display: grid; place-items: center;
|
||||
border-radius: 24px;
|
||||
color: var(--accent);
|
||||
background: var(--bg-1);
|
||||
border: 1px solid var(--line);
|
||||
box-shadow: 0 0 50px -16px var(--accent-glow);
|
||||
border-radius: 26px;
|
||||
color: #fff;
|
||||
background: linear-gradient(145deg, var(--accent-bright), var(--accent-deep));
|
||||
box-shadow: 0 18px 50px -14px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
|
||||
animation: float 4s ease-in-out infinite;
|
||||
}
|
||||
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
|
||||
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
|
||||
.hero-title {
|
||||
margin: 6px 0 0;
|
||||
font-family: var(--display);
|
||||
font-weight: 800;
|
||||
font-size: 40px;
|
||||
letter-spacing: -0.03em;
|
||||
line-height: 1;
|
||||
background: linear-gradient(180deg, #fff, #c8c6cf);
|
||||
-webkit-background-clip: text; background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
.hero-tagline {
|
||||
margin: 0; max-width: 380px;
|
||||
color: var(--text-2); font-size: 14.5px; line-height: 1.5;
|
||||
}
|
||||
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 2px; }
|
||||
.hero-pill {
|
||||
font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
|
||||
color: var(--text-2);
|
||||
background: var(--bg-2);
|
||||
border: 1px solid var(--line);
|
||||
padding: 6px 12px 6px 26px;
|
||||
border-radius: 20px;
|
||||
position: relative;
|
||||
}
|
||||
.hero-pill::before {
|
||||
content: "✓";
|
||||
position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
|
||||
color: var(--accent); font-size: 10px; font-weight: 800;
|
||||
}
|
||||
.hero-suggests {
|
||||
display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.hero-suggests-label {
|
||||
font-family: var(--mono); font-size: 10px; font-weight: 700;
|
||||
letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim);
|
||||
margin-right: 2px;
|
||||
}
|
||||
.chip {
|
||||
font-family: var(--ui); font-size: 13px; font-weight: 600;
|
||||
color: var(--text);
|
||||
background: var(--bg-3);
|
||||
border: 1px solid var(--line);
|
||||
padding: 8px 15px;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
transition: all 0.16s var(--ease);
|
||||
}
|
||||
.chip:hover {
|
||||
color: #fff;
|
||||
background: linear-gradient(145deg, var(--accent-bright), var(--accent-deep));
|
||||
border-color: transparent;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 20px -8px var(--accent-glow);
|
||||
}
|
||||
|
||||
.spinner {
|
||||
position: absolute;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user