Store an episode_title on each broadcast, settable from the dashboard or with set_show.php --title=, and show it under the show name on index.php and under the heading on live.php. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
209 lines
9.8 KiB
PHP
Executable File
209 lines
9.8 KiB
PHP
Executable File
<?php
|
|
require __DIR__ . '/includes/db.php';
|
|
require __DIR__ . '/includes/broadcasts.php';
|
|
|
|
// The sidebar falls back to a general note if the database is unavailable
|
|
$show = null;
|
|
try {
|
|
$show = currentShow(getDB());
|
|
} catch (Throwable $e) {
|
|
}
|
|
|
|
$icon = '';
|
|
$paragraphs = [];
|
|
$when = [];
|
|
if ($show) {
|
|
if ($show['icon_image'] && is_file(__DIR__ . '/images/backgrounds/' . basename($show['icon_image']))) {
|
|
$icon = 'images/backgrounds/' . rawurlencode(basename($show['icon_image']));
|
|
}
|
|
// Blank lines in the description separate paragraphs
|
|
if ($show['description']) {
|
|
$paragraphs = preg_split('/\n\s*\n/', trim($show['description']));
|
|
}
|
|
// e.g. "Friday, October 30, 2026" / "7:30pm Eastern" / "(23:30 UTC)", naming the UTC day when it differs
|
|
if (!$show['started_at'] && $show['scheduled_at']) {
|
|
$local = utcToStationTime($show['scheduled_at']);
|
|
$utc = new DateTimeImmutable($show['scheduled_at'], new DateTimeZone('UTC'));
|
|
$when = [
|
|
$local->format('l, F j, Y'),
|
|
$local->format($local->format('i') === '00' ? 'ga' : 'g:ia') . ' ' . STATION_TIMEZONE_LABEL,
|
|
'(' . $utc->format('H:i') . ' UTC' . ($utc->format('Y-m-d') !== $local->format('Y-m-d') ? ', ' . $utc->format('l') : '') . ')',
|
|
];
|
|
}
|
|
}
|
|
?>
|
|
<!DOCTYPE HTML>
|
|
<!--
|
|
RFE NEW SITE
|
|
Strata by HTML5 UP
|
|
html5up.net | @ajlkn
|
|
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>Radio Free Elsewhere</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
|
|
|
<meta name="description" content="Something different. Somewhere else.">
|
|
|
|
<!-- Facebook Meta Tags -->
|
|
<meta property="og:url" content="https://cyberpunklibrarian.nohost.me/rfe/">
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:title" content="Radio Free Elsewhere">
|
|
<meta property="og:description" content="Something different. Somewhere else.">
|
|
<meta property="og:image" content="https://cyberpunklibrarian.nohost.me/rfe/images/rfe-social.jpg">
|
|
|
|
<!-- Twitter Meta Tags -->
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta property="twitter:domain" content="cyberpunklibrarian.nohost.me">
|
|
<meta property="twitter:url" content="https://cyberpunklibrarian.nohost.me/rfe/">
|
|
<meta name="twitter:title" content="Radio Free Elsewhere">
|
|
<meta name="twitter:description" content="Something different. Somewhere else.">
|
|
<meta name="twitter:image" content="https://cyberpunklibrarian.nohost.me/rfe/images/rfe-social.jpg">
|
|
|
|
<link rel="stylesheet" href="assets/css/main.css" />
|
|
|
|
<style>
|
|
.player-wrapper {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
margin: 0 auto;
|
|
}
|
|
#now-playing img {
|
|
margin: 0 auto;
|
|
}
|
|
.player-wrapper audio {
|
|
width: 100%;
|
|
}
|
|
#now-playing {
|
|
font-family: Arial, sans-serif;
|
|
font-size: .9em;
|
|
padding: 10px;
|
|
background-color: rgb(70, 73, 74, 0.6);
|
|
color: #97C9D3;
|
|
border-radius: 5px;
|
|
display: block;
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="is-preload">
|
|
<!-- BEGIN LEFT SIDE BAR -->
|
|
<!-- Header -->
|
|
<header id="header">
|
|
<div class="inner">
|
|
<a href="#" class="image avatar"><img src="images/avatar-rfe.jpg" alt="Radio Free Elsewhere logo" /></a>
|
|
<h1><strong>Radio Free Elsewhere</strong><br>
|
|
Something different<br>
|
|
Somewhere else</h1>
|
|
<hr>
|
|
|
|
<!-- Upcoming & Schedule -->
|
|
<section id="one">
|
|
<header class="major">
|
|
<h3><?= $show && $show['started_at'] ? 'On the Air Now' : 'Upcoming Schedule' ?></h3>
|
|
</header>
|
|
<!-- The queued (or live) show comes from the database: queue it on the admin dashboard.
|
|
The commented-out blocks below are the hand-written history from before that. -->
|
|
<?php if ($show): ?>
|
|
<div class="show-heading">
|
|
<?php if ($icon !== ''): ?>
|
|
<?php if ($show['started_at']): ?>
|
|
<a href="live.php" class="image left"><img src="<?= htmlspecialchars($icon, ENT_QUOTES, 'UTF-8') ?>" alt="<?= htmlspecialchars($show['name'], ENT_QUOTES, 'UTF-8') ?> logo" /></a>
|
|
<?php else: ?>
|
|
<span class="image left"><img src="<?= htmlspecialchars($icon, ENT_QUOTES, 'UTF-8') ?>" alt="<?= htmlspecialchars($show['name'], ENT_QUOTES, 'UTF-8') ?> logo" /></span>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<h3><?= htmlspecialchars($show['name'], ENT_QUOTES, 'UTF-8') ?></h3>
|
|
<?php if ($show['episode_title']): ?>
|
|
<p class="episode-title"><em><?= htmlspecialchars($show['episode_title'], ENT_QUOTES, 'UTF-8') ?></em></p>
|
|
<?php endif; ?>
|
|
<?php if ($show['started_at']): ?>
|
|
<p><strong><a href="live.php">Broadcasting Live</a></strong></p>
|
|
<?php elseif ($when): ?>
|
|
<p><strong><?= implode('<br>', array_map(fn($line) => htmlspecialchars($line, ENT_QUOTES, 'UTF-8'), $when)) ?></strong></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
<hr>
|
|
<?php foreach ($paragraphs as $paragraph): ?>
|
|
<p><?= nl2br(htmlspecialchars($paragraph, ENT_QUOTES, 'UTF-8')) ?></p>
|
|
<?php endforeach; ?>
|
|
<?php else: ?>
|
|
<p>Nothing is scheduled just now. Follow along on <a href="https://masto.hackers.town/@cyberpunklibrarian">Mastodon</a> or <a href="https://bsky.app/profile/cyberpunklibrarian.bsky.social">Bluesky</a> to hear when we're going live next.</p>
|
|
<?php endif; ?>
|
|
|
|
</section>
|
|
<hr>
|
|
<p><span style = "color:white;">Add <a href="https://radio.cyberpunklibrarian.nohost.me/rfe">RFE</a> to VLC or your favourite Internet radio app.</span></p>
|
|
</header>
|
|
<!-- END LEFT SIDE BAR -->
|
|
|
|
<!-- Main -->
|
|
<div id="main">
|
|
|
|
<!-- About -->
|
|
<section id="two">
|
|
<header class="major">
|
|
<h2>About</h2>
|
|
</header>
|
|
<p>Radio Free Elsewhere goes live a few times per week, usually in the evenings around 7:30pm, Eastern (UTC-6:00). The typical stream length is two hours or so, but durations can vary. Check us out for eclectic, different sorts of music you won't typically hear out in the world. Celtic folk, ambient and space, and surf rock. How are those genres connected? Well that's the easy part....</p>
|
|
|
|
<p>We connect them right here.</p>
|
|
|
|
<p>Follow me on the socials to know when we're going live:</p>
|
|
|
|
<ul>
|
|
<li>Cyberpunk Librarian - <a href="https://masto.hackers.town/@cyberpunklibrarian">Mastodon</a></li>
|
|
<li>Cyberpunk Librarian - <a href="https://bsky.app/profile/cyberpunklibrarian.bsky.social">Bluesky</a></li>
|
|
</ul>
|
|
|
|
<p>I'll try and give as much notice as I can before pushing the button. Goddess willing, maybe I'll get a schedule in place sometime soon. But if you miss the stream, you can always <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere">find it in the archive</a> and <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere/feed.xml">subscribe to the show</a> in your podcast app of choice. <a href="https://podcasts.cyberpunklibrarian.nohost.me/@radiofreeelsewhere/follow">Follow the archive on the Fediverse</a> and you'll be alerted every time a new episode drops into the feed! In the meantime, tune in when you can, and thanks for being here.</p>
|
|
|
|
<h3>Shows</h3>
|
|
<p>Currently, we've got five shows that can go live, depending on what we're feeling at the time. Chances are good we'll add a couple more, but for now, you can tune in for:<br>
|
|
<ul>
|
|
<li>👩🎤 <strong>The Bollocks</strong> - Punk rock bangers from the well-known to the deep cuts you don't hear every day.</li>
|
|
<li>🏄♀️ <strong>Bisexual Surfers from the Twilight of Time</strong> - "Surf's up," they said. And off in the far distance, we heard the screams of pleasure.</li>
|
|
<li>🌌 <strong>Cosmoeuhporia</strong> - Audio psychedelia and musical LSD brought to you from the depths of outer, and inner, space. </li>
|
|
<li>🍻 <strong>O'Morain's Pub</strong> - Celtic folk from both sides of the Atlantic, from the old countries to the new world.</li>
|
|
<li>🔊 <strong>The Spin</strong> - The Spin is something a bit different in that it's the playlist of new and newly recommended music we're checking out right now. Easily the most eclectic show because you never know what you're going to hear.</li>
|
|
</ul>
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<footer id="footer">
|
|
<div class="inner">
|
|
<ul class="icons">
|
|
<li><a href="https://masto.hackers.town/@cyberpunklibrarian" class="icon brands fa-mastodon"><span class="label">Mastodon</span></a></li>
|
|
<li><a href="https://cyberpunklibrarian.nohost.me/gitea/Public/radio-free-elsewhere" class="icon brands fa-gitlab"><span class="label">Github</span></a></li>
|
|
</ul>
|
|
<ul class="copyright">
|
|
<li>© 2025 CC-By-NC-SA</li>
|
|
<li>Tanglewood Hill Studio</li>
|
|
<li><a href="http://html5up.net">HTML5 UP</a></li>
|
|
</ul>
|
|
</div>
|
|
</footer>
|
|
|
|
<!-- Scripts -->
|
|
<script src="assets/js/jquery.min.js"></script>
|
|
<script src="assets/js/jquery.poptrox.min.js"></script>
|
|
<script src="assets/js/browser.min.js"></script>
|
|
<script src="assets/js/breakpoints.min.js"></script>
|
|
<script src="assets/js/util.js"></script>
|
|
<script src="assets/js/main.js"></script>
|
|
<script>
|
|
if ('addEventListener' in window) {
|
|
document.addEventListener('DOMContentLoaded', function() { document.body.className = document.body.className.replace(/\bis-preload\b/, ''); });
|
|
document.body.className += (navigator.userAgent.match(/(MSIE|rv:11\.0)/) ? ' is-ie' : '');
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|