Move breadcrumb rendering from individual page templates into the core topbar. Each page now sets $breadcrumbs in its action .php file; the topbar renders it automatically via the shared partial. - Remove global back/forward buttons and app-nav-history.js component - Remove Alt+Arrow keyboard shortcuts for history navigation - Render breadcrumb in topbar-left section (replaces button area) - Clean up breadcrumb CSS: context-neutral base (flex, no margin) - Recalculate sticky titlebar offset in details container - Migrate all 41 pages (core + helpdesk, audit, addressbook, api-docs) - Add missing breadcrumbs to addressbook detail view - Update architecture contract tests (nav-history references removed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
66 lines
2.8 KiB
PHTML
66 lines
2.8 KiB
PHTML
<?php
|
|
|
|
/**
|
|
* @var string $renderedHtml Rendered markdown HTML
|
|
* @var array<int, array<string, mixed>> $tocItems TOC headings [{level, text, anchor}]
|
|
* @var array<string, array<string, string>> $docGroups Grouped doc navigation
|
|
* @var string $currentSlug Active slug
|
|
* @var string $currentTitle Active doc title
|
|
* @var string $defaultSlug Default docs slug from catalog order
|
|
*/
|
|
?>
|
|
|
|
<div class="app-docs-container">
|
|
|
|
<aside class="app-docs-nav" aria-label="<?php e(t('Documentation navigation')); ?>">
|
|
<nav data-details-storage="admin-docs-nav-groups-v1">
|
|
<?php $groupIndex = 0; ?>
|
|
<?php foreach ($docGroups as $groupLabel => $items): ?>
|
|
<?php
|
|
$groupKey = 'docs-nav-group-' . ((string) (array_key_first($items) ?? $groupIndex));
|
|
$groupOpen = array_key_exists($currentSlug, $items);
|
|
$groupIndex++;
|
|
?>
|
|
<div class="app-docs-nav-group">
|
|
<details data-details-key="<?php e($groupKey); ?>" <?php if ($groupOpen): ?>open<?php endif; ?>>
|
|
<summary><small class="muted"><?php e($groupLabel); ?></small></summary>
|
|
<ul>
|
|
<?php foreach ($items as $docSlug => $label): ?>
|
|
<?php $isActive = $docSlug === $currentSlug; ?>
|
|
<li>
|
|
<a href="<?php e(lurl('admin/docs/' . $docSlug)); ?>"
|
|
class="<?php e($isActive ? 'active' : ''); ?>"
|
|
<?php if ($isActive): ?>aria-current="page" <?php endif; ?>>
|
|
<?php e($label); ?>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</details>
|
|
<hr>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</nav>
|
|
</aside>
|
|
|
|
<article class="app-docs-content">
|
|
<?php MintyPHP\Buffer::get('docs_rendered_html'); ?>
|
|
</article>
|
|
|
|
<?php if ($tocItems): ?>
|
|
<aside class="app-docs-toc" aria-label="<?php e(t('On this page')); ?>">
|
|
<small class="muted"><?php e(t('On this page')); ?></small>
|
|
<ul>
|
|
<?php foreach ($tocItems as $item): ?>
|
|
<li class="app-docs-toc-level-<?php e((string) $item['level']); ?>">
|
|
<a href="<?php e(lurl('admin/docs/' . $currentSlug) . '#' . $item['anchor']); ?>"><?php e($item['text']); ?></a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</aside>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<script type="module" src="<?php e(assetVersion('js/pages/admin-docs-index.js')); ?>"></script>
|