feat: Search engine channel name + program name today

This commit is contained in:
Johnnybegood90
2026-03-12 12:15:51 +01:00
parent 89da5fa3f6
commit 100ad77058
5 changed files with 242 additions and 1 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<?php
$js_dir = __DIR__ . '/../js/';
include $js_dir . 'config.js';
$js_modules = ['utils', 'epg', 'mobile', 'tooltip', 'sources', 'm3u', 'player', 'themes', 'live'];
$js_modules = ['utils', 'epg', 'mobile', 'tooltip', 'sources', 'm3u', 'player', 'themes', 'search', 'live'];
foreach ($js_modules as $mod) {
echo file_get_contents($js_dir . $mod . '.js');
}
+41
View File
@@ -759,6 +759,47 @@
.pip { width: calc(100vw - 16px); bottom: 8px; right: 8px; left: 8px; }
}
/* ── SEARCH ───────────────────────────────────────────────────────────────── */
.search-btn {
background: none; border: 1px solid var(--border); border-radius: 4px;
color: var(--text-muted); cursor: pointer; font-size: 14px;
padding: 4px 8px; transition: color .2s, border-color .2s;
}
.search-btn:hover { color: var(--accent); border-color: var(--accent); }
.search-bar {
display: none; align-items: center; gap: 8px;
background: var(--bg-card); border-bottom: 1px solid var(--border);
padding: 8px 16px;
}
.search-bar.visible { display: flex; }
.search-input {
flex: 1; background: var(--bg); border: 1px solid var(--border);
border-radius: 4px; color: var(--text); font-family: inherit;
font-size: 14px; outline: none; padding: 6px 12px;
transition: border-color .2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-muted); }
.search-clear {
background: none; border: none; color: var(--text-muted);
cursor: pointer; font-size: 16px; padding: 4px 8px;
transition: color .2s;
}
.search-clear:hover { color: var(--accent); }
/* Highlight programmes qui matchent */
.program-block.search-match {
border: 1px solid var(--accent);
box-shadow: 0 0 6px var(--accent);
}
.mobile-program.search-match {
border-left: 3px solid var(--accent);
}
</style>
<link id="themeStylesheet" rel="stylesheet" href="themes/default.css">
</head>
+5
View File
@@ -47,6 +47,11 @@ foreach ($theme_files as $file) {
}
?>
</select>
<button class="search-btn" onclick="toggleSearch()" title="Search">&#128269;</button>
<div class="live-dot">LIVE</div>
</div>
<div class="search-bar" id="searchBar">
<input class="search-input" id="searchInput" type="text" placeholder="Search channel or program..." oninput="onSearchInput(this.value)" />
<button class="search-clear" onclick="clearSearch()">&#10005;</button>
</div>