minified css, 1xx codes added

This commit is contained in:
Samuel Ryan 2012-08-11 23:24:05 +01:00
parent 2f86d0e78f
commit 3f29a1bd4b
6 changed files with 120 additions and 11 deletions

View File

@ -38,12 +38,27 @@ via git)
"body":"IETF Description",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"item":{
"title":"Reference Title",
"value":"Reference Value"
},
"item2":{
"title":"Reference Title",
"value":"Reference Value"
}
}
}
}
}
```
JSON should be formatted as above (lots of indentation :-))
## to do
clean up the HTML and CSS
## notes
httpstatus.es is built with [klein.php](https://raw.github.com/chriso/klein.php)

1
assets/css/style.min.css vendored Normal file
View File

@ -0,0 +1 @@
*{padding:0;margin:0}body{color:#556270;font-family:Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;line-height:20px;background-color:#FFF}a{font-weight:bold;text-decoration:none;color:#d6156c}a:hover{color:#f56991}#wrapper{margin:40px;width:600px}.header{font-size:22px;font-weight:bold;margin-bottom:10px}.header .status_title{color:#BBB;text-transform:uppercase;line-height:24px}.share_buttons{width:auto;float:right}.share_buttons .share_button{float:left;display:block}#return{font-size:14px}#intro{font-family:Georgia;font-size:14px;line-height:24px}#intro p{margin-bottom:10px}#intro a{text-decoration:none;color:#AAA}#desc{font-family:Georgia;font-size:14px;line-height:24px}#desc p{margin-bottom:10px}#desc .reference{font-size:13px}#statuses{margin-top:20px}.status_list{margin-bottom:20px}.status_list .head{border-bottom:2px solid #EEE;margin-bottom:10px;padding-bottom:2px}.status_list .head .title{font-weight:bold;font-size:14px;float:left;text-transform:lowercase}.status_list .head .description{font-style:italic;float:right}.status_list .status{width:180px;padding-right:20px;height:70px;float:left;overflow:hidden}.status_list .status .st{font-size:14px;font-weight:bold}.status_list .status .description{font-size:11px;height:46px;overflow:hidden;width:160px}#code_references{margin:20px 0}.info_list{font-size:14px}.info_list .info_item .title{width:200px;float:left}.info_list .info_item .value{float:left}#footer{margin-top:10px;font-size:11px}.clear{clear:both}

89
codes/1.json Normal file
View File

@ -0,0 +1,89 @@
{
"class":{
"title":"Informational",
"class":"1"
},
"codes":{
"100":{
"code":"100",
"title":"Continue",
"summary":"Client should continue with request",
"descriptions":{
"wikipedia":{
"body":"This means that the server has received the request headers, and that the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient. To have a server check if the request could be accepted based on the request's headers alone, a client must send Expect: 100-continue as a header in its initial request and check if a 100 Continue status code is received in response before continuing (or receive 417 Expectation Failed and not continue).",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#100"
},
"ietf":{
"body":"The client SHOULD continue with its request. This interim response is used to inform the client that the initial part of the request has been received and has not yet been rejected by the server. The client SHOULD continue by sending the remainder of the request or, if the request has already been completed, ignore this response. The server MUST send a final response after the request has been completed.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":continue"
}
}
},
"101":{
"code":"101",
"title":"Switching Protocols",
"summary":"Server is switching protocols",
"descriptions":{
"wikipedia":{
"body":"This means the requester has asked the server to switch protocols and the server is acknowledging that it will do so.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#101"
},
"ietf":{
"body":"The server understands and is willing to comply with the client's request, via the Upgrade message header field, for a change in the application protocol being used on this connection. The server will switch protocols to those defined by the response's Upgrade header field immediately after the empty line which terminates the 101 response. \r\nThe protocol SHOULD be switched only when it is advantageous to do so. For example, switching to a newer version of HTTP is advantageous over older versions, and switching to a real-time, synchronous protocol might be advantageous when delivering resources that use such features.",
"link":"http:\/\/www.ietf.org\/rfc\/rfc2616.txt"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":switching_protocols"
}
}
},
"102":{
"code":"102",
"title":"Processing (WebDAV) (RFC 2518)",
"summary":"Server has received and is processing the request",
"descriptions":{
"wikipedia":{
"body":"As a WebDAV request may contain many sub-requests involving file operations, it may take a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#102"
}
},
"references":{
"rails":{
"title":"Rails HTTP Status Symbol",
"value":":processing"
}
}
},
"103":{
"code":"103",
"title":"Checkpoint",
"summary":"resume aborted PUT or POST requests",
"descriptions":{
"wikipedia":{
"body":"This code is used in the Resumable HTTP Requests Proposal to resume aborted PUT or POST requests.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#103"
}
}
},
"122":{
"code":"122",
"title":"Request-URI too long",
"summary":"URI is longer than a maximum of 2083 characters",
"descriptions":{
"wikipedia":{
"body":"This is a non-standard IE7-only code which means the URI is longer than a maximum of 2083 characters.",
"link":"http:\/\/en.wikipedia.org\/wiki\/List_of_HTTP_status_codes#122"
}
}
}
}
}

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>(Actual) 404 &mdash; httpstatus.es</title>
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
<link rel="stylesheet" href="assets/css/style.min.css" type="text/css" />
<script type="text/javascript">
var _gaq = _gaq || [];

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>HTTP Status Codes &mdash; httpstatus.es</title>
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
<link rel="stylesheet" href="assets/css/style.min.css" type="text/css" />
<script type="text/javascript">
var _gaq = _gaq || [];
@ -23,35 +23,39 @@
<div id="wrapper">
<div class="header">
httpstatus.es
<!--
<div class="share_buttons">
<!--
<div class="share_button" id="gittip">
<iframe style="border: 0; margin: 0 20px 0 0; padding: 0;" src="https://www.gittip.com/citricsquid/widget.html" width="48" height="20"></iframe>
</div>
-->
<div class="share_button" id="twitter">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="citricsquid">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<div class="share_button" id="facebook">
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fhttpstatus.es&amp;send=false&amp;layout=button_count&amp;width=250&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fhttpstatus.es&amp;send=false&amp;layout=button_count&amp;width=250&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px; text-align:right;" allowTransparency="true"></iframe>
</div>
</div>
<div class="clear"></div>
-->
</div>
<div id="intro">
<p>
Database of HTTP status codes with their IETF and Wikipedia descriptions.
Maintained by <a href="http://twitter.com/citricsquid">@citricsquid</a>.
Submit changes/corrections/comments via twitter or
<a href="mailto:sam@samryan.co.uk">email</a>.
Database of HTTP status codes with their IETF + Wikipedia
descriptions and helpful code references.
Maintained by
<a href="http://twitter.com/citricsquid">@citricsquid</a>.
New codes and improvements can be commited via the
<a href="https://github.com/citricsquid/httpstatus.es">
Github repository
</a>
</p>
</div>
<div id="statuses">
<?php foreach($this->class_list as $id => $class) { ?>
<div class="status_list" id="<?php echo $id; ?>">
<div class="head">
<div class="title"><?php echo $class["class"]["title"]; ?></div>
<div class="title"><?php echo $id; ?>xx <?php echo $class["class"]["title"]; ?></div>
<div class="clear"></div>
</div>
<div class="statuses">

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title><?php echo $this->code; ?> &mdash; httpstatus.es</title>
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
<link rel="stylesheet" href="assets/css/style.min.css" type="text/css" />
<script type="text/javascript">
var _gaq = _gaq || [];