Skip to content

Commit

Permalink
refs #113 Changed template docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Apr 1, 2024
1 parent a1fc09c commit 5771cc9
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions resources/views/docs/docs.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,42 @@
<div class="col-3 col-xl-3 col-xxl-2 order-md-first order-last position-sticky top-0 py-md-3 z-1 d-none d-lg-block doc-navigation">
<div class="mb-md-4 ms-md-4 d-flex align-items-stretch flex-column offcanvas-md offcanvas-start" id="docs-menu">

<div class="position-relative mb-3">
<div class="position-relative">
<input class="form-control" type="text" placeholder="Поиск...">
<a href="#" data-bs-toggle="modal" data-bs-target="#docs-search-modal" class="stretched-link"></a>
</div>

<div class="d-flex align-items-center p-4 p-sm-0">
<ul class="list-unstyled p-4 px-md-0">
@foreach ($docs->getMenu() as $item)
<li class="mb-2">
<button
class="btn btn-toggle d-flex align-items-center rounded border-0 collapsed text-body-secondary p-0 w-100 text-start"
data-bs-toggle="collapse"
data-bs-target="#{{ \Illuminate\Support\Str::slug($item['title']) }}-collapse"
aria-expanded="true">
{{ $item['title'] }}
</button>

<div class="collapse {{ active(collect($item['list'])->map(fn($link) => $link['href']), 'show') }} mt-2"
id="{{ \Illuminate\Support\Str::slug($item['title']) }}-collapse"
data-bs-parent="#docs-menu">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small ms-2">
@foreach ($item['list'] as $link)
<li>
<a href="{{ $link['href'] }}"
class="{{ active(url($link['href']), 'active', 'link-body-emphasis') }} d-inline-flex text-decoration-none rounded p-2">
{{ $link['title'] }}
</a>
</li>
@endforeach
</ul>
</div>
</li>
@endforeach
</ul>


<div class="d-flex align-items-center p-4 p-sm-0 mb-3">
<select class="form-select form-select-sm rounded-3" onchange="Turbo.visit(this.value);">
<optgroup label="Версия">
@foreach (\App\Docs::SUPPORT_VERSIONS as $version)
Expand Down Expand Up @@ -44,35 +74,6 @@ class="link-body-emphasis text-decoration-none d-none d-md-block">
</a>
</div>

<ul class="list-unstyled p-4 px-md-0">
@foreach ($docs->getMenu() as $item)
<li class="mb-2">
<button
class="btn btn-toggle d-flex align-items-center rounded border-0 collapsed text-body-secondary p-0 w-100 text-start"
data-bs-toggle="collapse"
data-bs-target="#{{ \Illuminate\Support\Str::slug($item['title']) }}-collapse"
aria-expanded="true">
{{ $item['title'] }}
</button>

<div class="collapse {{ active(collect($item['list'])->map(fn($link) => $link['href']), 'show') }} mt-2"
id="{{ \Illuminate\Support\Str::slug($item['title']) }}-collapse"
data-bs-parent="#docs-menu">
<ul class="btn-toggle-nav list-unstyled fw-normal pb-1 small ms-2">
@foreach ($item['list'] as $link)
<li>
<a href="{{ $link['href'] }}"
class="{{ active(url($link['href']), 'active', 'link-body-emphasis') }} d-inline-flex text-decoration-none rounded p-2">
{{ $link['title'] }}
</a>
</li>
@endforeach
</ul>
</div>
</li>
@endforeach
</ul>

<x-docs.banner />

</div>
Expand Down

0 comments on commit 5771cc9

Please sign in to comment.