Colour Code HTTP Methods
Most API Docs seem to colour code the HTTP methods to make for easier reading. This sets: GET / HEAD - Blue POST - Green PATCH/PUT - Yellow DELETE - Red By reuseing some of the bootstrap label-* css. Change-Id: Ic58edeb672ced1e66849c561133f272982abcb4e
This commit is contained in:
@@ -407,7 +407,7 @@ def rest_method_html(self, node):
|
||||
<div class="col-md-1 operation">
|
||||
<a name="%(target)s" class="operation-anchor" href="#%(target)s">
|
||||
<span class="glyphicon glyphicon-link"></span></a>
|
||||
<span class="label label-success">%(method)s</span>
|
||||
<span class="label label-%(method)s">%(method)s</span>
|
||||
</div>
|
||||
<div class="col-md-5">%(url)s</div>
|
||||
<div class="col-md-5">%(desc)s</div>
|
||||
|
@@ -82,4 +82,39 @@ a.operation-anchor {
|
||||
|
||||
.versionmodified {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.label-POST {
|
||||
background-color: #5cb85c;
|
||||
}
|
||||
.label-POST[href]:hover,
|
||||
.label-POST[href]:focus {
|
||||
background-color: #449d44;
|
||||
}
|
||||
.label-GET,
|
||||
.label-HEAD {
|
||||
background-color: #5bc0de;
|
||||
}
|
||||
.label-GET[href]:hover,
|
||||
.label-GET[href]:focus,
|
||||
.label-HEAD[href]:hover,
|
||||
.label-HEAD[href]:focus {
|
||||
background-color: #31b0d5;
|
||||
}
|
||||
.label-PUT,
|
||||
.label-PATCH {
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
.label-PUT[href]:hover,
|
||||
.label-PUT[href]:focus,
|
||||
.label-PATCH[href]:hover,
|
||||
.label-PATCH[href]:focus {
|
||||
background-color: #ec971f;
|
||||
}
|
||||
.label-DELETE {
|
||||
background-color: #d9534f;
|
||||
}
|
||||
.label-DELETE[href]:hover,
|
||||
.label-DELETE[href]:focus {
|
||||
background-color: #c9302c;
|
||||
}
|
||||
|
Reference in New Issue
Block a user