mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
80 columns
This commit is contained in:
parent
65c0a49df5
commit
5531fa3820
1 changed files with 58 additions and 26 deletions
|
@ -50,19 +50,27 @@ TEMPLATE = <<HTML
|
|||
<style type="text/css" media="screen">
|
||||
* {margin: 0; padding: 0; border: 0; outline: 0;}
|
||||
div.clear {clear: both;}
|
||||
body {background: #EEEEEE; margin: 0; padding: 0; font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Garuda';}
|
||||
code {font-family: 'Lucida Console', monospace; font-size: 12px;}
|
||||
body {background: #EEEEEE; margin: 0; padding: 0;
|
||||
font-family: 'Lucida Grande', 'Lucida Sans Unicode',
|
||||
'Garuda';}
|
||||
code {font-family: 'Lucida Console', monospace;
|
||||
font-size: 12px;}
|
||||
li {height: 18px;}
|
||||
ul {list-style: none; margin: 0; padding: 0;}
|
||||
ol:hover {cursor: pointer;}
|
||||
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 {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 {margin: 0 auto 25px auto;}
|
||||
#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;}
|
||||
h2 {margin: 0; font-size: 22px; color: #333333;}
|
||||
#header ul {margin: 0; font-size: 12px; color: #666666;}
|
||||
|
@ -78,22 +86,36 @@ TEMPLATE = <<HTML
|
|||
#rack {width: 860px; margin: 0 auto 10px auto;}
|
||||
p#nav {float: right; font-size: 14px;}
|
||||
/* 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;}
|
||||
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;}
|
||||
#backtrace li.frame-info {background: #f7f7f7; padding-left: 10px; font-size: 12px; color: #333333;}
|
||||
#backtrace ul {list-style-position: outside; border: 1px solid #E9E9E9; 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 li.frame-info {background: #f7f7f7; padding-left: 10px;
|
||||
font-size: 12px; color: #333333;}
|
||||
#backtrace ul {list-style-position: outside; border: 1px solid #E9E9E9;
|
||||
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-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;}
|
||||
/* REQUEST DATA */
|
||||
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 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;}
|
||||
table.req {width: 760px; text-align: left; font-size: 12px;
|
||||
color: #666666; padding: 0; border-spacing: 0;
|
||||
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 */
|
||||
.pre-context,
|
||||
.post-context {display: none;}
|
||||
|
@ -104,12 +126,16 @@ TEMPLATE = <<HTML
|
|||
<div id="header">
|
||||
<img src="/__sinatra__/500.jpg" alt="application error" />
|
||||
<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>
|
||||
<ul>
|
||||
<li class="first"><strong>file:</strong> <code><%=h frames.first.filename.split("/").last %></code></li>
|
||||
<li><strong>location:</strong> <code><%=h frames.first.function %></code></li>
|
||||
<li class="last"><strong>line:</strong> <%=h frames.first.lineno %></li>
|
||||
<li class="first"><strong>file:</strong> <code>
|
||||
<%=h frames.first.filename.split("/").last %></code></li>
|
||||
<li><strong>location:</strong> <code><%=h frames.first.function %>
|
||||
</code></li>
|
||||
<li class="last"><strong>line:
|
||||
</strong> <%=h frames.first.lineno %></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
@ -134,24 +160,30 @@ TEMPLATE = <<HTML
|
|||
<% if frame.context_line && frame.context_line != "#" %>
|
||||
|
||||
<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 class="code">
|
||||
<% 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| %>
|
||||
<li class="pre-context-line"><code><%=h line %></code></li>
|
||||
<% end %>
|
||||
</ol>
|
||||
<% end %>
|
||||
|
||||
<ol start="<%= frame.lineno %>" class="context" id="<%= id %>" onclick="toggle(<%= id %>);">
|
||||
<li class="context-line" id="context-<%= id %>"><code><%=h frame.context_line %></code></li>
|
||||
<ol start="<%= frame.lineno %>" class="context" id="<%= id %>"
|
||||
onclick="toggle(<%= id %>);">
|
||||
<li class="context-line" id="context-<%= id %>"><code><%=
|
||||
h frame.context_line %></code></li>
|
||||
</ol>
|
||||
|
||||
<% 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| %>
|
||||
<li class="post-context-line"><code><%=h line %></code></li>
|
||||
<% end %>
|
||||
|
@ -248,8 +280,8 @@ TEMPLATE = <<HTML
|
|||
<div class="clear"></div>
|
||||
</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 -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue