Yin Bin 4 months ago
parent
commit
1e1560f0f2

+ 4 - 0
app/Http/Controllers/Client/AccountController.php

@@ -7,7 +7,11 @@ use App\Services\Client\AccountService;
 use Illuminate\Http\Request;
 
 /**
+<<<<<<< HEAD
+ * @group 账户管理
+=======
  * @group 用户端
+>>>>>>> 70ed7591819346761bf23d2dd8032db40c2cf57e
  *
  * 包含登录、注册、账户管理等基础功能
  */

+ 0 - 11
public/vendor/scribe/js/custom.js

@@ -1,11 +0,0 @@
-        document.querySelectorAll('.tocify-header .level-1 a').forEach(link => {
-            link.addEventListener('click', function(e) {
-                e.preventDefault();
-                const parentLi = this.closest('li');
-                const nextUl = parentLi.nextElementSibling;
-                if (nextUl && nextUl.tagName === 'UL') {
-                    nextUl.classList.contains('visible') ? nextUl.classList.remove('visible') : nextUl
-                        .classList.add('visible');
-                }
-            });
-        });

File diff suppressed because it is too large
+ 186 - 490
resources/views/scribe/index.blade.php


+ 67 - 48
resources/views/vendor/scribe/themes/default/index.blade.php

@@ -3,6 +3,7 @@
 @endphp
 <!doctype html>
 <html lang="en">
+
 <head>
     <meta charset="utf-8">
     <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
@@ -16,67 +17,85 @@
 
     <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
 
-    <link rel="stylesheet"
-          href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
+    <link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css">
     <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
 
     <script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script>
 
-@if(isset($metadata['example_languages']))
-    <style id="language-style">
-        /* starts out as display none and is replaced with js later  */
-        @foreach($metadata['example_languages'] as $lang)
-            body .content .{{ $lang }}-example code { display: none; }
-        @endforeach
-    </style>
-@endif
-
-@if($tryItOut['enabled'] ?? true)
-    <script>
-        var tryItOutBaseUrl = "{!! $tryItOut['base_url'] ?? config('app.url') !!}";
-        var useCsrf = Boolean({!! $tryItOut['use_csrf'] ?? null !!});
-        var csrfUrl = "{!! $tryItOut['csrf_url'] ?? null !!}";
-    </script>
-    <script src="{{ u::getVersionedAsset($assetPathPrefix.'js/tryitout.js') }}"></script>
-@endif
-
-    <script src="{{ u::getVersionedAsset($assetPathPrefix.'js/theme-default.js') }}"></script>
+    @if (isset($metadata['example_languages']))
+        <style id="language-style">
+            /* starts out as display none and is replaced with js later  */
+            @foreach ($metadata['example_languages'] as $lang)
+                body .content .{{ $lang }}-example code {
+                    display: none;
+                }
+            @endforeach
+        </style>
+    @endif
+
+    @if ($tryItOut['enabled'] ?? true)
+        <script>
+            var tryItOutBaseUrl = "{!! $tryItOut['base_url'] ?? config('app.url') !!}";
+            var useCsrf = Boolean({!! $tryItOut['use_csrf'] ?? null !!});
+            var csrfUrl = "{!! $tryItOut['csrf_url'] ?? null !!}";
+        </script>
+        <script src="{{ u::getVersionedAsset($assetPathPrefix . 'js/tryitout.js') }}"></script>
+    @endif
+
+    <script src="{{ u::getVersionedAsset($assetPathPrefix . 'js/theme-default.js') }}"></script>
 
 </head>
 
 <body data-languages="{{ json_encode($metadata['example_languages'] ?? []) }}">
 
