Add stats page, SEO improvements, and auto-sitemap updates
- Add podcast_stats.py with --json/--upload flags for BunnyCDN - Add website/stats.html fetching stats from CDN - Add stats CSS styles - SEO: shorten title/description, add og:site_name, twitter cards, theme-color, image dimensions, consistent favicons and cache-busting - Add all episode transcript pages to sitemap.xml with lastmod - Auto-add new episodes to sitemap in publish_episode.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -992,6 +992,154 @@ a:hover {
|
||||
color: var(--accent-hover);
|
||||
}
|
||||
|
||||
/* Stats Page */
|
||||
.stats-updated {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.stats-container {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1.5rem 3rem;
|
||||
}
|
||||
|
||||
.stats-loading, .stats-error {
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
.stats-error {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.stats-section {
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.stats-section h2 {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid #2a2015;
|
||||
}
|
||||
|
||||
.stats-summary {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.stat-big {
|
||||
background: var(--bg-light);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 1.25rem 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
flex: 1;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.stat-number {
|
||||
font-size: 1.75rem;
|
||||
font-weight: 800;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.stats-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.stats-list-item {
|
||||
background: var(--bg-light);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 0.85rem 1.15rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.stats-list-title {
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.stats-list-meta {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.stats-reviews {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.review-card {
|
||||
background: var(--bg-light);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 1.15rem;
|
||||
border-left: 3px solid var(--accent);
|
||||
}
|
||||
|
||||
.review-stars {
|
||||
color: var(--accent);
|
||||
font-size: 1.1rem;
|
||||
letter-spacing: 2px;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
|
||||
.review-title {
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
.review-content {
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.6;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.review-meta {
|
||||
font-size: 0.75rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.stats-empty {
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.stats-link {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.stats-link a {
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stats-link a:hover {
|
||||
color: var(--accent-hover);
|
||||
}
|
||||
|
||||
/* Desktop */
|
||||
@media (min-width: 768px) {
|
||||
.hero {
|
||||
@@ -1036,4 +1184,8 @@ a:hover {
|
||||
.diagram-row-split {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.stats-container {
|
||||
padding: 0 2rem 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,16 +3,22 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="theme-color" content="#1a1209">
|
||||
<title id="page-title">Episode — Luke at the Roost</title>
|
||||
<meta name="description" id="page-description" content="Full transcript of this episode of Luke at the Roost, the late-night call-in radio show.">
|
||||
<link rel="canonical" id="page-canonical" href="https://lukeattheroost.com/episode.html">
|
||||
|
||||
<!-- OG / Social -->
|
||||
<meta property="og:site_name" content="Luke at the Roost">
|
||||
<meta property="og:title" id="og-title" content="Episode — Luke at the Roost">
|
||||
<meta property="og:description" id="og-description" content="Full transcript of this episode of Luke at the Roost.">
|
||||
<meta property="og:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
<meta property="og:url" id="og-url" content="https://lukeattheroost.com/episode.html">
|
||||
<meta property="og:type" content="article">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" id="tw-title" content="Episode — Luke at the Roost">
|
||||
<meta name="twitter:description" id="tw-description" content="Full transcript of this episode of Luke at the Roost.">
|
||||
<meta name="twitter:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
@@ -21,7 +27,7 @@
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="Luke at the Roost RSS Feed" href="https://podcast.macneilmediagroup.com/@LukeAtTheRoost/feed.xml">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/style.css?v=2">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -4,18 +4,27 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>How It Works — Luke at the Roost</title>
|
||||
<meta name="description" content="How Luke at the Roost works: AI-generated callers with unique personalities, real phone calls, voice synthesis, multi-stem recording, automated post-production, and CDN-powered global distribution — all built from scratch.">
|
||||
<meta name="description" content="How Luke at the Roost works: AI-generated callers with unique personalities, real phone calls, voice synthesis, multi-stem recording, and automated post-production.">
|
||||
<meta name="theme-color" content="#1a1209">
|
||||
<link rel="canonical" href="https://lukeattheroost.com/how-it-works">
|
||||
|
||||
<meta property="og:site_name" content="Luke at the Roost">
|
||||
<meta property="og:title" content="How It Works — Luke at the Roost">
|
||||
<meta property="og:description" content="The tech behind a one-of-a-kind AI radio show: real-time caller generation, multi-stem recording, automated post-production, and global CDN distribution — all custom-built.">
|
||||
<meta property="og:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
<meta property="og:url" content="https://lukeattheroost.com/how-it-works">
|
||||
<meta property="og:type" content="website">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="How It Works — Luke at the Roost">
|
||||
<meta name="twitter:description" content="The tech behind a one-of-a-kind AI radio show: real-time caller generation, multi-stem recording, automated post-production, and global CDN distribution.">
|
||||
<meta name="twitter:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 4c-2 0-4 2-4 5 0 1 .3 2 .8 3C26 13 24 16 24 20c0 2 .5 4 1.5 5.5L22 28c-2 1-4 3-5 6l-3 10c-.5 2 .5 3 2 3h4l1-4 2 4h6l-1-6 3 6h6l-1-6 3 6h4c1.5 0 2.5-1 2-3l-3-10c-1-3-3-5-5-6l-3.5-2.5C35.5 24 36 22 36 20c0-4-2-7-4.8-8 .5-1 .8-2 .8-3 0-3-2-5-4-5z' fill='%23e8791d'/%3E%3Ccircle cx='30' cy='17' r='1.5' fill='%231a1209'/%3E%3Cpath d='M36 15c1-1 3-1 4 0s1 3 0 4' fill='none' stroke='%23cc2222' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M28 22c2 1 4 1 6 0' fill='none' stroke='%23e8791d' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E">
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16.png">
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/style.css?v=2">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -483,6 +492,7 @@
|
||||
<footer class="footer">
|
||||
<div class="footer-links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/stats">Stats</a>
|
||||
<a href="https://open.spotify.com/show/0ZrpMigG1fo0CCN7F4YmuF?si=f990713adce84ba4" target="_blank" rel="noopener">Spotify</a>
|
||||
<a href="https://www.youtube.com/watch?v=xryGLifMBTY&list=PLGq4uZyNV1yYH_rcitTTPVysPbC6-7pe-" target="_blank" rel="noopener">YouTube</a>
|
||||
<a href="https://podcast.macneilmediagroup.com/@LukeAtTheRoost/feed.xml" target="_blank" rel="noopener">RSS</a>
|
||||
|
||||
@@ -3,20 +3,21 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Luke at the Roost — The call-in talk show where Luke gives life advice to biologically questionable organisms</title>
|
||||
<meta name="description" content="Luke at the Roost is a late-night call-in radio show broadcast from a desert hermit's RV, featuring a mix of real callers and AI-generated callers talking to Luke about life, love, and everything in between. Call in live: 208-439-LUKE (208-439-5853). Listen on Spotify, Apple Podcasts, and YouTube.">
|
||||
<meta name="keywords" content="Luke at the Roost, podcast, call-in radio show, AI radio, life advice, late night radio, comedy podcast, luke macneil">
|
||||
<title>Luke at the Roost — AI Call-In Comedy Podcast</title>
|
||||
<meta name="description" content="Late-night call-in radio from a desert hermit's RV. Real callers and AI-generated characters talk to Luke about life, love, and everything in between. Call in: 208-439-LUKE.">
|
||||
<meta name="theme-color" content="#1a1209">
|
||||
<link rel="canonical" href="https://lukeattheroost.com">
|
||||
|
||||
<!-- OG / Social -->
|
||||
<meta property="og:title" content="Luke at the Roost — Life advice for biologically questionable organisms">
|
||||
<meta property="og:description" content="The call-in talk show where Luke gives life advice to biologically questionable organisms — from a desert hermit's RV. Call in: 208-439-LUKE.">
|
||||
<meta property="og:site_name" content="Luke at the Roost">
|
||||
<meta property="og:title" content="Luke at the Roost — AI Call-In Comedy Podcast">
|
||||
<meta property="og:description" content="Late-night call-in radio from a desert hermit's RV. Real callers and AI characters talk to Luke about life, love, and everything in between.">
|
||||
<meta property="og:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
<meta property="og:url" content="https://lukeattheroost.com">
|
||||
<meta property="og:type" content="website">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Luke at the Roost">
|
||||
<meta name="twitter:description" content="The call-in talk show where Luke gives life advice to biologically questionable organisms. Call in: 208-439-LUKE">
|
||||
<meta name="twitter:title" content="Luke at the Roost — AI Call-In Comedy Podcast">
|
||||
<meta name="twitter:description" content="Late-night call-in radio from a desert hermit's RV. Real callers and AI characters talk to Luke about life, love, and everything in between.">
|
||||
<meta name="twitter:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
|
||||
<!-- Favicon -->
|
||||
@@ -60,7 +61,7 @@
|
||||
|
||||
<!-- Banner -->
|
||||
<div class="banner">
|
||||
<img src="images/banner.png" alt="Luke at the Roost — ON AIR" class="banner-img">
|
||||
<img src="images/banner.png" alt="Luke at the Roost — ON AIR" class="banner-img" width="1500" height="500">
|
||||
</div>
|
||||
|
||||
<!-- Hero -->
|
||||
@@ -70,6 +71,8 @@
|
||||
class="cover-art"
|
||||
src="images/cover.png"
|
||||
alt="Luke at the Roost cover art"
|
||||
width="1440"
|
||||
height="1440"
|
||||
>
|
||||
<div class="hero-info">
|
||||
<h1>Luke at the Roost</h1>
|
||||
@@ -198,6 +201,7 @@
|
||||
<footer class="footer">
|
||||
<div class="footer-links">
|
||||
<a href="/how-it-works">How It Works</a>
|
||||
<a href="/stats">Stats</a>
|
||||
<a href="https://open.spotify.com/show/0ZrpMigG1fo0CCN7F4YmuF?si=f990713adce84ba4" target="_blank" rel="noopener">Spotify</a>
|
||||
<a href="https://www.youtube.com/watch?v=xryGLifMBTY&list=PLGq4uZyNV1yYH_rcitTTPVysPbC6-7pe-" target="_blank" rel="noopener">YouTube</a>
|
||||
<a href="https://podcast.macneilmediagroup.com/@LukeAtTheRoost/feed.xml" target="_blank" rel="noopener">RSS</a>
|
||||
|
||||
@@ -2,7 +2,68 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com</loc>
|
||||
<lastmod>2026-02-11</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/how-it-works</loc>
|
||||
<lastmod>2026-02-11</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/stats</loc>
|
||||
<lastmod>2026-02-11</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>0.6</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=episode-8-real-news-or-fake-news</loc>
|
||||
<lastmod>2026-02-11</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=episode-7-ai-takeover-and-honey-endurance</loc>
|
||||
<lastmod>2026-02-10</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=episode-6-late-night-woes-and-cosmic-contemplations</loc>
|
||||
<lastmod>2026-02-09</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=episode-5-cosmic-theories-and-calling-for-change</loc>
|
||||
<lastmod>2026-02-08</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=episode-4-navigating-life-s-challenges</loc>
|
||||
<lastmod>2026-02-07</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=episode-3-desire-burnout-and-friendship-woes</loc>
|
||||
<lastmod>2026-02-06</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=episode-2-late-night-confessions</loc>
|
||||
<lastmod>2026-02-05</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://lukeattheroost.com/episode.html?slug=quantum-physics-pluto-relationship-blunders</loc>
|
||||
<lastmod>2026-02-04</lastmod>
|
||||
<changefreq>never</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
|
||||
201
website/stats.html
Normal file
201
website/stats.html
Normal file
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Podcast Stats & Downloads — Luke at the Roost</title>
|
||||
<meta name="description" content="Podcast stats for Luke at the Roost — total downloads, unique listeners, Apple Podcasts reviews, YouTube views and subscribers, updated daily.">
|
||||
<meta name="theme-color" content="#1a1209">
|
||||
<link rel="canonical" href="https://lukeattheroost.com/stats">
|
||||
|
||||
<meta property="og:site_name" content="Luke at the Roost">
|
||||
<meta property="og:title" content="Podcast Stats & Downloads — Luke at the Roost">
|
||||
<meta property="og:description" content="Podcast stats for Luke at the Roost — total downloads, unique listeners, Apple Podcasts reviews, YouTube views and subscribers, updated daily.">
|
||||
<meta property="og:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
<meta property="og:url" content="https://lukeattheroost.com/stats">
|
||||
<meta property="og:type" content="website">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Podcast Stats & Downloads — Luke at the Roost">
|
||||
<meta name="twitter:description" content="Podcast stats for Luke at the Roost — total downloads, unique listeners, Apple Podcasts reviews, YouTube views and subscribers, updated daily.">
|
||||
<meta name="twitter:image" content="https://cdn.lukeattheroost.com/media/podcasts/LukeAtTheRoost/cover_feed.png?v=3">
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16.png">
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
|
||||
<link rel="stylesheet" href="css/style.css?v=2">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Nav -->
|
||||
<nav class="page-nav">
|
||||
<a href="/" class="nav-home">Luke at the Roost</a>
|
||||
</nav>
|
||||
|
||||
<!-- Page Header -->
|
||||
<section class="page-header">
|
||||
<h1>Stats</h1>
|
||||
<p class="page-subtitle">Downloads, reviews, and audience numbers across all platforms.</p>
|
||||
<p class="stats-updated" id="stats-updated"></p>
|
||||
</section>
|
||||
|
||||
<!-- Stats Content -->
|
||||
<div class="stats-container" id="stats-container">
|
||||
<div class="stats-loading" id="stats-loading">Loading stats...</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="footer-links">
|
||||
<a href="/">Home</a>
|
||||
<a href="/how-it-works">How It Works</a>
|
||||
<a href="https://open.spotify.com/show/0ZrpMigG1fo0CCN7F4YmuF?si=f990713adce84ba4" target="_blank" rel="noopener">Spotify</a>
|
||||
<a href="https://www.youtube.com/watch?v=xryGLifMBTY&list=PLGq4uZyNV1yYH_rcitTTPVysPbC6-7pe-" target="_blank" rel="noopener">YouTube</a>
|
||||
<a href="https://podcast.macneilmediagroup.com/@LukeAtTheRoost/feed.xml" target="_blank" rel="noopener">RSS</a>
|
||||
</div>
|
||||
<div class="footer-projects">
|
||||
<span class="footer-projects-label">More from Luke</span>
|
||||
<div class="footer-projects-links">
|
||||
<a href="https://macneilmediagroup.com" target="_blank" rel="noopener">MacNeil Media Group</a>
|
||||
<a href="https://prints.macneilmediagroup.com" target="_blank" rel="noopener">Photography Prints</a>
|
||||
<a href="https://youtube.com/lukemacneil" target="_blank" rel="noopener">YouTube</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="footer-contact">Sales & Collaboration: <a href="mailto:luke@macneilmediagroup.com">luke@macneilmediagroup.com</a></p>
|
||||
<p>© 2026 Luke at the Roost</p>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
(async function() {
|
||||
const container = document.getElementById('stats-container');
|
||||
const loading = document.getElementById('stats-loading');
|
||||
const updatedEl = document.getElementById('stats-updated');
|
||||
|
||||
try {
|
||||
const resp = await fetch('https://cdn.lukeattheroost.com/stats.json');
|
||||
if (!resp.ok) throw new Error('Failed to load stats');
|
||||
const data = await resp.json();
|
||||
|
||||
if (data.updated_at) {
|
||||
const d = new Date(data.updated_at);
|
||||
updatedEl.textContent = 'Last updated ' + d.toLocaleDateString('en-US', {
|
||||
month: 'long', day: 'numeric', year: 'numeric',
|
||||
hour: 'numeric', minute: '2-digit', timeZoneName: 'short'
|
||||
});
|
||||
}
|
||||
|
||||
let html = '';
|
||||
|
||||
// Downloads (Castopod)
|
||||
if (data.castopod) {
|
||||
const c = data.castopod;
|
||||
html += '<section class="stats-section">';
|
||||
html += '<h2>Downloads</h2>';
|
||||
html += '<div class="stats-summary">';
|
||||
html += '<div class="stat-big"><span class="stat-number">' + (c.total_downloads || 0).toLocaleString() + '</span><span class="stat-label">Total Downloads</span></div>';
|
||||
html += '<div class="stat-big"><span class="stat-number">' + (c.unique_listeners || 0).toLocaleString() + '</span><span class="stat-label">Unique Listeners</span></div>';
|
||||
html += '</div>';
|
||||
if (c.episodes && c.episodes.length) {
|
||||
html += '<div class="stats-list">';
|
||||
c.episodes.forEach(function(ep) {
|
||||
html += '<div class="stats-list-item">';
|
||||
html += '<span class="stats-list-title">' + escapeHtml(ep.title) + '</span>';
|
||||
html += '<span class="stats-list-meta">' + (ep.downloads || 0).toLocaleString() + ' downloads · ' + escapeHtml(ep.date) + '</span>';
|
||||
html += '</div>';
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
html += '</section>';
|
||||
}
|
||||
|
||||
// Apple Reviews
|
||||
if (data.apple) {
|
||||
const a = data.apple;
|
||||
html += '<section class="stats-section">';
|
||||
html += '<h2>Apple Podcasts</h2>';
|
||||
if (a.review_count > 0) {
|
||||
html += '<div class="stats-summary">';
|
||||
html += '<div class="stat-big"><span class="stat-number">' + (a.avg_rating || 0) + '/5</span><span class="stat-label">Average Rating</span></div>';
|
||||
html += '<div class="stat-big"><span class="stat-number">' + a.review_count + '</span><span class="stat-label">Reviews</span></div>';
|
||||
html += '</div>';
|
||||
if (a.reviews && a.reviews.length) {
|
||||
html += '<div class="stats-reviews">';
|
||||
a.reviews.forEach(function(r) {
|
||||
const stars = '\u2605'.repeat(r.rating) + '\u2606'.repeat(5 - r.rating);
|
||||
html += '<div class="review-card">';
|
||||
html += '<div class="review-stars">' + stars + '</div>';
|
||||
html += '<div class="review-title">' + escapeHtml(r.title) + '</div>';
|
||||
if (r.content && r.content !== r.title) {
|
||||
html += '<div class="review-content">' + escapeHtml(r.content) + '</div>';
|
||||
}
|
||||
html += '<div class="review-meta">' + escapeHtml(r.author) + ' · ' + escapeHtml(r.date) + ' · ' + escapeHtml(r.storefront) + '</div>';
|
||||
html += '</div>';
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
} else {
|
||||
html += '<p class="stats-empty">No reviews yet</p>';
|
||||
}
|
||||
html += '</section>';
|
||||
}
|
||||
|
||||
// Spotify
|
||||
if (data.spotify) {
|
||||
const s = data.spotify;
|
||||
html += '<section class="stats-section">';
|
||||
html += '<h2>Spotify</h2>';
|
||||
html += '<div class="stats-summary">';
|
||||
if (s.rating) {
|
||||
html += '<div class="stat-big"><span class="stat-number">' + s.rating + '/5</span><span class="stat-label">Rating</span></div>';
|
||||
} else {
|
||||
html += '<div class="stat-big"><span class="stat-number">—</span><span class="stat-label">Rating (not public)</span></div>';
|
||||
}
|
||||
html += '</div>';
|
||||
if (s.url) {
|
||||
html += '<p class="stats-link"><a href="' + escapeHtml(s.url) + '" target="_blank" rel="noopener">Listen on Spotify</a></p>';
|
||||
}
|
||||
html += '</section>';
|
||||
}
|
||||
|
||||
// YouTube
|
||||
if (data.youtube) {
|
||||
const y = data.youtube;
|
||||
html += '<section class="stats-section">';
|
||||
html += '<h2>YouTube</h2>';
|
||||
html += '<div class="stats-summary">';
|
||||
html += '<div class="stat-big"><span class="stat-number">' + (y.total_views || 0).toLocaleString() + '</span><span class="stat-label">Views</span></div>';
|
||||
html += '<div class="stat-big"><span class="stat-number">' + (y.total_likes || 0).toLocaleString() + '</span><span class="stat-label">Likes</span></div>';
|
||||
html += '<div class="stat-big"><span class="stat-number">' + (y.total_comments || 0).toLocaleString() + '</span><span class="stat-label">Comments</span></div>';
|
||||
if (y.subscribers != null) {
|
||||
html += '<div class="stat-big"><span class="stat-number">' + y.subscribers.toLocaleString() + '</span><span class="stat-label">Subscribers</span></div>';
|
||||
}
|
||||
html += '</div>';
|
||||
if (y.videos && y.videos.length) {
|
||||
html += '<div class="stats-list">';
|
||||
y.videos.forEach(function(v) {
|
||||
html += '<div class="stats-list-item">';
|
||||
html += '<span class="stats-list-title">' + escapeHtml(v.title) + '</span>';
|
||||
html += '<span class="stats-list-meta">' + (v.views || 0).toLocaleString() + ' views · ' + (v.likes || 0).toLocaleString() + ' likes · ' + escapeHtml(v.date) + '</span>';
|
||||
html += '</div>';
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
html += '</section>';
|
||||
}
|
||||
|
||||
loading.style.display = 'none';
|
||||
container.innerHTML = html;
|
||||
} catch (e) {
|
||||
loading.textContent = 'Unable to load stats. Try again later.';
|
||||
loading.className = 'stats-error';
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
if (!str) return '';
|
||||
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user