58 lines
2.8 KiB
PHP
58 lines
2.8 KiB
PHP
<div class="topbar">
|
|
<div class="logo"><?= $group_name ?> <span>/</span><span class="logo-sub"> GridTV</span></div>
|
|
<div class="date-label" id="dateLabel"></div>
|
|
<div class="clock" id="clock">00:00:00</div>
|
|
<div class="nav-btns" id="navBtns">
|
|
<button class="nav-btn" onclick="shiftView(-60)"><?= htmlspecialchars($L["shift_back"]) ?></button>
|
|
<button class="nav-btn active" onclick="centerNow()"><?= htmlspecialchars($L["now"]) ?></button>
|
|
<button class="nav-btn" onclick="shiftView(60)"><?= htmlspecialchars($L["shift_fwd"]) ?></button>
|
|
</div>
|
|
<div class="copy-btns">
|
|
<button class="copy-btn" onclick="copyUrl('epg')" title="<?= htmlspecialchars($L["copy_epg"]) ?>"><?= htmlspecialchars($L["copy_epg"]) ?></button>
|
|
<?php if (!empty($m3u_url)): ?>
|
|
<button class="copy-btn" onclick="copyUrl('m3u')" title="<?= htmlspecialchars($L["copy_m3u"]) ?>"><?= htmlspecialchars($L["copy_m3u"]) ?></button>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php if (count($epg_sources) > 1 || $allow_personal_epg): ?>
|
|
<select class="source-select" id="sourceSelect" onchange="switchSource(this.value)" title="Source EPG">
|
|
<?php foreach ($epg_sources as $i => $src): ?>
|
|
<option value="<?= $i ?>"><?= htmlspecialchars($src['name']) ?></option>
|
|
<?php endforeach; ?>
|
|
<?php if ($allow_personal_epg): ?>
|
|
<option value="personal">✏ Personal EPG</option>
|
|
<?php endif; ?>
|
|
</select>
|
|
<?php endif; ?>
|
|
<select class="theme-select" id="themeSelect" onchange="setTheme(this.value)" title="Thème">
|
|
<?php
|
|
$theme_dir = __DIR__ . '/../../themes';
|
|
$theme_files = glob($theme_dir . '/*.css');
|
|
// default en premier, puis le reste par ordre alphabétique
|
|
usort($theme_files, function($a, $b) {
|
|
$a_base = basename($a, '.css');
|
|
$b_base = basename($b, '.css');
|
|
if ($a_base === 'default') return -1;
|
|
if ($b_base === 'default') return 1;
|
|
return strcmp($a_base, $b_base);
|
|
});
|
|
foreach ($theme_files as $file) {
|
|
$slug = basename($file, '.css');
|
|
$css = file_get_contents($file);
|
|
// Lire @name et @emoji dans le premier bloc commentaire
|
|
preg_match('/@name\s+(.+)/u', $css, $m_name);
|
|
preg_match('/@emoji\s+(\S+)/u', $css, $m_emoji);
|
|
$name = isset($m_name[1]) ? trim($m_name[1]) : ucfirst($slug);
|
|
$emoji = isset($m_emoji[1]) ? trim($m_emoji[1]) : '🎨';
|
|
echo ' <option value="' . htmlspecialchars($slug) . '">' . $emoji . ' ' . $name . '</option>' . "\n";
|
|
}
|
|
?>
|
|
</select>
|
|
<button class="search-btn" onclick="toggleSearch()" title="Search">🔍</button>
|
|
<div class="live-dot"><?= htmlspecialchars($L["live"]) ?></div>
|
|
</div>
|
|
<div class="search-bar" id="searchBar">
|
|
<input class="search-input" id="searchInput" type="text" placeholder="<?= htmlspecialchars($L["search_placeholder"]) ?>" oninput="onSearchInput(this.value)" />
|
|
<button class="search-clear" onclick="clearSearch()">✕</button>
|
|
</div>
|
|
|