-@include("scribe::themes.default.sidebar")
-
-<div class="page-wrapper">
-    <div class="dark-box"></div>
-    <div class="content">
-        {!! $intro !!}
-
-        {!! $auth !!}
-
-        @include("scribe::themes.default.groups")
-
-        {!! $append !!}
-    </div>
-    <div class="dark-box">
-        @if(isset($metadata['example_languages']))
-            <div class="lang-selector">
-                @foreach($metadata['example_languages'] as $name => $lang)
-                    @php if (is_numeric($name)) $name = $lang; @endphp
-                    <button type="button" class="lang-button" data-language-name="{{$lang}}">{{$name}}</button>
-                @endforeach
-            </div>
-        @endif
+    @include('scribe::themes.default.sidebar')
+
+    <div class="page-wrapper">
+        <div class="dark-box"></div>
+        <div class="content">
+            {!! $intro !!}
+
+            {!! $auth !!}
+
+            @include('scribe::themes.default.groups')
+
+            {!! $append !!}
+        </div>
+        <div class="dark-box">
+            @if (isset($metadata['example_languages']))
+                <div class="lang-selector">
+                    @foreach ($metadata['example_languages'] as $name => $lang)
+                        @php
+                            if (is_numeric($name)) {
+                                $name = $lang;
+                            }
+                        @endphp
+                        <button type="button" class="lang-button"
+                            data-language-name="{{ $lang }}">{{ $name }}</button>
+                    @endforeach
+                </div>
+            @endif
+        </div>
     </div>
-</div>
 </body>
 
-<script src="{{ asset("vendor/scribe/js/tryitout-4.38.0.js") }}"></script>
-<script src="{{ asset("vendor/scribe/js/theme-default-4.38.0.js") }}"></script>
+<script src="{{ asset('vendor/scribe/js/tryitout-4.38.0.js') }}"></script>
+<script src="{{ asset('vendor/scribe/js/theme-default-4.38.0.js') }}"></script>
 
 {{-- 添加自定义脚本 --}}
-<script src="{{ asset("vendor/scribe/js/my-custom.js") }}"></script>
-<script src="{{ asset("vendor/scribe/js/custom.js") }}"></script>
+<script type="text/javascript">
+    document.querySelectorAll('.tocify-header .level-1 a').forEach(link => {
+        link.addEventListener('click', function(e) {
+            e.preventDefault();
+            const parentLi = this.closest('li');
+            const nextUl = parentLi.nextElementSibling;
+            if (nextUl && nextUl.tagName === 'UL') {
+                nextUl.classList.contains('visible') ? nextUl.classList.remove('visible') : nextUl
+                    .classList.add('visible');
+            }
+        });
+    });
+</script>
+
 
 </html>

+ 21 - 16
resources/views/vendor/scribe/themes/default/sidebar.blade.php

@@ -4,42 +4,47 @@
 <a href="#" id="nav-button">
     <span>
         MENU
-        <img src="{!! $assetPathPrefix !!}images/navbar.png" alt="navbar-image"/>
+        <img src="{!! $assetPathPrefix !!}images/navbar.png" alt="navbar-image" />
     </span>
 </a>
 <div class="tocify-wrapper">
-    @if($metadata['logo'] != false)
-        <img src="{{ $metadata['logo'] }}" alt="logo" class="logo" style="padding-top: 10px;" width="100%"/>
+    @if ($metadata['logo'] != false)
+        <img src="{{ $metadata['logo'] }}" alt="logo" class="logo" style="padding-top: 10px;" width="100%" />
     @endif
 
     @isset($metadata['example_languages'])
         <div class="lang-selector">
-            @foreach($metadata['example_languages'] as $name => $lang)
-                @php if (is_numeric($name)) $name = $lang; @endphp
-                <button type="button" class="lang-button" data-language-name="{{ $lang }}">{{ $name }}</button>
+            @foreach ($metadata['example_languages'] as $name => $lang)
+                @php
+                    if (is_numeric($name)) {
+                        $name = $lang;
+                    }
+                @endphp
+                <button type="button" class="lang-button"
+                    data-language-name="{{ $lang }}">{{ $name }}</button>
             @endforeach
         </div>
     @endisset
 
     <div class="search">
-        <input type="text" class="search" id="input-search" placeholder="{{ u::trans("scribe::labels.search") }}">
+        <input type="text" class="search" id="input-search" placeholder="{{ u::trans('scribe::labels.search') }}">
     </div>
 
     <div id="toc">
-        @foreach($headings as $h1)
+        @foreach ($headings as $h1)
             <ul id="tocify-header-{{ $h1['slug'] }}" class="tocify-header">
                 <li class="tocify-item level-1" data-unique="{!! $h1['slug'] !!}">
                     <a href="#{!! $h1['slug'] !!}">{!! $h1['name'] !!}</a>
                 </li>
-                @if(count($h1['subheadings']) > 0)
+                @if (count($h1['subheadings']) > 0)
                     <ul id="tocify-subheader-{!! $h1['slug'] !!}" class="tocify-subheader">
