Add configuration system
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<section class="channel">
|
||||
<div class="channel-header">
|
||||
<?= htmlspecialchars($channel['name']) ?>
|
||||
</div>
|
||||
|
||||
<?php if (!$programmes): ?>
|
||||
<div class="programme">
|
||||
<div class="programme-desc">Keine Sendungen gefunden.</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php foreach ($programmes as $p): ?>
|
||||
<?php View::render('programme', ['p' => $p]); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php if (!$channels): ?>
|
||||
<div class="empty">
|
||||
Keine Sender gefunden. Prüfe <code>/opt/tvguide-docker/epg/guide.xml</code>.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ($channels as $channelId => $channel): ?>
|
||||
<?php View::render('channel', [
|
||||
'channelId' => $channelId,
|
||||
'channel' => $channel,
|
||||
'programmes' => $programmes[$channelId] ?? []
|
||||
]); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?= htmlspecialchars($title ?? 'TVGuide') ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="/assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<h1>TVGuide</h1>
|
||||
<nav>
|
||||
<a href="/">Heute</a>
|
||||
<a href="/?view=now">Jetzt</a>
|
||||
<a href="/?view=primetime">20:15</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<?php require $contentTemplate; ?>
|
||||
</main>
|
||||
|
||||
<script src="/assets/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<div class="programme">
|
||||
<div class="programme-time">
|
||||
<?= $p['start']->format('H:i') ?> – <?= $p['stop']->format('H:i') ?>
|
||||
</div>
|
||||
|
||||
<div class="programme-title">
|
||||
<?= htmlspecialchars($p['title']) ?>
|
||||
</div>
|
||||
|
||||
<?php if ($p['desc']): ?>
|
||||
<div class="programme-desc">
|
||||
<?= htmlspecialchars($p['desc']) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($p['category']): ?>
|
||||
<span class="category"><?= htmlspecialchars($p['category']) ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user