sidebar.blade.php 6.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <div id="sidebar" class="sl-flex sl-overflow-y-auto sl-flex-col sl-sticky sl-inset-y-0 sl-pt-8 sl-bg-canvas-100 sl-border-r"
  2. style="width: calc((100% - 1800px) / 2 + 300px); padding-left: calc((100% - 1800px) / 2); min-width: 300px; max-height: 100vh">
  3. <div class="sl-flex sl-items-center sl-mb-5 sl-ml-4">
  4. @if($metadata['logo'] != false)
  5. <div class="sl-inline sl-overflow-x-hidden sl-overflow-y-hidden sl-mr-3 sl-rounded-lg"
  6. style="background-color: transparent;">
  7. <img src="{{ $metadata['logo'] }}" height="30px" width="30px" alt="logo">
  8. </div>
  9. @endif
  10. <h4 class="sl-text-paragraph sl-leading-snug sl-font-prose sl-font-semibold sl-text-heading">
  11. {{ $metadata['title'] }}
  12. </h4>
  13. </div>
  14. <div class="sl-flex sl-overflow-y-auto sl-flex-col sl-flex-grow sl-flex-shrink">
  15. <div class="sl-overflow-y-auto sl-w-full sl-bg-canvas-100">
  16. <div class="sl-my-3">
  17. @foreach($headings as $h1)
  18. <div class="expandable">
  19. <div title="{!! $h1['name'] !!}" id="toc-item-{!! $h1['slug'] !!}"
  20. class="sl-flex sl-items-center sl-h-md sl-pr-4 sl-pl-4 sl-bg-canvas-100 hover:sl-bg-canvas-200 sl-cursor-pointer sl-select-none">
  21. <a href="#{!! $h1['slug'] !!}"
  22. class="sl-flex-1 sl-items-center sl-truncate sl-mr-1.5 sl-p-0">{!! $h1['name'] !!}</a>
  23. @if(count($h1['subheadings']) > 0)
  24. <div class="sl-flex sl-items-center sl-text-xs expansion-chevrons">
  25. <svg aria-hidden="true" focusable="false" data-prefix="fas"
  26. data-icon="chevron-right"
  27. class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
  28. xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
  29. <path fill="currentColor"
  30. d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"></path>
  31. </svg>
  32. </div>
  33. @endif
  34. </div>
  35. @if(count($h1['subheadings']) > 0)
  36. <div class="children" style="display: none;">
  37. @foreach($h1['subheadings'] as $h2)
  38. <div class="expandable">
  39. <div class="sl-flex sl-items-center sl-h-md sl-pr-4 sl-pl-8 sl-bg-canvas-100 hover:sl-bg-canvas-200 sl-cursor-pointer sl-select-none"
  40. id="toc-item-{!! $h2['slug'] !!}">
  41. <div class="sl-flex-1 sl-items-center sl-truncate sl-mr-1.5 sl-p-0" title="{!! $h2['name'] !!}">
  42. <a class="ElementsTableOfContentsItem sl-block sl-no-underline"
  43. href="#{!! $h2['slug'] !!}">
  44. {!! $h2['name'] !!}
  45. </a>
  46. </div>
  47. @if(count($h2['subheadings']) > 0)
  48. <div class="sl-flex sl-items-center sl-text-xs expansion-chevrons">
  49. <svg aria-hidden="true" focusable="false" data-prefix="fas"
  50. data-icon="chevron-right"
  51. class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
  52. xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
  53. <path fill="currentColor"
  54. d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"></path>
  55. </svg>
  56. </div>
  57. @endif
  58. </div>
  59. @if(count($h2['subheadings']) > 0)
  60. <div class="children" style="display: none;">
  61. @foreach($h2['subheadings'] as $h3)
  62. <a class="ElementsTableOfContentsItem sl-block sl-no-underline"
  63. href="#{!! $h3['slug'] !!}">
  64. <div title="{!! $h3['name'] !!}" id="toc-item-{!! $h3['slug'] !!}"
  65. class="sl-flex sl-items-center sl-h-md sl-pr-4 sl-pl-12 sl-bg-canvas-100 hover:sl-bg-canvas-200 sl-cursor-pointer sl-select-none">
  66. {!! $h3['name'] !!}
  67. </div>
  68. </a>
  69. @endforeach
  70. </div>
  71. @endif
  72. </div>
  73. @endforeach
  74. </div>
  75. @endif
  76. </div>
  77. @endforeach
  78. </div>
  79. </div>
  80. <div class="sl-flex sl-items-center sl-px-4 sl-py-3 sl-border-t">
  81. {{ $metadata['last_updated'] }}
  82. </div>
  83. <div class="sl-flex sl-items-center sl-px-4 sl-py-3 sl-border-t">
  84. <a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a>
  85. </div>
  86. </div>
  87. </div>