sidebar.blade.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. @php
  2. use Knuckles\Scribe\Tools\Utils as u;
  3. @endphp
  4. <a href="#" id="nav-button">
  5. <span>
  6. MENU
  7. <img src="{!! $assetPathPrefix !!}images/navbar.png" alt="navbar-image"/>
  8. </span>
  9. </a>
  10. <div class="tocify-wrapper">
  11. @if($metadata['logo'] != false)
  12. <img src="{{ $metadata['logo'] }}" alt="logo" class="logo" style="padding-top: 10px;" width="100%"/>
  13. @endif
  14. @isset($metadata['example_languages'])
  15. <div class="lang-selector">
  16. @foreach($metadata['example_languages'] as $name => $lang)
  17. @php if (is_numeric($name)) $name = $lang; @endphp
  18. <button type="button" class="lang-button" data-language-name="{{ $lang }}">{{ $name }}</button>
  19. @endforeach
  20. </div>
  21. @endisset
  22. <div class="search">
  23. <input type="text" class="search" id="input-search" placeholder="{{ u::trans("scribe::labels.search") }}">
  24. </div>
  25. <div id="toc">
  26. @foreach($headings as $h1)
  27. <ul id="tocify-header-{{ $h1['slug'] }}" class="tocify-header">
  28. <li class="tocify-item level-1" data-unique="{!! $h1['slug'] !!}">
  29. <a href="#{!! $h1['slug'] !!}">{!! $h1['name'] !!}</a>
  30. </li>
  31. @if(count($h1['subheadings']) > 0)
  32. <ul id="tocify-subheader-{!! $h1['slug'] !!}" class="tocify-subheader">
  33. @foreach($h1['subheadings'] as $h2)
  34. <li class="tocify-item level-2" data-unique="{!! $h2['slug'] !!}">
  35. <a href="#{!! $h2['slug'] !!}">{!! $h2['name'] !!}</a>
  36. </li>
  37. @if(count($h2['subheadings']) > 0)
  38. <ul id="tocify-subheader-{!! $h2['slug'] !!}" class="tocify-subheader">
  39. @foreach($h2['subheadings'] as $h3)
  40. <li class="tocify-item level-3" data-unique="{!! $h3['slug'] !!}">
  41. <a href="#{!! $h3['slug'] !!}">{!! $h3['name'] !!}</a>
  42. </li>
  43. @endforeach
  44. </ul>
  45. @endif
  46. @endforeach
  47. </ul>
  48. @endif
  49. </ul>
  50. @endforeach
  51. </div>
  52. <ul class="toc-footer" id="toc-footer">
  53. @if($metadata['postman_collection_url'])
  54. <li style="padding-bottom: 5px;"><a href="{!! $metadata['postman_collection_url'] !!}">{!! u::trans("scribe::links.postman") !!}</a></li>
  55. @endif
  56. @if($metadata['openapi_spec_url'])
  57. <li style="padding-bottom: 5px;"><a href="{!! $metadata['openapi_spec_url'] !!}">{!! u::trans("scribe::links.openapi") !!}</a></li>
  58. @endif
  59. <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
  60. </ul>
  61. <ul class="toc-footer" id="last-updated">
  62. <li>{{ $metadata['last_updated'] }}</li>
  63. </ul>
  64. </div>