From 11877b63b18f64db49d6a3ddcdf55f32268c56c5 Mon Sep 17 00:00:00 2001 From: hbrain Date: Thu, 4 Jun 2026 15:24:01 +0200 Subject: [PATCH] Compacting layout --- index.php | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index 779ee3f..fa11dd1 100644 --- a/index.php +++ b/index.php @@ -132,6 +132,7 @@ function render_blank_page(){ + @@ -257,7 +258,9 @@ $articleId = trim((string)($_GET['id'] ?? '')); if ($articleId !== '' && (!preg_match('/^[0-9]{14}[a-f0-9]{16}$/', $articleId) || count(array_diff_key($_GET, ['id' => true])) > 0)) { render_404_page(); } -render_blank_page(); +if ($articleId === '') { + render_blank_page(); +} if ($articleId !== '') { $videos = array_values(array_filter($videos, function($v) use ($articleId, $config) { @@ -333,15 +336,19 @@ $baseParams = ($rawKeyword !== '') ? ['q' => $rawKeyword] : []; $defaultOgImageUrl = 'https://bubulescu.org/assets/img/bubulescuorg.jpg'; $ogImageUrl = $defaultOgImageUrl; $ogImageAlt = 'MVLog: journal of an unreliable narrator.'; +$pageTitle = 'MVLog'; if ($articleId !== '') { $customOg = article_og_image_url($articleId); if ($customOg !== '') { $ogImageUrl = $customOg; - if (!empty($slice)) { - $firstVideo = basename((string)$slice[0]); - $firstMeta = $videoCache[$firstVideo]['metadata'] ?? video_metadata($slice[0]); - $firstTitle = trim((string)($firstMeta['title'] ?? '')); - if ($firstTitle !== '') $ogImageAlt = 'MVLog: ' . $firstTitle; + } + if (!empty($slice)) { + $firstVideo = basename((string)$slice[0]); + $firstMeta = $videoCache[$firstVideo]['metadata'] ?? video_metadata($slice[0]); + $firstTitle = trim((string)($firstMeta['title'] ?? '')); + if ($firstTitle !== '') { + $ogImageAlt = 'MVLog: ' . $firstTitle; + $pageTitle = 'MVLog: ' . $firstTitle; } } } @@ -354,7 +361,7 @@ $brandUrl = '?id=' . rawurlencode($articleId); -MVLog +<?=h($pageTitle)?> @@ -392,6 +399,9 @@ $brandUrl = '?id=' . rawurlencode($articleId); .video-row-title a{color:inherit;text-decoration:none} .video-row-title a:hover{text-decoration:underline} .video-row-head-mobile{display:none} +.video-row-head-mobile .video-row-title{margin:0 0 .15rem} +.video-row-head-mobile .meta{margin:0 0 .25rem} +.video-row-head-mobile .description-teaser{margin:.1rem 0 .3rem} .video-info .video-row-title{margin:0 0 .35rem} .video-info .meta{margin:0 0 .45rem} .description-teaser{margin:.15rem 0 .45rem;color:#EADFC9} @@ -413,6 +423,7 @@ $brandUrl = '?id=' . rawurlencode($articleId); #videos .video-info .description{margin-top:.8rem} } +