Skip to content

Commit

Permalink
Steal Jeff's style (it's open source!)
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Jun 18, 2010
1 parent c9c2553 commit 0482c9c
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 31 deletions.
Binary file modified lib/my.db
Binary file not shown.
36 changes: 26 additions & 10 deletions public/style.css
@@ -1,15 +1,31 @@
body {
font: 12pt "Myriad Pro";
}
body { font-family: Helvetica,Arial,sans-serif; font-size: smaller;}
#header h1 { display: block; margin: 0;}
#header { border-bottom: 2px solid darkgreen; padding: 5px; padding-bottom: 1px; background-color: lightgreen;}
#wrapper { margin-left: auto; margin-right: auto; width: 800px; }
#content { margin: 10px; text-align: center; }
pre { font-size: larger; display: inline;}
ul { padding-left: 20px;}
li { margin-bottom: 20px;}
#make-form { margin: 20px; text-align: center; margin-right: 80px;}
#make-form input { font-size: larger;}
a.headers { font-size: smaller;}
td { font-size: smaller; padding-top: 2px; }
td.key { width: 75px; font-weight: bold; padding-right: 4px;}

#content {
width: 50%;
}

.payload {
font: 12pt "Inconsolata", monospace;
dl {
padding: 0.5em;
}
dt {
float: left;
clear: left;
width: 70px;
font-weight: bold;
overflow: none;
}

td {
padding-right: 10px;
dd {
margin: 0 0 0 80px;
padding: 0 0 0.5em 0;
white-space: pre;
}
15 changes: 9 additions & 6 deletions views/layout.erb
@@ -1,14 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='/style.css'>
<title>PostBin - Debug web hooks</title>
<link href="/style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div align='center'>
<div id='content'>
<body>
<div id="wrapper">
<div id="header">
<h1>PostBin</h1>
</div>
<div id="content">
<%= yield %>
<small><a href='/'>home</a> | <a href='/about'>what the?</a> | <a href='/love'>love</a></small>
</div>
<small><a href='/about'>what the?</a> | <a href='/love'>love</a></small>
</div>
</body>
</html>
27 changes: 12 additions & 15 deletions views/show.erb
@@ -1,19 +1,16 @@
<h2>Postbin #<%= @bin.url %></h2>
<small>Use this link: http://postbin.heroku.com/<%= @bin.url %></small>
<p>All POST requests to this URL are logged for you to see here, sorted newest to oldest.</p>
<% for item in @bin.items.reverse %>
<p>
<div align='left'>#<%= item.id.to_s(36) %></div>
<table align='left' width='100%'>
<% item.parsed_params.each do |k, v| %>
<tr>
<td valign='top' width='10%'>
<strong><%= k %></strong>
</td>

<td class='payload'><%= json(v) rescue v %></td>
</tr>
<% end %>
</table>
</p>
<div align='left'>#<%= item.id.to_s(36) %></div>
<table width='100%'>
<% item.parsed_params.each do |k, v| %>
<tr>
<td valign='top' width='10%'>
<strong><%= k %></strong>
</td>
<td class='payload'><%= json(v) rescue v %></td>
</tr>
<% end %>
</table>
<br><br>
<% end %>

0 comments on commit 0482c9c

Please sign in to comment.