From e3da7c5bb038bb6f1b5a7922e4efb57bc7e012ff Mon Sep 17 00:00:00 2001 From: Daniel Onyejesi Date: Tue, 24 Mar 2026 03:04:14 -0400 Subject: [PATCH] Render presentations as slides in Learning Hub viewer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New GET /api/learning/content/:slug/slides (authMiddleware only) Renders Marp markdown via marp-core, returns {css, slides[]} for any authenticated user — no moderator access required - showViewer: when content_type === 'presentation', hides the body card and shows a presentation card with title, slide count, and View Slides button Auto-opens the slide modal immediately on load; button allows re-opening - openSlidesFromSlug(): fetches slides from user-accessible endpoint then opens the existing slide preview modal (arrow keys, swipe, dots) - Viewer already correctly hides feed/categories/search when viewing content; "Back to Feed" button returns to the main list --- public/components/learning.html | 2 + public/js/learningHub.js | 71 ++++++++++++++++++++++++++++----- src/routes/learningHub.js | 26 ++++++++++++ 3 files changed, 88 insertions(+), 11 deletions(-) diff --git a/public/components/learning.html b/public/components/learning.html index bfbc33b..4f49466 100644 --- a/public/components/learning.html +++ b/public/components/learning.html @@ -20,6 +20,8 @@