Cleaned up table display a bit

This commit is contained in:
Tyler Renelle 2012-02-03 17:34:55 -05:00
parent e4afd5c9e5
commit 06133f9379
2 changed files with 25 additions and 19 deletions

View file

@ -8,6 +8,11 @@
.good { background-color:rgb(147, 196, 125); }
.done { background-color:rgb(201, 218, 248); }
.panel {
vertical-align:top;
min-width: 240px;
}
.habit {
list-style:none;
border: 1px solid black;

View file

@ -1,23 +1,24 @@
<h1>Score: <span id="score"><%= @score %></span></h1>
<%= link_to 'New Habit', new_habit_path %>
<table>
<tr><td>
<h2>Habits</h2>
<ul id="habits">
<% @habits.each do |habit| %>
<%= render :partial => "habit", :locals => { :habit => habit } %>
<% end %>
</ul>
</td>
<td>
<h2>Daily</h2>
<ul id="daily">
<% @daily.each do |habit| %>
<%= render :partial => "habit", :locals => { :habit => habit } %>
<% end %>
</ul>
</div>
<table id="layout">
<tr>
<td class="panel">
<h2>Habits</h2>
<ul id="habits">
<% @habits.each do |habit| %>
<%= render :partial => "habit", :locals => { :habit => habit } %>
<% end %>
</ul>
</td>
<td class="panel">
<h2>Daily</h2>
<ul id="daily">
<% @daily.each do |habit| %>
<%= render :partial => "habit", :locals => { :habit => habit } %>
<% end %>
</ul>
</td>
</tr>
</table>