1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

80 columns

This commit is contained in:
Simon Rozet 2009-03-15 00:54:58 +01:00 committed by Ryan Tomayko
parent 65c0a49df5
commit 5531fa3820

View file

@ -50,19 +50,27 @@ TEMPLATE = <<HTML
<style type="text/css" media="screen"> <style type="text/css" media="screen">
* {margin: 0; padding: 0; border: 0; outline: 0;} * {margin: 0; padding: 0; border: 0; outline: 0;}
div.clear {clear: both;} div.clear {clear: both;}
body {background: #EEEEEE; margin: 0; padding: 0; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Garuda';} body {background: #EEEEEE; margin: 0; padding: 0;
code {font-family: 'Lucida Console', monospace; font-size: 12px;} font-family: 'Lucida Grande', 'Lucida Sans Unicode',
'Garuda';}
code {font-family: 'Lucida Console', monospace;
font-size: 12px;}
li {height: 18px;} li {height: 18px;}
ul {list-style: none; margin: 0; padding: 0;} ul {list-style: none; margin: 0; padding: 0;}
ol:hover {cursor: pointer;} ol:hover {cursor: pointer;}
ol li {white-space: pre;} ol li {white-space: pre;}
#explanation {font-size: 12px; color: #666666; margin: 20px 0 0 100px;} #explanation {font-size: 12px; color: #666666;
margin: 20px 0 0 100px;}
/* WRAP */ /* WRAP */
#wrap {width: 860px; background: #FFFFFF; margin: 0 auto; padding: 30px 50px 20px 50px; border-left: 1px solid #DDDDDD; border-right: 1px solid #DDDDDD;} #wrap {width: 860px; background: #FFFFFF; margin: 0 auto;
padding: 30px 50px 20px 50px;
border-left: 1px solid #DDDDDD;
border-right: 1px solid #DDDDDD;}
/* HEADER */ /* HEADER */
#header {margin: 0 auto 25px auto;} #header {margin: 0 auto 25px auto;}
#header img {float: left;} #header img {float: left;}
#header #summary {float: left; margin: 12px 0 0 20px; font-family: 'Lucida Grande', 'Lucida Sans Unicode';} #header #summary {float: left; margin: 12px 0 0 20px;
font-family: 'Lucida Grande', 'Lucida Sans Unicode';}
h1 {margin: 0; font-size: 36px; color: #981919;} h1 {margin: 0; font-size: 36px; color: #981919;}
h2 {margin: 0; font-size: 22px; color: #333333;} h2 {margin: 0; font-size: 22px; color: #333333;}
#header ul {margin: 0; font-size: 12px; color: #666666;} #header ul {margin: 0; font-size: 12px; color: #666666;}
@ -78,22 +86,36 @@ TEMPLATE = <<HTML
#rack {width: 860px; margin: 0 auto 10px auto;} #rack {width: 860px; margin: 0 auto 10px auto;}
p#nav {float: right; font-size: 14px;} p#nav {float: right; font-size: 14px;}
/* BACKTRACE */ /* BACKTRACE */
a#hide {float: left; padding-left: 5px; color: #666666; font-size: 14px; text-decoration: none; cursor: pointer;} a#hide {float: left; padding-left: 5px; color: #666666;
font-size: 14px; text-decoration: none; cursor: pointer;}
a#hide:hover {text-decoration: underline;} a#hide:hover {text-decoration: underline;}
h3 {float: left; width: 100px; margin-bottom: 10px; color: #981919; font-size: 14px; font-weight: bold;} h3 {float: left; width: 100px; margin-bottom: 10px;
color: #981919; font-size: 14px; font-weight: bold;}
#nav a {color: #666666; text-decoration: none; padding: 0 5px;} #nav a {color: #666666; text-decoration: none; padding: 0 5px;}
#backtrace li.frame-info {background: #f7f7f7; padding-left: 10px; font-size: 12px; color: #333333;} #backtrace li.frame-info {background: #f7f7f7; padding-left: 10px;
#backtrace ul {list-style-position: outside; border: 1px solid #E9E9E9; border-bottom: 0;} font-size: 12px; color: #333333;}
#backtrace ol {width: 808px; margin-left: 50px; font: 10px 'Lucida Console', monospace; color: #666666;} #backtrace ul {list-style-position: outside; border: 1px solid #E9E9E9;
#backtrace ol li {border: 0; border-left: 1px solid #E9E9E9; padding: 2px 0;} border-bottom: 0;}
#backtrace ol {width: 808px; margin-left: 50px;
font: 10px 'Lucida Console', monospace; color: #666666;}
#backtrace ol li {border: 0; border-left: 1px solid #E9E9E9;
padding: 2px 0;}
#backtrace ol code {font-size: 10px; color: #555555; padding-left: 5px;} #backtrace ol code {font-size: 10px; color: #555555; padding-left: 5px;}
#backtrace-ul li {border-bottom: 1px solid #E9E9E9; height: auto; padding: 3px 0;} #backtrace-ul li {border-bottom: 1px solid #E9E9E9; height: auto;
padding: 3px 0;}
#backtrace-ul .code {padding: 6px 0 4px 0;} #backtrace-ul .code {padding: 6px 0 4px 0;}
/* REQUEST DATA */ /* REQUEST DATA */
p.no-data {padding-top: 2px; font-size: 12px; color: #666666;} p.no-data {padding-top: 2px; font-size: 12px; color: #666666;}
table.req {width: 760px; text-align: left; font-size: 11px; color: #666666; padding: 0; border-spacing: 0; border: 1px solid #EEEEEE; border-bottom: 0; border-left: 0;} table.req {width: 760px; text-align: left; font-size: 12px;
table.req tr th {padding: 2px 10px; font-weight: bold; background: #F7F7F7; border-bottom: 1px solid #EEEEEE; border-left: 1px solid #EEEEEE;} color: #666666; padding: 0; border-spacing: 0;
table.req tr td {padding: 2px 20px 2px 10px; border-bottom: 1px solid #EEEEEE; border-left: 1px solid #EEEEEE;} border: 1px solid #EEEEEE; border-bottom: 0;
border-left: 0;}
table.req tr th {padding: 2px 10px; font-weight: bold;
background: #F7F7F7; border-bottom: 1px solid #EEEEEE;
border-left: 1px solid #EEEEEE;}
table.req tr td {padding: 2px 20px 2px 10px;
border-bottom: 1px solid #EEEEEE;
border-left: 1px solid #EEEEEE;}
/* HIDE PRE/POST CODE AT START */ /* HIDE PRE/POST CODE AT START */
.pre-context, .pre-context,
.post-context {display: none;} .post-context {display: none;}
@ -104,12 +126,16 @@ TEMPLATE = <<HTML
<div id="header"> <div id="header">
<img src="/__sinatra__/500.jpg" alt="application error" /> <img src="/__sinatra__/500.jpg" alt="application error" />
<div id="summary"> <div id="summary">
<h1><strong><%=h exception.class %></strong> at <strong><%=h path %></strong></h1> <h1><strong><%=h exception.class %></strong> at <strong><%=h path %>
</strong></h1>
<h2><%=h exception.message %></h2> <h2><%=h exception.message %></h2>
<ul> <ul>
<li class="first"><strong>file:</strong> <code><%=h frames.first.filename.split("/").last %></code></li> <li class="first"><strong>file:</strong> <code>
<li><strong>location:</strong> <code><%=h frames.first.function %></code></li> <%=h frames.first.filename.split("/").last %></code></li>
<li class="last"><strong>line:</strong> <%=h frames.first.lineno %></li> <li><strong>location:</strong> <code><%=h frames.first.function %>
</code></li>
<li class="last"><strong>line:
</strong> <%=h frames.first.lineno %></li>
</ul> </ul>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
@ -134,24 +160,30 @@ TEMPLATE = <<HTML
<% if frame.context_line && frame.context_line != "#" %> <% if frame.context_line && frame.context_line != "#" %>
<li class="frame-info"> <li class="frame-info">
<code><%=h frame.filename %></code> in <code><strong><%=h frame.function %></strong></code> <code><%=h frame.filename %></code> in
<code><strong><%=h frame.function %></strong></code>
</li> </li>
<li class="code"> <li class="code">
<% if frame.pre_context %> <% if frame.pre_context %>
<ol start="<%=h frame.pre_context_lineno + 1 %>" class="pre-context" id="pre-<%= id %>" onclick="toggle(<%= id %>);"> <ol start="<%=h frame.pre_context_lineno + 1 %>"
class="pre-context" id="pre-<%= id %>"
onclick="toggle(<%= id %>);">
<% frame.pre_context.each do |line| %> <% frame.pre_context.each do |line| %>
<li class="pre-context-line"><code><%=h line %></code></li> <li class="pre-context-line"><code><%=h line %></code></li>
<% end %> <% end %>
</ol> </ol>
<% end %> <% end %>
<ol start="<%= frame.lineno %>" class="context" id="<%= id %>" onclick="toggle(<%= id %>);"> <ol start="<%= frame.lineno %>" class="context" id="<%= id %>"
<li class="context-line" id="context-<%= id %>"><code><%=h frame.context_line %></code></li> onclick="toggle(<%= id %>);">
<li class="context-line" id="context-<%= id %>"><code><%=
h frame.context_line %></code></li>
</ol> </ol>
<% if frame.post_context %> <% if frame.post_context %>
<ol start="<%=h frame.lineno + 1 %>" class="post-context" id="post-<%= id %>" onclick="toggle(<%= id %>);"> <ol start="<%=h frame.lineno + 1 %>" class="post-context"
id="post-<%= id %>" onclick="toggle(<%= id %>);">
<% frame.post_context.each do |line| %> <% frame.post_context.each do |line| %>
<li class="post-context-line"><code><%=h line %></code></li> <li class="post-context-line"><code><%=h line %></code></li>
<% end %> <% end %>
@ -248,8 +280,8 @@ TEMPLATE = <<HTML
<div class="clear"></div> <div class="clear"></div>
</div> <!-- /RACK ENV --> </div> <!-- /RACK ENV -->
<p id="explanation">You're seeing this error because you use you have enabled the <code>show_exceptions</code> option.</p> <p id="explanation">You're seeing this error because you use you have
enabled the <code>show_exceptions</code> option.</p>
</div> <!-- /WRAP --> </div> <!-- /WRAP -->
</body> </body>
</html> </html>