File tree Expand file tree Collapse file tree 8 files changed +47
-15
lines changed
Expand file tree Collapse file tree 8 files changed +47
-15
lines changed Original file line number Diff line number Diff line change 22/* @var Matchory\Herodot\Entities\Endpoint $endpoint */
33
44? >
5- <div {{ $attributes -> merge ([ ' class' => ' flex-grow-0 flex-shrink-0 w-1/2 ' ]) } } >
5+ <div {{ $attributes -> merge ([ ' class' => ' ' ]) } } >
66 <div class =" text-base leading-relaxed mb-4" >
77 @if ($endpoint -> getDescription () )
88 <div class =" markdown" >{!! trim ($description ()) ! !} </div >
Original file line number Diff line number Diff line change 22/* @var Matchory\Herodot\Entities\Endpoint $endpoint */
33
44? >
5- <div {{ $attributes -> merge ([ ' class' => ' sticky top-16 flex-grow-0 flex-shrink-0 w-1/2' ]) } } >
6- <pre class =" ml-4 p-4 rounded-lg bg-gray-800 text-gray-50" >
7- <code class =" " > code sample here</code >
8- <code > code sample here</code >
9- <code > code sample here</code >
10- </pre >
5+ <div {{ $attributes -> merge ([ ' class' => ' sticky top-16' ]) } } >
6+ <div class =" lg:ml-4 px-4 py-2 rounded-lg bg-gray-800" >
7+ <header class =" flex items-center mb-4 text-gray-400" >
8+ <span class =" uppercase text-xs mr-auto" >Request</span >
9+
10+ <label class =" mr-2" >
11+ <select class =" bg-transparent text-xs" >
12+ <option disabled selected >Language</option >
13+ <option >PHP</option >
14+ <option >Go</option >
15+ <option >JavaScript</option >
16+ <option >Python</option >
17+ <option >curl</option >
18+ </select >
19+ </label >
20+
21+ <button >
22+ <span class =" sr-only" >Copy to clipboard</span >
23+ <span class =" material-icons text-base" >content_copy</span >
24+ </button >
25+ </header >
26+
27+ <pre class =" text-gray-100 py-2" data-sample-js >fetch()</pre >
28+ </div >
1129
1230 {{ $slot } }
1331</div >
Original file line number Diff line number Diff line change 22/* @var Matchory\Herodot\Entities\Endpoint $endpoint */
33
44? >
5- <code {{ $attributes -> merge ([ ' class' => ' flex items-center w-1/2 p-4 text-sm rounded bg-gray-100 dark:bg-gray-800' ]) } } >
5+ <code {{ $attributes -> merge ([ ' class' => ' flex items-center lg: w-1/2 p-4 text-sm rounded bg-gray-100 dark:bg-gray-800' ]) } } >
66 <span class =" py-1 px-2 rounded bg-blue-500 text-gray-100" >{{ $methods () } } </span >
77 <span class =" flex items-center ml-3 text-gray-700 dark:text-gray-300" >
88 @foreach ($segments () as $segment )
Original file line number Diff line number Diff line change 11<section {{ $attributes -> merge ([ ' class' => ' p-8' ]) } } >
22 <x-herodot-endpoint-header :endpoint =" $endpoint" />
33
4- <div class =" flex items-start justify-evenly" >
5- <x-herodot-endpoint-info :endpoint =" $endpoint" />
6- <x-herodot-endpoint-sample :endpoint =" $endpoint" />
4+ <div class =" flex flex-col lg:flex-row items-start justify-evenly" >
5+ <x-herodot-endpoint-info :endpoint =" $endpoint" class = " flex-grow-0 flex-shrink-0 w-full lg:w-1/2 " />
6+ <x-herodot-endpoint-sample :endpoint =" $endpoint" class = " flex-grow-0 flex-shrink-0 w-full lg:w-1/2 " />
77 </div >
88
99 {{ $slot } }
Original file line number Diff line number Diff line change 1- <section class =" herodot-endpoint-groups__endpoint-group " >
1+ <section class =" xl:p-16 " >
22 @if ($name )
33 <header class =" mx-8 pb-4" >
44 <h2 class =" text-3xl leading-relaxed" id =" {{ Str:: slug ($name ) } }" >
Original file line number Diff line number Diff line change 1- <article class =" mb-8" >
1+ <article class =" mb-8 xl:p-16 " >
22 <header class =" mx-8 pb-4" >
33 <h2 class =" text-3xl leading-relaxed" id =" {{ $page -> slug () } }" >
44 <a href =" #{{ $page -> slug () } }" >{{ $page -> title () } } </a >
Original file line number Diff line number Diff line change 11<html lang =" en" >
22 <head >
33 <title >@yield (' title' ) | {{ config (' app.name' ) } } </title >
4+ <meta name =" viewport" content =" width=device-width, initial-scale=1" >
5+ <meta name =" theme-color" content =" #fafafa" >
6+
7+ <meta property =" og:title" content =" @yield (' title' ) | {{ config (' app.name' ) } }" >
8+ <meta property =" og:type" content =" website" >
9+ <meta property =" og:url" content =" {{ config (' app.url' ) } }" >
10+
411 <link rel =" preconnect" href =" https://fonts.gstatic.com" >
512 <link href =" https://fonts.googleapis.com/css2?family=Material+Icons&family=JetBrains+Mono:wght@400;700&family=Open+Sans:wght@300;400;600&display=swap"
613 rel =" stylesheet" >
7- <link href =" {{ asset (' vendor/matchory/main.min. css' ) } }" rel =" stylesheet" />
14+ <link href =" {{ asset (' vendor/matchory/main.css' ) } }" rel =" stylesheet" />
815 <script >
916 if ( localStorage .theme === ' dark' ) {
1017 document .documentElement .classList .add ( ' dark' );
2835 @yield (' footer' )
2936 </main >
3037
31- <script src =" {{ asset (' vendor/matchory/bundle.min. js' ) } }" ></script >
38+ <script src =" {{ asset (' vendor/matchory/bundle.js' ) } }" ></script >
3239 </body >
3340</html >
Original file line number Diff line number Diff line change @@ -18,4 +18,11 @@ public function render(): ViewContract
1818 {
1919 return View::make ('herodot::components.endpoint-sample ' );
2020 }
21+
22+ public function sampleJavaScript (): string
23+ {
24+ $ url = $ this ->endpoint ->getUri ();
25+
26+ return "fetch( {$ url }); " ;
27+ }
2128}
You can’t perform that action at this time.
0 commit comments