Skip to content

Commit

Permalink
Improve spacing in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Jul 6, 2021
1 parent 258b973 commit 2af8d8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion resources/css/theme-default.style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 6 additions & 10 deletions resources/views/themes/default/endpoint.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 2af8d8e

Please sign in to comment.