sidebar.blade.php 2.9 KB

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