Skip to content
Browse files

Some first steps at integrating old HTML/CSS into the new data

  • Loading branch information...
1 parent a46cc4d commit 2aac4c76ae6e9fcfd9770072c7a72fd5199d7f2d @konklone konklone committed
View
BIN public/images/background.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/images/mymoney.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/images/ohno.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 public/rss.png → public/images/rss.png
File renamed without changes
View
115 public/ohnomymoney.css
@@ -0,0 +1,115 @@
+body {padding: 0; margin: 0;}
+h1, h2, h3, h4, h5, h6 {margin: 0; padding: 0; font-weight: normal;}
+img {border: 0}
+h1 {display: none;}
+.left {float: left;}
+.right {float: right;}
+
+
+body, html {
+ background: #fff url(/images/background.gif) top center repeat-y;
+ text-align: center;
+}
+
+
+/* layout */
+div.accounts, div.worth {
+ width: 33%;
+ text-align: center;
+}
+
+div.worth {
+ position: relative;
+ margin: 30px auto;
+ top: 120px;
+}
+
+div.account {margin: 40px 0 70px 0; text-align: center;}
+div.account span {display: block;}
+
+div.worth img {margin-top: 35px;}
+
+
+/** account page **/
+
+div.title {
+ position: relative;
+ margin: 30px auto;
+ margin-top: 30px;
+ width: 33%;
+ text-align: center;
+}
+
+div.graph {
+ clear: both; margin: 10px auto; margin-bottom: 30px;
+ width: 857px; height: 350px;
+}
+div.graph div.back {float: left; text-align: center; margin: 20px 0; width: 100%;}
+div.graph div.back a {color: #3355aa; font-size: 1.0em; font-weight: bold;}
+
+/** footer **/
+
+div.footer {
+ text-align: center;
+ clear: both; padding-top: 10px;
+ font-size: 0.7em; font-weight: bold; color: #717171;
+}
+div.footer a {color: #3355aa}
+
+
+/* main design */
+
+div.account.oldest, div.account.newest {margin: 0; margin-top: -10px; margin-bottom: 30px;}
+
+.accounts.left h2 {
+ width: 196px;
+ height: 45px;
+ text-indent: -5000px;
+ background: transparent url(/images/ohno.gif) top left no-repeat;
+ margin: 40px auto 20px auto;
+}
+
+.accounts.right h2 {
+ width: 319px;
+ height: 45px;
+ text-indent: -5000px;
+ background: transparent url(/images/mymoney.gif) top left no-repeat;
+ margin: 40px auto 20px auto;
+}
+
+.accounts span, .worth span {
+ font-family: georgia, times, serif;
+ font-size: 3.6em;
+}
+
+.accounts h3, .worth h3 {
+ font-size: .9em;
+ text-transform: uppercase;
+ font-family: gotham, verdana, sans-serif;
+}
+
+.title h2 {
+ font-size: 2.5em;
+ font-family: georgia, times, serif;
+}
+
+span.positive {color: #3fb021;}
+span.negative {color: #b61515;}
+
+.accounts.left h3 {color: #946d6d;}
+.accounts.right h3 {color: #7f9679;}
+.worth h3 {color: #7f7f7f;}
+.worth h4 {font-size: 0.8em; color: #7f7f7f;}
+.worth img {margin-bottom: -5px; margin-left: 5px;}
+
+.accounts a {
+ font-size: 0.8em;
+ font-family: gotham, verdana, sans-serif;
+}
+.accounts.left a, .title h2.negative {color: #b61515;}
+.accounts.right a, .title h2.positive {color: #3fb021;}
+
+.worth {
+ background: #f5f5f5;
+ padding: 40px 0;
+}
View
26 views/index.erb
@@ -8,7 +8,7 @@
<meta content="<%= user.name %>" name="author" />
<meta content="2008" name="copyright" />
- <link charset="utf-8" href="/style.css" media="screen" rel="stylesheet" type="text/css" />
+ <link charset="utf-8" href="/ohnomymoney.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/worth.xml" rel="alternate" title="Oh No My Money" type="application/rss+xml" />
</head>
<body>
@@ -18,7 +18,7 @@
<div class="accounts left">
<h2>Oh No</h2>
- <% assets.each do |account| %>
+ <% debts.each do |account| %>
<% balance = account.balances.first :order => "created_at DESC" %>
<div class="account">
<h3><%= account.name %></h3>
@@ -31,20 +31,24 @@
<div class="accounts right">
<h2>My Money</h2>
- <div class="account">
- <h3>Checking</h3>
- <span class="positive">+$326.94</span>
- <a href="/account/1">history</a>
- </div>
+ <% assets.each do |account| %>
+ <% balance = account.balances.first :order => "created_at DESC" %>
+ <div class="account">
+ <h3><%= account.name %></h3>
+ <span class="<%= direction balance.amount %>"><%= format_amount balance.amount %></span>
+ <a href="/<%= user.handle %>/account/<%= account.id %>">history</a>
+ </div>
+ <% end %>
</div>
<div class="worth">
<h3>Net Worth</h3>
- <span class="negative">-$18,321.28</span>
+ <% balance = worth.balances.first :order => "created_at DESC" %>
+ <span class="<%= direction balance.amount %>"><%= format_amount balance.amount %></span>
<h4>
- updated March 23
- <a href="/worth.xml">
+ as of <%= date Time.now %>
+ <a href="/<%= user.handle %>/worth.xml">
<img alt="RSS" src="/images/rss.png" />
</a>
</h4>
@@ -65,4 +69,4 @@
</script>
</body>
-</html>
+</html>

0 comments on commit 2aac4c7

Please sign in to comment.
Something went wrong with that request. Please try again.