Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improved the way errors are got triggered by toto

  • Loading branch information...
commit a3364234d17f4b07f998e4d32e9396bfc074063b 1 parent 129026d
@ixti authored
View
4 config.ru
@@ -47,6 +47,10 @@ map "/" do
set :markdown, [:gh_blockcode, :strikethrough, :fenced_code, :no_intraemphasis]
set :disqus, "ixti"
set :cache, 24*60*60
+ set :error, lambda { |code|
+ code = 500 unless [400, 404, 500].include? code.to_i
+ IO.read "public/#{code}.html"
+ }
end
run toto
View
8 public/400.html
@@ -4,11 +4,11 @@
<meta charset="utf-8">
<title>Bad Request</title>
<style>
- body { text-align: center;}
- h1 { font-size: 50px; text-align: center }
+ body { text-align: center; }
+ h1 { font-size: 50px; text-align: center; }
body { font: 20px Constantia, 'Hoefler Text', "Adobe Caslon Pro", Baskerville, Georgia, Times, serif; color: #999; text-shadow: 2px 2px 2px rgba(200, 200, 200, 0.5); }
- ::-moz-selection{ background:#FF5E99; color:#fff; }
- ::selection { background:#FF5E99; color:#fff; }
+ ::-moz-selection{ background:#999; color:#fff; }
+ ::selection { background:#999; color:#fff; }
</style>
</head>
<body>
View
11 public/404.html
@@ -4,12 +4,11 @@
<meta charset="utf-8">
<title>Page Not Found</title>
<style>
- body { text-align: center;}
- h1 { font-size: 50px; text-align: center }
- span[frown] { transform: rotate(90deg); display:inline-block; color: #bbb; }
+ body { text-align: center; }
+ h1 { font-size: 50px; text-align: center; }
body { font: 20px Constantia, 'Hoefler Text', "Adobe Caslon Pro", Baskerville, Georgia, Times, serif; color: #999; text-shadow: 2px 2px 2px rgba(200, 200, 200, 0.5); }
- ::-moz-selection{ background:#FF5E99; color:#fff; }
- ::selection { background:#FF5E99; color:#fff; }
+ ::-moz-selection{ background:#999; color:#fff; }
+ ::selection { background:#999; color:#fff; }
article {display:block; text-align: left; width: 500px; margin: 0 auto; }
a { color: rgb(36, 109, 56); text-decoration:none; }
@@ -18,7 +17,7 @@
</head>
<body>
<article>
- <h1>Not found <span frown>:(</span></h1>
+ <h1>Page Not found</h1>
<div>
<p>Sorry, but the page you were trying to view does not exist.</p>
View
8 public/500.html
@@ -4,11 +4,11 @@
<meta charset="utf-8">
<title>Application Error</title>
<style>
- body { text-align: center;}
- h1 { font-size: 50px; text-align: center }
+ body { text-align: center; }
+ h1 { font-size: 50px; text-align: center; }
body { font: 20px Constantia, 'Hoefler Text', "Adobe Caslon Pro", Baskerville, Georgia, Times, serif; color: #999; text-shadow: 2px 2px 2px rgba(200, 200, 200, 0.5); }
- ::-moz-selection{ background:#FF5E99; color:#fff; }
- ::selection { background:#FF5E99; color:#fff; }
+ ::-moz-selection{ background:#999; color:#fff; }
+ ::selection { background:#999; color:#fff; }
</style>
</head>
<body>
Please sign in to comment.
Something went wrong with that request. Please try again.