There was an error while loading. Please reload this page.
1 parent 6a247f5 commit c9280d6Copy full SHA for c9280d6
2 files changed
lib/resources.rb
@@ -46,7 +46,6 @@ def avatar_url_for(login)
46
end
47
48
def headers(status, head = {})
49
- css_class = (status == 202 || status == 204 || status == 205 || status == 404) ? 'headers no-response' : 'headers'
50
lines = ["Status: #{STATUSES[status]}"]
51
head.each do |key, value|
52
case key
@@ -60,7 +59,7 @@ def headers(status, head = {})
60
59
lines << "X-RateLimit-Limit: 5000" unless head.has_key?('X-RateLimit-Limit')
61
lines << "X-RateLimit-Remaining: 4999" unless head.has_key?('X-RateLimit-Remaining')
62
63
- %(<pre class="#{css_class}"><code>#{lines * "\n"}</code></pre>\n)
+ %(<pre class="headers"><code>#{lines * "\n"}</code></pre>\n)
64
65
66
def link_header(rels)
@@ -99,7 +98,7 @@ def json(key)
99
98
100
hash = yield hash if block_given?
101
102
- %(<pre><code class="language-javascript">) +
+ %(<pre class="body-response"><code class="language-javascript">) +
103
JSON.pretty_generate(hash) + "</code></pre>"
104
105
static/css/documentation.css
@@ -1220,14 +1220,9 @@ pre span.comment {color: #aaa;}
1220
1221
.headers {
1222
margin-bottom: 0;
1223
- border-bottom: none;
1224
- border-radius: 3px 3px 0 0;
1225
- background-color: #f4f4f4;
1226
-}
1227
-
1228
-.no-response {
1229
border-radius: 3px 3px;
1230
border-bottom: 1px solid #CACACA;
+ background-color: #f4f4f4;
1231
}
1232
1233
.headers + pre {
@@ -1236,6 +1231,10 @@ pre span.comment {color: #aaa;}
1236
border-top-color: #ddd;
1237
1238
1234
+.headers + pre.body-response {
1235
+ margin-top: -2px;
+}
+
1239
.terminal {
1240
background-color: #444;
1241
color: #fff;
0 commit comments