Skip to content
Browse files

show headers diagonally

  • Loading branch information...
1 parent 54118d6 commit b2de9533b73153160c2237bba63eec26a0ae29f1 @jeremyjbarth committed Dec 3, 2011
View
6 app/assets/stylesheets/application.css
@@ -4,4 +4,8 @@
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree .
-*/
+*/
+
+.center {
+ width: 1000px;
+ margin: 0 auto; }
View
17 app/assets/stylesheets/diets.css.scss
@@ -2,6 +2,23 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
+.rotate35degrees {
+ -moz-transform: rotate(-30deg);
+ -o-transform: rotate(-30deg);
+-webkit-transform: rotate(-30deg);
+ filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=0.154, M12=-0.988, M21=0.988, M22=0.154);
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=0.154, M12=-0.988, M21=0.988, M22=0.154)";
+ zoom: 1;
+
+ width: 15px; }
+
+.diet-meta {
+ float: left;
+ width: 300px; }
+
+.diet-content {
+ }
+
.hint {
color: grey;
font-size: 10px; }
View
24 app/views/diets/show.html.erb
@@ -1,5 +1,4 @@
-<p id="notice"><%= notice %></p>
-
+<div class="diet-meta">
<h1>
<%= @diet.name %>
</h1>
@@ -11,17 +10,21 @@
<b>Carbs: </b><span id="carbs"><%= @diet.carbs %></span> / <%= @diet.carbs_goal %><br/>
<b>Fat: </b><span id="fat"><%= @diet.fat %></span> / <%= @diet.fat_goal %><br/>
<b>Fiber: </b><span id="fiber"><%= @diet.fiber %></span> / <%= @diet.fiber_goal %><br/>
-
+<%= link_to 'Edit', edit_diet_path(@diet) %> |
+<%= link_to 'Back', diets_path %>
+</div>
+<div class="diet-content">
+<p id="notice"><%= notice %></p>
<table id="diet_items" cellpadding="10px">
<thead>
<tr>
<th></th>
<th></th>
<th></th>
- <th>Pr</th>
- <th>Ca</th>
- <th>Fa</th>
- <th>Fi</th>
+ <th><div class="rotate35degrees">Protein</div></th>
+ <th><div class="rotate35degrees">Carbs</div></th>
+ <th><div class="rotate35degrees">Fat</div></th>
+ <th><div class="rotate35degrees">Fiber</div></th>
<th></th>
</tr>
</thead>
@@ -58,9 +61,4 @@
<% end %>
</tfoot>
</table>
-
-<br />
-
-
-<%= link_to 'Edit', edit_diet_path(@diet) %> |
-<%= link_to 'Back', diets_path %>
+</div>
View
4 app/views/layouts/application.html.erb
@@ -7,8 +7,8 @@
<%= csrf_meta_tags %>
</head>
<body>
-
+<div class="center">
<%= yield %>
-
+</div>
</body>
</html>

0 comments on commit b2de953

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