-                        @foreach($h1['subheadings'] as $h2)
+                        @foreach ($h1['subheadings'] as $h2)
                             <li class="tocify-item level-2" data-unique="{!! $h2['slug'] !!}">
                                 <a href="#{!! $h2['slug'] !!}">{!! $h2['name'] !!}</a>
                             </li>
-                            @if(count($h2['subheadings']) > 0)
+                            @if (count($h2['subheadings']) > 0)
                                 <ul id="tocify-subheader-{!! $h2['slug'] !!}" class="tocify-subheader">
-                                    @foreach($h2['subheadings'] as $h3)
+                                    @foreach ($h2['subheadings'] as $h3)
                                         <li class="tocify-item level-3" data-unique="{!! $h3['slug'] !!}">
                                             <a href="#{!! $h3['slug'] !!}">{!! $h3['name'] !!}</a>
                                         </li>
@@ -54,11 +59,11 @@
     </div>
 
     <ul class="toc-footer" id="toc-footer">
-        @if($metadata['postman_collection_url'])
-            <li style="padding-bottom: 5px;"><a href="{!! $metadata['postman_collection_url'] !!}">{!! u::trans("scribe::links.postman") !!}</a></li>
+        @if ($metadata['postman_collection_url'])
+            <li style="padding-bottom: 5px;"><a href="{!! $metadata['postman_collection_url'] !!}">{!! u::trans('scribe::links.postman') !!}</a></li>
         @endif
-        @if($metadata['openapi_spec_url'])
-            <li style="padding-bottom: 5px;"><a href="{!! $metadata['openapi_spec_url'] !!}">{!! u::trans("scribe::links.openapi") !!}</a></li>
+        @if ($metadata['openapi_spec_url'])
+            <li style="padding-bottom: 5px;"><a href="{!! $metadata['openapi_spec_url'] !!}">{!! u::trans('scribe::links.openapi') !!}</a></li>
         @endif
         <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li>
     </ul>

+ 198 - 184
resources/views/vendor/scribe/themes/elements/index.blade.php

@@ -2,8 +2,9 @@
     use Knuckles\Scribe\Tools\WritingUtils as u;
 @endphp
 
-        <!doctype html>
+<!doctype html>
 <html lang="en">
+
 <head>
     <meta charset="utf-8">
     <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
@@ -16,27 +17,32 @@
 
     <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script>
 
-    <link rel="stylesheet"
-          href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/docco.min.css">
+    <link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/docco.min.css">
     <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script>
-    <script>hljs.highlightAll();</script>
+    <script>
+        hljs.highlightAll();
+    </script>
     <script type="module">
-        import {CodeJar} from 'https://medv.io/codejar/codejar.js'
+        import {
+            CodeJar
+        } from 'https://medv.io/codejar/codejar.js'
         window.CodeJar = CodeJar;
     </script>
 
-    @if($tryItOut['enabled'] ?? true)
+    @if ($tryItOut['enabled'] ?? true)
         <script>
             var tryItOutBaseUrl = "{{ $tryItOut['base_url'] ?? config('app.url') }}";
             var useCsrf = Boolean({{ $tryItOut['use_csrf'] ?? null }});
             var csrfUrl = "{{ $tryItOut['csrf_url'] ?? null }}";
         </script>
-        <script src="{{ u::getVersionedAsset($assetPathPrefix.'js/tryitout.js') }}"></script>
+        <script src="{{ u::getVersionedAsset($assetPathPrefix . 'js/tryitout.js') }}"></script>
         <style>
