]> BookStack Code Mirror - bookstack/blobdiff - resources/views/api-docs/index.blade.php
Update code.js
[bookstack] / resources / views / api-docs / index.blade.php
index e9583838c4ce3f487e92d80306e3ba824a0d8c00..d9c3d659513507c952e3aaecac81d6f7d6c6df06 100644 (file)
@@ -7,29 +7,31 @@
         <div class="grid right-focus reverse-collapse">
             <div>
 
-                <p class="text-uppercase text-muted mb-xm mt-l"><strong>Getting Started</strong></p>
+                <div class="sticky-sidebar">
+                    <p class="text-uppercase text-muted mb-xm mt-l"><strong>Getting Started</strong></p>
 
-                <div class="text-mono">
-                    <div class="mb-xs"><a href="#authentication">Authentication</a></div>
-                    <div class="mb-xs"><a href="#request-format">Request Format</a></div>
-                    <div class="mb-xs"><a href="#listing-endpoints">Listing Endpoints</a></div>
-                    <div class="mb-xs"><a href="#error-handling">Error Handling</a></div>
-                </div>
+                    <div class="text-mono">
+                        <div class="mb-xs"><a href="#authentication">Authentication</a></div>
+                        <div class="mb-xs"><a href="#request-format">Request Format</a></div>
+                        <div class="mb-xs"><a href="#listing-endpoints">Listing Endpoints</a></div>
+                        <div class="mb-xs"><a href="#error-handling">Error Handling</a></div>
+                    </div>
 
-                @foreach($docs as $model => $endpoints)
-                    <p class="text-uppercase text-muted mb-xm mt-l"><strong>{{ $model }}</strong></p>
+                    @foreach($docs as $model => $endpoints)
+                        <p class="text-uppercase text-muted mb-xm mt-l"><strong>{{ $model }}</strong></p>
 
-                    @foreach($endpoints as $endpoint)
-                        <div class="mb-xs">
-                            <a href="#{{ $endpoint['name'] }}" class="text-mono inline block mr-s">
-                                <span class="api-method" data-method="{{ $endpoint['method'] }}">{{ $endpoint['method'] }}</span>
-                            </a>
-                            <a href="#{{ $endpoint['name'] }}" class="text-mono">
-                                {{ $endpoint['controller_method'] }}
-                            </a>
-                        </div>
+                        @foreach($endpoints as $endpoint)
+                            <div class="mb-xs">
+                                <a href="#{{ $endpoint['name'] }}" class="text-mono inline block mr-s">
+                                    <span class="api-method" data-method="{{ $endpoint['method'] }}">{{ $endpoint['method'] }}</span>
+                                </a>
+                                <a href="#{{ $endpoint['name'] }}" class="text-mono">
+                                    {{ $endpoint['controller_method_kebab'] }}
+                                </a>
+                            </div>
+                        @endforeach
                     @endforeach
-                @endforeach
+                </div>
             </div>
 
             <div style="overflow: auto;">
                         <h1 class="list-heading text-capitals">{{ $model }}</h1>
 
                         @foreach($endpoints as $endpoint)
-                            <h6 class="text-uppercase text-muted float right">{{ $endpoint['controller_method'] }}</h6>
+                            <h6 class="text-uppercase text-muted float right">{{ $endpoint['controller_method_kebab'] }}</h6>
                             <h5 id="{{ $endpoint['name'] }}" class="text-mono mb-m">
                                 <span class="api-method" data-method="{{ $endpoint['method'] }}">{{ $endpoint['method'] }}</span>
-                                {{ url($endpoint['uri']) }}
+                                @if($endpoint['controller_method_kebab'] === 'list')
+                                    <a style="color: inherit;" target="_blank" href="{{ url($endpoint['uri']) }}">{{ url($endpoint['uri']) }}</a>
+                                @else
+                                    {{ url($endpoint['uri']) }}
+                                @endif
                             </h5>
                             <p class="mb-m">{{ $endpoint['description'] ?? '' }}</p>
                             @if($endpoint['body_params'] ?? false)