{{-- The glossary. Content is config/knowledge_base.php (definitions live one file per section under resources/knowledge/); this view only presents it. Layout: a sticky topic rail on the left (a scrollable chip row on mobile) and the definitions on the right. Every definition renders through partials/entry, so the topic view, the A-Z view and the focused term can never drift apart visually. --}} @php // Per-topic colour. Written out in full because Tailwind only ships classes // it can see in the source, interpolated class names would not survive the // build. $tone = [ 'brand' => ['chip' => 'bg-brand-50 text-brand-600 ring-brand-100', 'rail' => 'bg-brand-50 text-brand-800 ring-brand-200', 'bar' => 'bg-brand-500', 'dot' => 'bg-brand-400'], 'accent' => ['chip' => 'bg-accent-50 text-accent-600 ring-accent-100', 'rail' => 'bg-accent-50 text-accent-800 ring-accent-200', 'bar' => 'bg-accent-500', 'dot' => 'bg-accent-400'], 'emerald' => ['chip' => 'bg-emerald-50 text-emerald-600 ring-emerald-100', 'rail' => 'bg-emerald-50 text-emerald-800 ring-emerald-200', 'bar' => 'bg-emerald-500', 'dot' => 'bg-emerald-400'], 'sky' => ['chip' => 'bg-sky-50 text-sky-600 ring-sky-100', 'rail' => 'bg-sky-50 text-sky-800 ring-sky-200', 'bar' => 'bg-sky-500', 'dot' => 'bg-sky-400'], 'amber' => ['chip' => 'bg-amber-50 text-amber-600 ring-amber-100', 'rail' => 'bg-amber-50 text-amber-800 ring-amber-200', 'bar' => 'bg-amber-500', 'dot' => 'bg-amber-400'], 'rose' => ['chip' => 'bg-rose-50 text-rose-600 ring-rose-100', 'rail' => 'bg-rose-50 text-rose-800 ring-rose-200', 'bar' => 'bg-rose-500', 'dot' => 'bg-rose-400'], 'cyan' => ['chip' => 'bg-cyan-50 text-cyan-600 ring-cyan-100', 'rail' => 'bg-cyan-50 text-cyan-800 ring-cyan-200', 'bar' => 'bg-cyan-500', 'dot' => 'bg-cyan-400'], 'orange' => ['chip' => 'bg-orange-50 text-orange-600 ring-orange-100', 'rail' => 'bg-orange-50 text-orange-800 ring-orange-200', 'bar' => 'bg-orange-500', 'dot' => 'bg-orange-400'], 'slate' => ['chip' => 'bg-slate-100 text-slate-600 ring-slate-200', 'rail' => 'bg-slate-100 text-slate-800 ring-slate-300', 'bar' => 'bg-slate-400', 'dot' => 'bg-slate-400'], ]; // Wrap search matches in a . The text is escaped BEFORE the pattern // is applied and the needle is escaped too, so this stays safe to print raw. $needle = trim($search); $hl = function (?string $text) use ($needle): string { $safe = e((string) $text); if ($needle === '') { return $safe; } return preg_replace( '/('.preg_quote(e($needle), '/').')/i', '$1', $safe, ) ?? $safe; }; @endphp
{{ __("What's new") }} {{-- ── Search ────────────────────────────────────────────────────── --}}
{{-- Soft light behind the search field, purely decorative. --}}

{{ __('What would you like explained?') }}

{{ __('Search a word you saw on a screen, a line on a report, or a term someone used in a meeting.') }}

{{-- Start-here chips, only on a clean page. --}} @if ($featured->isNotEmpty())
{{ __('Start here') }} @foreach ($featured as $pick) @endforeach
@endif
{{-- Headline counts --}}
@php $tiles = [ ['label' => __('Terms defined'), 'value' => $stats['terms'], 'icon' => 'book-open', 'chip' => 'bg-brand-50 text-brand-600'], ['label' => __('Topics'), 'value' => $stats['sections'], 'icon' => 'squares-2x2', 'chip' => 'bg-emerald-50 text-emerald-600'], ['label' => __('Pages linked'), 'value' => $stats['linked'], 'icon' => 'link', 'chip' => 'bg-sky-50 text-sky-600'], ['label' => __('Other names'), 'value' => $stats['aliases'], 'icon' => 'chat-bubble-left-right', 'chip' => 'bg-amber-50 text-amber-600'], ]; @endphp @foreach ($tiles as $tile)

{{ $tile['label'] }}

{{ number_format($tile['value']) }}

@endforeach
{{-- ── Rail + results ────────────────────────────────────────────── --}}
{{-- Topic rail: vertical and sticky on desktop, a scrolling chip row on mobile --}} {{-- top-20 clears the sticky app header (h-16). --}} {{-- Results column --}}
{{-- Toolbar: what you are looking at + how it is listed --}}
{{ trans_choice(':count term|:count terms', $results->count(), ['count' => $results->count()]) }} @if ($section !== '') @php $current = $sections->firstWhere('key', $section); @endphp {{ $current['label'] ?? $section }} @endif @if ($search !== '') “{{ \Illuminate\Support\Str::limit($search, 24) }}” @endif
{{-- One term, deep-linked or jumped to --}} @if ($focused)

{{ __('You jumped to') }}

@include('livewire.knowledge.partials.entry', ['entry' => $focused])
@endif @if ($results->isEmpty()) {{ __('Start again') }} @elseif ($mode === 'az') {{-- Letter jump strip --}}
{{ __('Jump to') }} @foreach (range('A', 'Z') as $letter) @if ($alphabet->has($letter)) {{ $letter }} @else {{ $letter }} @endif @endforeach
@foreach ($alphabet as $letter => $entries)
{{ $letter }} {{ $entries->count() }}
@foreach ($entries as $entry) @include('livewire.knowledge.partials.entry', ['entry' => $entry]) @endforeach
@endforeach @else @foreach ($grouped as $group) @php $t = $tone[$group['tone'] ?? 'slate'] ?? $tone['slate']; @endphp

{{ $group['label'] }}

{{ $group['blurb'] }}

{{ $group['entries']->count() }}
@foreach ($group['entries'] as $entry) @include('livewire.knowledge.partials.entry', ['entry' => $entry]) @endforeach
@endforeach @endif {{-- Footer note: how this page stays honest --}}

{{ __('This page ships with the system and is updated with every release, so it always describes the version you are running.') }} {{ __('See what changed recently') }}

{{-- Back to top, appears once you are well down the page --}}