- Descriptions now render Markdown or sanitized HTML via [includes/db.php](/Users/tyemeclifford/Documents/GH/mediaplayer/includes/db.php).

Public player descriptions render formatted HTML on the homepage.
Catalogue cards, embed meta tags, and social metadata use safe 
plain-text excerpts.
Add/edit admin pages now use a rich description editor that preserves 
pasted HTML styling, with a textarea fallback for no-JS.
External/YouTube-imported descriptions are sanitized before storage.
README now documents Markdown/HTML description support.
This commit is contained in:
Ty Clifford
2026-07-01 15:41:01 -04:00
parent e9369e242c
commit 6a1c545f35
11 changed files with 787 additions and 17 deletions
+6 -2
View File
@@ -68,7 +68,7 @@ if ($home_live_first) {
} else {
$share_title = $video ? $video['title'] . ' — ' . $site_title : 'Media — ' . $site_title;
$share_description = $video && trim($video['description'] ?? '') !== ''
? trim($video['description'])
? media_description_plain_text($video['description'])
: setting('site_sub', 'tyclifford.com / media');
$share_url = $video ? public_absolute_url(public_video_url($video['slug'])) : public_absolute_url(public_home_url());
$share_image = ($video && !empty($video['thumbnail'])) ? public_absolute_url(public_media_url($video['thumbnail'])) : '';
@@ -212,6 +212,10 @@ render_head($share_title, '
.home-mode-panel[hidden] { display:none; }
.live-footer { justify-content:space-between; }
.live-footer .stream-meta { max-width:60ch; line-height:1.5; letter-spacing:.06em; }
.stream-description {
flex:1 1 100%; max-width:min(72ch, 100%);
font-size:.8rem;
}
/* ── Lower grid ── */
.lower-grid { display:grid; grid-template-columns:1fr; gap:1rem; }
@@ -370,7 +374,7 @@ render_head($share_title, '
<div class="stream-footer">
<p class="eyebrow eyebrow-green"><?= $video ? h($video['title']) : 'Media Player' ?></p>
<?php if ($video && $video['description']): ?>
<p class="stream-meta" style="font-family:Inter,sans-serif;font-size:.78rem;color:var(--text-2);letter-spacing:0;max-width:60ch;line-height:1.5"><?= h($video['description']) ?></p>
<div class="stream-description media-description"><?= media_description_html($video['description']) ?></div>
<?php endif; ?>
<?php
$stream_meta = [];