Browse Source

Improve spacing in UI

shalvah 4 years ago
parent
commit
2af8d8eacd

+ 1 - 1
resources/css/theme-default.style.css

@@ -858,7 +858,7 @@ html {
 .content pre {
     background-color: #292929;
     color: #fff;
-    padding: 2em 28px;
+    padding: 1.5em 28px;
     margin: 0;
     width: 50%;
     float: right;

+ 6 - 10
resources/views/themes/default/endpoint.blade.php

@@ -32,24 +32,20 @@
             <summary>
                 <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small>
             </summary>
-            <pre>
-            <code class="language-http">@foreach($response->headers as $header => $value)
+            <pre><code class="language-http">@foreach($response->headers as $header => $value)
 {{ $header }}: {{ is_array($value) ? implode('; ', $value) : $value }}
-@endforeach </code>
-            </pre>
+@endforeach </code></pre>
         </details> @endif
         <pre>
-                <code class="language-json">
 @if(is_string($response->content) && Str::startsWith($response->content, "<<binary>>"))
-[Binary data] - {{ htmlentities(str_replace("<<binary>>", "", $response->content)) }}
+<code>[Binary data] - {{ htmlentities(str_replace("<<binary>>", "", $response->content)) }}</code>
 @elseif($response->status == 204)
-[Empty response]
+<code>[Empty response]</code>
 @else
 @php($parsed = json_decode($response->content))
 {{-- If response is a JSON string, prettify it. Otherwise, just print it --}}
-{!! htmlentities($parsed != null ? json_encode($parsed, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) : $response->content) !!}
-@endif </code>
-        </pre>
+<code class="language-json">{!! htmlentities($parsed != null ? json_encode($parsed, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) : $response->content) !!}</code>
+@endif </pre>
     @endforeach
 @endif
 </span>