This commit is contained in:
4DBug
2026-08-26 19:24:53 -05:00
parent 145851a32e
commit 735f9a4375
9 changed files with 233 additions and 236 deletions
+1 -25
View File
@@ -1,37 +1,13 @@
/*
HOME — hero with search + continue-watching row + trending rows.
HOME — continue-watching row + trending rows.
*/
(function () {
'use strict';
// quick-search chips in the hero — edit freely
const QUICK_SEARCHES = ['Action', 'Comedy', 'Sci-Fi', 'Drama', 'Horror', 'Animation', 'Crime'];
SR.app.initChrome();
const sections = document.getElementById('sections');
const form = document.getElementById('heroForm');
const input = document.getElementById('heroInput');
if (form && input) {
form.addEventListener('submit', (e) => {
e.preventDefault();
const q = input.value.trim();
location.href = q ? `search.html?q=${encodeURIComponent(q)}` : 'search.html';
});
}
const chips = document.getElementById('heroChips');
if (chips) {
for (const term of QUICK_SEARCHES) {
const a = document.createElement('a');
a.className = 'chip';
a.href = `search.html?q=${encodeURIComponent(term)}`;
a.textContent = term;
chips.appendChild(a);
}
}
const cont = SR.cards.continueRow();
if (cont) sections.appendChild(cont);