File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ def avatar_url_for(login)
4646 end
4747
4848 def headers ( status , head = { } )
49- css_class = ( status == 202 || status == 204 || status == 205 || status == 404 ) ? 'headers no-response' : 'headers'
5049 lines = [ "Status: #{ STATUSES [ status ] } " ]
5150 head . each do |key , value |
5251 case key
@@ -60,7 +59,7 @@ def headers(status, head = {})
6059 lines << "X-RateLimit-Limit: 5000" unless head . has_key? ( 'X-RateLimit-Limit' )
6160 lines << "X-RateLimit-Remaining: 4999" unless head . has_key? ( 'X-RateLimit-Remaining' )
6261
63- %(<pre class="#{ css_class } "><code>#{ lines * "\n " } </code></pre>\n )
62+ %(<pre class="headers "><code>#{ lines * "\n " } </code></pre>\n )
6463 end
6564
6665 def link_header ( rels )
@@ -99,7 +98,7 @@ def json(key)
9998
10099 hash = yield hash if block_given?
101100
102- %(<pre><code class="language-javascript">) +
101+ %(<pre class="body-response" ><code class="language-javascript">) +
103102 JSON . pretty_generate ( hash ) + "</code></pre>"
104103 end
105104
Original file line number Diff line number Diff line change @@ -1220,14 +1220,9 @@ pre span.comment {color: #aaa;}
12201220
12211221.headers {
12221222 margin-bottom : 0 ;
1223- border-bottom : none;
1224- border-radius : 3px 3px 0 0 ;
1225- background-color : # f4f4f4 ;
1226- }
1227-
1228- .no-response {
12291223 border-radius : 3px 3px ;
12301224 border-bottom : 1px solid # CACACA ;
1225+ background-color : # f4f4f4 ;
12311226}
12321227
12331228.headers + pre {
@@ -1236,6 +1231,10 @@ pre span.comment {color: #aaa;}
12361231 border-top-color : # ddd ;
12371232}
12381233
1234+ .headers + pre .body-response {
1235+ margin-top : -2px ;
1236+ }
1237+
12391238.terminal {
12401239 background-color : # 444 ;
12411240 color : # fff ;
You can’t perform that action at this time.
0 commit comments