'; if ($eyebrow !== '') { $html .= '
' . htmlspecialchars($eyebrow, ENT_QUOTES, 'UTF-8') . '
'; } $html .= '

' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '

'; if ($subtitle !== '') { $html .= '

' . htmlspecialchars($subtitle, ENT_QUOTES, 'UTF-8') . '

'; } $html .= '
' . '' . htmlspecialchars($ctaText, ENT_QUOTES, 'UTF-8') . ''; if ($secondaryText !== '' && $secondaryUrl !== '') { $html .= '' . htmlspecialchars($secondaryText, ENT_QUOTES, 'UTF-8') . ''; } $html .= '
'; return $html; }); Shortcodes::register('home-catalog', static function (array $attrs = []): string { $releaseLimit = max(1, min(12, (int)($attrs['release_limit'] ?? 8))); $artistLimit = max(1, min(10, (int)($attrs['artist_limit'] ?? 6))); $chartLimit = max(1, min(20, (int)($attrs['chart_limit'] ?? 10))); $hero = Shortcodes::render('[hero eyebrow="Catalog Focus" title="Latest Drops" subtitle="Fresh releases, artists, and best sellers." cta_text="Browse Releases" cta_url="/releases" secondary_text="Meet Artists" secondary_url="/artists"]'); $releases = Shortcodes::render('[latest-releases limit="' . $releaseLimit . '"]'); $artists = Shortcodes::render('[new-artists limit="' . $artistLimit . '"]'); $chart = Shortcodes::render('[sale-chart type="tracks" window="latest" limit="' . $chartLimit . '"]'); $newsletter = Shortcodes::render('[newsletter-signup title="Join the list" button="Subscribe"]'); return '
' . $hero . '
' . '
' . $releases . $chart . '
' . '' . '
' . '
'; }); return function (Router $router): void { $controller = new PagesController(); $router->get('/page', [$controller, 'show']); $router->get('/admin/pages', [$controller, 'adminIndex']); $router->get('/admin/pages/new', [$controller, 'adminEdit']); $router->get('/admin/pages/edit', [$controller, 'adminEdit']); $router->post('/admin/pages/save', [$controller, 'adminSave']); $router->post('/admin/pages/delete', [$controller, 'adminDelete']); };