-            .code-editor, .response-content {
+            .code-editor,
+            .resp-content {
                 color: whitesmoke;
                 background-color: transparent;
             }
+
             /*
              Problem: we want syntax highlighting for the Try It Out JSON body code editor
              However, the Try It Out area uses a dark background, while request and response samples
@@ -48,19 +54,21 @@
              Since it's only JSON, we only need a few styles anyway.
              Styles taken from the Nord theme: https://github.com/highlightjs/highlight.js/blob/3997c9b430a568d5ad46d96693b90a74fc01ea7f/src/styles/nord.css#L2
              */
-            .code-editor > .hljs-attr {
+            .code-editor>.hljs-attr {
                 color: #8FBCBB;
             }
-            .code-editor > .hljs-string {
+
+            .code-editor>.hljs-string {
                 color: #A3BE8C;
             }
-            .code-editor > .hljs-number {
+
+            .code-editor>.hljs-number {
                 color: #B48EAD;
             }
-            .code-editor > .hljs-literal{
+
+            .code-editor>.hljs-literal {
                 color: #81A1C1;
             }
-
         </style>
 
         <script>
@@ -75,7 +83,11 @@
                 responsePanel.hidden = true;
 
                 let form = btnElement.form;
-                let { method, path, hasjsonbody: hasJsonBody} = form.dataset;
+                let {
+                    method,
+                    path,
+                    hasjsonbody: hasJsonBody
+                } = form.dataset;
                 let body = {};
                 if (hasJsonBody === "1") {
                     body = form.querySelector('.code-editor').textContent;
@@ -121,7 +133,7 @@
                     .catch(err => {
                         console.error('API调用失败:', err);
                         errorPanel.hidden = false;
-                        errorPanel.querySelector('.error-message').textContent = 
+                        errorPanel.querySelector('.error-message').textContent =
                             `请求失败: ${err.message}\n请确保服务器正在运行且配置正确`;
                     })
                     .finally(() => {
@@ -141,197 +153,199 @@
 
 <body>
 
-@if($metadata['example_languages'])
+    @if ($metadata['example_languages'])
+        <script>
+            function switchExampleLanguage(lang) {
+                document.querySelectorAll(`.example-request`).forEach(el => el.style.display = 'none');
+                document.querySelectorAll(`.example-request-${lang}`).forEach(el => el.style.display = 'initial');
+                document.querySelectorAll(`.example-request-lang-toggle`).forEach(el => el.value = lang);
+            }
+        </script>
+    @endif
+
     <script>
-        function switchExampleLanguage(lang) {
-            document.querySelectorAll(`.example-request`).forEach(el => el.style.display = 'none');
-            document.querySelectorAll(`.example-request-${lang}`).forEach(el => el.style.display = 'initial');
-            document.querySelectorAll(`.example-request-lang-toggle`).forEach(el => el.value = lang);
+        function switchExampleResponse(endpointId, index) {
+            document.querySelectorAll(`.example-response-${endpointId}`).forEach(el => el.style.display = 'none');
+            document.querySelectorAll(`.example-response-${endpointId}-${index}`).forEach(el => el.style.display =
+                'initial');
+            document.querySelectorAll(`.example-response-${endpointId}-toggle`).forEach(el => el.value = index);
         }
-    </script>
-@endif
-
-<script>
-    function switchExampleResponse(endpointId, index) {
-        document.querySelectorAll(`.example-response-${endpointId}`).forEach(el => el.style.display = 'none');
-        document.querySelectorAll(`.example-response-${endpointId}-${index}`).forEach(el => el.style.display = 'initial');
-        document.querySelectorAll(`.example-response-${endpointId}-toggle`).forEach(el => el.value = index);
-    }
-
-
-    /*
-     * Requirement: a div with class `expansion-chevrons`
-     *   (or `expansion-chevrons-solid` to use the solid version).
-     * Also add the `expanded` class if your div is expanded by default.
-     */
-    function toggleExpansionChevrons(evt) {
-        let elem = evt.currentTarget;
-
-        let chevronsArea = elem.querySelector('.expansion-chevrons');
-        const solid = chevronsArea.classList.contains('expansion-chevrons-solid');
-        const newState = chevronsArea.classList.contains('expanded') ? 'expand' : 'expanded';
-        if (newState === 'expanded') {
-            const selector = solid ? '#expanded-chevron-solid' : '#expanded-chevron';
-            const template = document.querySelector(selector);
-            const chevron = template.content.cloneNode(true);
-            chevronsArea.replaceChildren(chevron);
-            chevronsArea.classList.add('expanded');
-        } else {
-            const selector = solid ? '#expand-chevron-solid' : '#expand-chevron';
-            const template = document.querySelector(selector);
-            const chevron = template.content.cloneNode(true);
-            chevronsArea.replaceChildren(chevron);
-            chevronsArea.classList.remove('expanded');
+
+
+        /*
+         * Requirement: a div with class `expansion-chevrons`
+         *   (or `expansion-chevrons-solid` to use the solid version).
+         * Also add the `expanded` class if your div is expanded by default.
+         */
+        function toggleExpansionChevrons(evt) {
+            let elem = evt.currentTarget;
+
+            let chevronsArea = elem.querySelector('.expansion-chevrons');
+            const solid = chevronsArea.classList.contains('expansion-chevrons-solid');
+            const newState = chevronsArea.classList.contains('expanded') ? 'expand' : 'expanded';
+            if (newState === 'expanded') {
+                const selector = solid ? '#expanded-chevron-solid' : '#expanded-chevron';
+                const template = document.querySelector(selector);
+                const chevron = template.content.cloneNode(true);
+                chevronsArea.replaceChildren(chevron);
+                chevronsArea.classList.add('expanded');
+            } else {
+                const selector = solid ? '#expand-chevron-solid' : '#expand-chevron';
+                const template = document.querySelector(selector);
+                const chevron = template.content.cloneNode(true);
+                chevronsArea.replaceChildren(chevron);
+                chevronsArea.classList.remove('expanded');
+            }
+
         }
 
-    }
-
-    /**
-     * 1. Make sure the children are inside the parent element
-     * 2. Add `expandable` class to the parent
-     * 3. Add `children` class to the children.
-     * 4. Wrap the default chevron SVG in a div with class `expansion-chevrons`
-     *   (or `expansion-chevrons-solid` to use the solid version).
-     *   Also add the `expanded` class if your div is expanded by default.
-     */
-    function toggleElementChildren(evt) {
-        let elem = evt.currentTarget;
-        let children = elem.querySelector(`.children`);
-        if (!children) return;
-
-        if (children.contains(event.target)) return;
-
-        let oldState = children.style.display
-        if (oldState === 'none') {
-            children.style.removeProperty('display');
-            toggleExpansionChevrons(evt);
-        } else {
-            children.style.display = 'none';
-            toggleExpansionChevrons(evt);
+        /**
+         * 1. Make sure the children are inside the parent element
+         * 2. Add `expandable` class to the parent
+         * 3. Add `children` class to the children.
+         * 4. Wrap the default chevron SVG in a div with class `expansion-chevrons`
+         *   (or `expansion-chevrons-solid` to use the solid version).
+         *   Also add the `expanded` class if your div is expanded by default.
+         */
+        function toggleElementChildren(evt) {
+            let elem = evt.currentTarget;
+            let children = elem.querySelector(`.children`);
+            if (!children) return;
+
+            if (children.contains(event.target)) return;
+
+            let oldState = children.style.display
+            if (oldState === 'none') {
+                children.style.removeProperty('display');
+                toggleExpansionChevrons(evt);
+            } else {
+                children.style.display = 'none';
+                toggleExpansionChevrons(evt);
+            }
+
+            evt.stopPropagation();
         }
 
-        evt.stopPropagation();
-    }
+        function highlightSidebarItem(evt = null) {
+            if (evt && evt.oldURL) {
+                let oldHash = new URL(evt.oldURL).hash.slice(1);
+                if (oldHash) {
+                    let previousItem = window['sidebar'].querySelector(`#toc-item-${oldHash}`);
+                    previousItem.classList.remove('sl-bg-primary-tint');
+                    previousItem.classList.add('sl-bg-canvas-100');
+                }
+            }
 
-    function highlightSidebarItem(evt = null) {
-        if (evt && evt.oldURL) {
-            let oldHash = new URL(evt.oldURL).hash.slice(1);
-            if (oldHash) {
-                let previousItem = window['sidebar'].querySelector(`#toc-item-${oldHash}`);
-                previousItem.classList.remove('sl-bg-primary-tint');
-                previousItem.classList.add('sl-bg-canvas-100');
+            let newHash = location.hash.slice(1);
+            if (newHash) {
+                let item = window['sidebar'].querySelector(`#toc-item-${newHash}`);
+                item.classList.remove('sl-bg-canvas-100');
+                item.classList.add('sl-bg-primary-tint');
             }
         }
 
-        let newHash = location.hash.slice(1);
-        if (newHash) {
-            let item = window['sidebar'].querySelector(`#toc-item-${newHash}`);
-            item.classList.remove('sl-bg-canvas-100');
-            item.classList.add('sl-bg-primary-tint');
-        }
-    }
+        addEventListener('DOMContentLoaded', () => {
+            highlightSidebarItem();
 
-    addEventListener('DOMContentLoaded', () => {
-        highlightSidebarItem();
+            document.querySelectorAll('.code-editor').forEach(elem => CodeJar(elem, (editor) => {
+                // highlight.js does not trim old tags,
+                // which means highlighting doesn't update on type (only on paste)
+                // See https://github.com/antonmedv/codejar/issues/18
+                editor.textContent = editor.textContent
+                return hljs.highlightElement(editor)
+            }));
 
-        document.querySelectorAll('.code-editor').forEach(elem => CodeJar(elem, (editor) => {
-            // highlight.js does not trim old tags,
-            // which means highlighting doesn't update on type (only on paste)
-            // See https://github.com/antonmedv/codejar/issues/18
-            editor.textContent = editor.textContent
-            return hljs.highlightElement(editor)
-        }));
+            document.querySelectorAll('.expandable').forEach(el => {
+                el.addEventListener('click', toggleElementChildren);
+            });
 
-        document.querySelectorAll('.expandable').forEach(el => {
-            el.addEventListener('click', toggleElementChildren);
+            document.querySelectorAll('details').forEach(el => {
+                el.addEventListener('toggle', toggleExpansionChevrons);
+            });
         });
 
-        document.querySelectorAll('details').forEach(el => {
-            el.addEventListener('toggle', toggleExpansionChevrons);
-        });
-    });
-
-    addEventListener('hashchange', highlightSidebarItem);
-</script>
-
-<div class="sl-elements sl-antialiased sl-h-full sl-text-base sl-font-ui sl-text-body sl-flex sl-inset-0">
-
-    @include("scribe::themes.elements.sidebar")
-
-    <div class="sl-overflow-y-auto sl-flex-1 sl-w-full sl-px-16 sl-bg-canvas sl-py-16" style="max-width: 1500px;">
-
-        <div class="sl-mb-10">
-            <div class="sl-mb-4">
-                <h1 class="sl-text-5xl sl-leading-tight sl-font-prose sl-font-semibold sl-text-heading">
-                    {!! $metadata['title'] !!}
-                </h1>
-                @if($metadata['postman_collection_url'])
-                    <a title="Download Postman collection" class="sl-mx-1"
-                       href="{!! $metadata['postman_collection_url'] !!}" target="_blank">
-                        <small>Postman collection →</small>
-                    </a>
-                @endif
-                @if($metadata['openapi_spec_url'])
-                    <a title="Download OpenAPI spec" class="sl-mx-1"
-                       href="{!! $metadata['openapi_spec_url'] !!}" target="_blank">
-                        <small>OpenAPI spec →</small>
-                    </a>
-                @endif
+        addEventListener('hashchange', highlightSidebarItem);
+    </script>
+
+    <div class="sl-elements sl-antialiased sl-h-full sl-text-base sl-font-ui sl-text-body sl-flex sl-inset-0">
+
+        @include('scribe::themes.elements.sidebar')
+
+        <div class="sl-overflow-y-auto sl-flex-1 sl-w-full sl-px-16 sl-bg-canvas sl-py-16" style="max-width: 1500px;">
+
+            <div class="sl-mb-10">
+                <div class="sl-mb-4">
+                    <h1 class="sl-text-5xl sl-leading-tight sl-font-prose sl-font-semibold sl-text-heading">
+                        {!! $metadata['title'] !!}
+                    </h1>
+                    @if ($metadata['postman_collection_url'])
+                        <a title="Download Postman collection" class="sl-mx-1" href="{!! $metadata['postman_collection_url'] !!}"
+                            target="_blank">
+                            <small>Postman collection →</small>
+                        </a>
+                    @endif
+                    @if ($metadata['openapi_spec_url'])
+                        <a title="Download OpenAPI spec" class="sl-mx-1" href="{!! $metadata['openapi_spec_url'] !!}" target="_blank">
+                            <small>OpenAPI spec →</small>
+                        </a>
+                    @endif
+                </div>
+
+                <div class="sl-prose sl-markdown-viewer sl-my-4">
+                    {!! $intro !!}
+
+                    {!! $auth !!}
+                </div>
             </div>
 
-            <div class="sl-prose sl-markdown-viewer sl-my-4">
-                {!! $intro !!}
+            @include('scribe::themes.elements.groups')
 
-                {!! $auth !!}
+            <div class="sl-prose sl-markdown-viewer sl-my-5">
+                {!! $append !!}
             </div>
         </div>
 
-        @include("scribe::themes.elements.groups")
-
-        <div class="sl-prose sl-markdown-viewer sl-my-5">
-            {!! $append !!}
-        </div>
     </div>
 
-</div>
-
-<template id="expand-chevron">
-    <svg aria-hidden="true" focusable="false" data-prefix="fas"
-         data-icon="chevron-right"
-         class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
-         xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
-        <path fill="currentColor"
-              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>
-    </svg>
-</template>
-
-<template id="expanded-chevron">
-    <svg aria-hidden="true" focusable="false" data-prefix="fas"
-         data-icon="chevron-down"
-         class="svg-inline--fa fa-chevron-down fa-fw sl-icon sl-text-muted"
-         xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
-        <path fill="currentColor"
-              d="M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z"></path>
-    </svg>
-</template>
-
-<template id="expand-chevron-solid">
-    <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="caret-right"
-         class="svg-inline--fa fa-caret-right fa-fw sl-icon" role="img" xmlns="http://www.w3.org/2000/svg"
-         viewBox="0 0 256 512">
-        <path fill="currentColor"
-              d="M118.6 105.4l128 127.1C252.9 239.6 256 247.8 256 255.1s-3.125 16.38-9.375 22.63l-128 127.1c-9.156 9.156-22.91 11.9-34.88 6.943S64 396.9 64 383.1V128c0-12.94 7.781-24.62 19.75-29.58S109.5 96.23 118.6 105.4z"></path>
-    </svg>
-</template>
-
-<template id="expanded-chevron-solid">
-    <svg aria-hidden="true" focusable="false" data-prefix="fas"
-         data-icon="caret-down"
-         class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img"
-         xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
-        <path fill="currentColor"
-              d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"></path>
-    </svg>
-</template>
+    <template id="expand-chevron">
+        <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right"
+            class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted" xmlns="http://www.w3.org/2000/svg"
+            viewBox="0 0 320 512">
+            <path fill="currentColor"
+                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>
+        </svg>
+    </template>
+
+    <template id="expanded-chevron">
+        <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-down"
+            class="svg-inline--fa fa-chevron-down fa-fw sl-icon sl-text-muted" xmlns="http://www.w3.org/2000/svg"
+            viewBox="0 0 448 512">
+            <path fill="currentColor"
+                d="M224 416c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L224 338.8l169.4-169.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-192 192C240.4 412.9 232.2 416 224 416z">
+            </path>
+        </svg>
+    </template>
+
+    <template id="expand-chevron-solid">
+        <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="caret-right"
+            class="svg-inline--fa fa-caret-right fa-fw sl-icon" role="img" xmlns="http://www.w3.org/2000/svg"
+            viewBox="0 0 256 512">
+            <path fill="currentColor"
+                d="M118.6 105.4l128 127.1C252.9 239.6 256 247.8 256 255.1s-3.125 16.38-9.375 22.63l-128 127.1c-9.156 9.156-22.91 11.9-34.88 6.943S64 396.9 64 383.1V128c0-12.94 7.781-24.62 19.75-29.58S109.5 96.23 118.6 105.4z">
+            </path>
+        </svg>
+    </template>
+
+    <template id="expanded-chevron-solid">
+        <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="caret-down"
+            class="svg-inline--fa fa-caret-down fa-fw sl-icon" role="img" xmlns="http://www.w3.org/2000/svg"
+            viewBox="0 0 320 512">
+            <path fill="currentColor"
+                d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z">
+            </path>
+        </svg>
+    </template>
 </body>
+
 </html>

+ 32 - 27
resources/views/vendor/scribe/themes/elements/sidebar.blade.php

@@ -1,9 +1,10 @@
-<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"
-     style="width: calc((100% - 1800px) / 2 + 300px); padding-left: calc((100% - 1800px) / 2); min-width: 300px; max-height: 100vh">
+<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"
+    style="width: calc((100% - 1800px) / 2 + 300px); padding-left: calc((100% - 1800px) / 2); min-width: 300px; max-height: 100vh">
     <div class="sl-flex sl-items-center sl-mb-5 sl-ml-4">
-        @if($metadata['logo'] != false)
+        @if ($metadata['logo'] != false)
             <div class="sl-inline sl-overflow-x-hidden sl-overflow-y-hidden sl-mr-3 sl-rounded-lg"
-                 style="background-color: transparent;">
+                style="background-color: transparent;">
                 <img src="{{ $metadata['logo'] }}" height="30px" width="30px" alt="logo">
             </div>
         @endif
@@ -15,57 +16,61 @@
     <div class="sl-flex sl-overflow-y-auto sl-flex-col sl-flex-grow sl-flex-shrink">
         <div class="sl-overflow-y-auto sl-w-full sl-bg-canvas-100">
             <div class="sl-my-3">
-                @foreach($headings as $h1)
+                @foreach ($headings as $h1)
                     <div class="expandable">
                         <div title="{!! $h1['name'] !!}" id="toc-item-{!! $h1['slug'] !!}"
-                             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">
+                            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">
                             <a href="#{!! $h1['slug'] !!}"
-                               class="sl-flex-1 sl-items-center sl-truncate sl-mr-1.5 sl-p-0">{!! $h1['name'] !!}</a>
-                            @if(count($h1['subheadings']) > 0)
+                                class="sl-flex-1 sl-items-center sl-truncate sl-mr-1.5 sl-p-0">{!! $h1['name'] !!}</a>
+                            @if (count($h1['subheadings']) > 0)
                                 <div class="sl-flex sl-items-center sl-text-xs expansion-chevrons">
                                     <svg aria-hidden="true" focusable="false" data-prefix="fas"
-                                         data-icon="chevron-right"
-                                         class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
-                                         xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
+                                        data-icon="chevron-right"
+                                        class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
+                                        xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
                                         <path fill="currentColor"
-                                              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>
+                                            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>
                                     </svg>
                                 </div>
                             @endif
                         </div>
 
-                        @if(count($h1['subheadings']) > 0)
+                        @if (count($h1['subheadings']) > 0)
                             <div class="children" style="display: none;">
-                                @foreach($h1['subheadings'] as $h2)
+                                @foreach ($h1['subheadings'] as $h2)
                                     <div class="expandable">
                                         <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"
-                                             id="toc-item-{!! $h2['slug'] !!}">
-                                            <div class="sl-flex-1 sl-items-center sl-truncate sl-mr-1.5 sl-p-0" title="{!! $h2['name'] !!}">
+                                            id="toc-item-{!! $h2['slug'] !!}">
+                                            <div class="sl-flex-1 sl-items-center sl-truncate sl-mr-1.5 sl-p-0"
+                                                title="{!! $h2['name'] !!}">
                                                 <a class="ElementsTableOfContentsItem sl-block sl-no-underline"
-                                                   href="#{!! $h2['slug'] !!}">
+                                                    href="#{!! $h2['slug'] !!}">
                                                     {!! $h2['name'] !!}
                                                 </a>
                                             </div>
-                                            @if(count($h2['subheadings']) > 0)
+                                            @if (count($h2['subheadings']) > 0)
                                                 <div class="sl-flex sl-items-center sl-text-xs expansion-chevrons">
                                                     <svg aria-hidden="true" focusable="false" data-prefix="fas"
-                                                         data-icon="chevron-right"
-                                                         class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
-                                                         xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
+                                                        data-icon="chevron-right"
+                                                        class="svg-inline--fa fa-chevron-right fa-fw sl-icon sl-text-muted"
+                                                        xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
                                                         <path fill="currentColor"
-                                                              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>
+                                                            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>
                                                     </svg>
                                                 </div>
                                             @endif
                                         </div>
 
-                                        @if(count($h2['subheadings']) > 0)
+                                        @if (count($h2['subheadings']) > 0)
                                             <div class="children" style="display: none;">
-                                                @foreach($h2['subheadings'] as $h3)
+                                                @foreach ($h2['subheadings'] as $h3)
                                                     <a class="ElementsTableOfContentsItem sl-block sl-no-underline"
-                                                       href="#{!! $h3['slug'] !!}">
-                                                        <div title="{!! $h3['name'] !!}" id="toc-item-{!! $h3['slug'] !!}"
-                                                             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">
+                                                        href="#{!! $h3['slug'] !!}">
+                                                        <div title="{!! $h3['name'] !!}"
+                                                            id="toc-item-{!! $h3['slug'] !!}"
+                                                            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">
                                                             {!! $h3['name'] !!}
                                                         </div>
                                                     </a>

Some files were not shown because too many files changed in this diff