From 0efbb4b2b565fad46ac3f449e92e2997adba8b8b Mon Sep 17 00:00:00 2001 From: interlope Date: Tue, 2 Jun 2026 23:49:14 +0200 Subject: [PATCH] feat: remove previous/next article navigation for cleaner layout; simplify metadata display --- css/style.css | 51 --------------------------------------------------- js/blowdit.js | 9 +++++++-- php/page.php | 46 +++++----------------------------------------- 3 files changed, 12 insertions(+), 94 deletions(-) diff --git a/css/style.css b/css/style.css index 558b370..4b55a2d 100644 --- a/css/style.css +++ b/css/style.css @@ -1974,56 +1974,6 @@ button:focus:not(:focus-visible) { /* Separate the comments widget from the share row so it doesn't feel cramped. */ .utterances { margin-top: var(--space-xl) !important; } -/* ======================================== - PREV / NEXT ARTICLE NAV - ======================================== */ -.post-nav { - display: grid; - grid-template-columns: 1fr 1fr; - gap: var(--space-sm); - margin: var(--space-lg) 0; -} - -.post-nav-link { - display: flex; - align-items: center; - gap: 0.5rem; - min-width: 0; - padding: var(--space-sm) var(--space-md); - border: 1px solid var(--border-color); - border-radius: var(--radius-md); - background: var(--bg-surface); - color: var(--text-primary); - transition: all 0.2s ease; -} - -.post-nav-link:hover { - border-color: var(--accent); - transform: translateY(-2px); - box-shadow: var(--shadow-md); - text-decoration: none; -} - -.post-nav-next { justify-content: flex-end; text-align: right; } - -.post-nav-text { display: flex; flex-direction: column; min-width: 0; } - -.post-nav-meta { - font-size: var(--font-size-xs); - text-transform: uppercase; - letter-spacing: 0.06em; - color: var(--text-muted); -} - -.post-nav-title { - font-weight: 600; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.post-nav .bd-icon { flex: 0 0 auto; color: var(--text-muted); margin: 0; } - /* ======================================== RELATED POSTS ======================================== */ @@ -2241,7 +2191,6 @@ button:focus:not(:focus-visible) { RESPONSIVE ======================================== */ @media (max-width: 767.98px) { - .post-nav { grid-template-columns: 1fr; } h1.title { font-size: 1.9rem; } h2.title { font-size: 1.5rem; } diff --git a/js/blowdit.js b/js/blowdit.js index ddf2f1d..e960df7 100644 --- a/js/blowdit.js +++ b/js/blowdit.js @@ -702,8 +702,13 @@ }); } - var pres = document.querySelectorAll('.content pre, .tab-panel pre'); - Array.prototype.forEach.call(pres, enhance); + // Regular code blocks only — the tabbed component (.tab-group) has its + // own frame, so adding a header inside each panel would double-frame it. + var pres = document.querySelectorAll('.content pre'); + Array.prototype.forEach.call(pres, function (pre) { + if (pre.closest && pre.closest('.tab-group')) return; + enhance(pre); + }); })(); /* -------------------------------------------------------- diff --git a/php/page.php b/php/page.php index 29bcf20..74399f8 100644 --- a/php/page.php +++ b/php/page.php @@ -47,23 +47,10 @@

title()); ?>

isStatic() && !$url->notFound()): ?> - - getValue('date'); - $bdModRaw = $page->getValue('dateModified'); - $bdUpdated = ''; - if ($bdModRaw && class_exists('Date') - && substr($bdModRaw, 0, 10) !== substr($bdPubRaw, 0, 10) - && $bdModRaw > $bdPubRaw) { - $bdUpdated = Date::format($bdModRaw, DB_DATE_FORMAT, 'M j, Y'); - } - ?> +
date(); ?> get('Reading time') . ': ' . $page->readingTime() ?> - - get('Updated') . ': ' . htmlspecialchars($bdUpdated, ENT_QUOTES, 'UTF-8'); ?> -
@@ -116,23 +103,17 @@ isStatic() && !$url->notFound()) { - $bdOlder = null; $bdNewer = null; $bdRelated = array(); + $bdRelated = array(); try { global $pages; if (isset($pages) && method_exists($pages, 'getList')) { - $bdKeys = $pages->getList(1, 10000, true); // published, newest-first + $bdKeys = $pages->getList(1, 10000, true); // published if (is_array($bdKeys)) { - $bdKeys = array_values($bdKeys); $bdCur = $page->key(); - $bdI = array_search($bdCur, $bdKeys, true); - if ($bdI !== false) { - if (isset($bdKeys[$bdI + 1])) { $bdOlder = new Page($bdKeys[$bdI + 1]); } - if ($bdI > 0 && isset($bdKeys[$bdI - 1])) { $bdNewer = new Page($bdKeys[$bdI - 1]); } - } $bdCat = $page->categoryKey(); $bdTags = array_keys($page->tags(true)); foreach ($bdKeys as $bdK) { @@ -148,27 +129,10 @@ } } } catch (\Throwable $e) { - $bdOlder = null; $bdNewer = null; $bdRelated = array(); + $bdRelated = array(); } ?> - - - -