]> BookStack Code Mirror - bookstack/blob - resources/views/api-docs/index.blade.php
API: Re-ordered routes, Improved navigation
[bookstack] / resources / views / api-docs / index.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4
5     <div component="api-nav" class="container">
6
7         <div class="grid right-focus reverse-collapse">
8             <div>
9
10                 <div refs="api-nav@sidebar" class="sticky-sidebar">
11
12                     <div class="sticky-sidebar-header py-xl">
13                         <select refs="api-nav@select" name="navigation" id="navigation">
14                             <option value="getting-started" selected>Jump To Section</option>
15                             <option value="getting-started">Getting Started</option>
16                             @foreach($docs as $model => $endpoints)
17                                 <option value="{{ str_replace(' ', '-', $model) }}">{{ ucfirst($model) }}</option>
18                                 @if($model === 'docs' || $model === 'shelves')
19                                     <hr>
20                                 @endif
21                             @endforeach
22                         </select>
23                     </div>
24
25                     <div class="mb-xl">
26                         <p id="sidebar-header-getting-started" class="text-uppercase text-muted mb-xm"><strong>Getting Started</strong></p>
27                         <div class="text-mono">
28                             <div class="mb-xs"><a href="#authentication">Authentication</a></div>
29                             <div class="mb-xs"><a href="#request-format">Request Format</a></div>
30                             <div class="mb-xs"><a href="#listing-endpoints">Listing Endpoints</a></div>
31                             <div class="mb-xs"><a href="#error-handling">Error Handling</a></div>
32                             <div class="mb-xs"><a href="#rate-limits">Rate Limits</a></div>
33                             <div class="mb-xs"><a href="#content-security">Content Security</a></div>
34                         </div>
35                     </div>
36
37                     @foreach($docs as $model => $endpoints)
38                         <div class="mb-xl">
39                             <p id="sidebar-header-{{ str_replace(' ', '-', $model) }}" class="text-uppercase text-muted mb-xm"><strong>{{ $model }}</strong></p>
40
41                             @foreach($endpoints as $endpoint)
42                                 <div class="mb-xs">
43                                     <a href="#{{ $endpoint['name'] }}" class="text-mono inline block mr-s">
44                                         <span class="api-method" data-method="{{ $endpoint['method'] }}">{{ $endpoint['method'] }}</span>
45                                     </a>
46                                     <a href="#{{ $endpoint['name'] }}" class="text-mono">
47                                         {{ $endpoint['controller_method_kebab'] }}
48                                     </a>
49                                 </div>
50                             @endforeach
51                         </div>
52                     @endforeach
53                 </div>
54             </div>
55
56             <div class="pt-xl" style="overflow: auto;">
57
58                 <section id="section-getting-started" component="code-highlighter" class="card content-wrap auto-height">
59                     @include('api-docs.parts.getting-started')
60                 </section>
61
62                 @foreach($docs as $model => $endpoints)
63                     <section id="section-{{ str_replace(' ', '-', $model) }}" class="card content-wrap auto-height">
64                         <h1 class="list-heading text-capitals">{{ $model }}</h1>
65                         @if($endpoints[0]['model_description'])
66                             <p>{{ $endpoints[0]['model_description'] }}</p>
67                         @endif
68                         @foreach($endpoints as $endpoint)
69                             @include('api-docs.parts.endpoint', ['endpoint' => $endpoint, 'loop' => $loop])
70                         @endforeach
71                     </section>
72                 @endforeach
73             </div>
74
75         </div>
76
77
78     </div>
79 @stop