15 lines
508 B
PHP
15 lines
508 B
PHP
|
<ul>
|
||
|
@foreach ($toc as $item)
|
||
|
<li>
|
||
|
@if ('/' . urldecode(request()->path()) . '/' === $item->getPath())
|
||
|
<strong>{{ $item->getArticleTitle() }}</strong>
|
||
|
@else
|
||
|
<a href="{{ $item->getPath() }}">{{ $item->getArticleTitle() }}</a>
|
||
|
@endif
|
||
|
@if (!empty($item->getDirectChildren()))
|
||
|
@include('components.table-of-contents', ['toc' => $item->getDirectChildren()])
|
||
|
@endif
|
||
|
</li>
|
||
|
@endforeach
|
||
|
</ul>
|