Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added sass gem as dependency

made layout use different stylesheets or no stylesheets
  • Loading branch information...
commit bc3b49344564c88310d8470809ab129326abc91f 1 parent 5722c46
@mspwong authored
View
2  Gemfile
@@ -9,6 +9,8 @@ gem 'mysql2', '0.2.13'
gem 'rake', '0.9.2', :require => false
+gem 'sass', '3.1.7', :require => false
+
# Use unicorn as the web server
# gem 'unicorn'
View
19 app/stylesheets/application.scss
@@ -0,0 +1,19 @@
+body {
+ background-color: lightblue;
+ h1 {
+ background-color: pink;
+ width: 40%;
+ }
+ table {
+ background-color: pink;
+ tr:nth-child(even) {
+ background-color: white;
+ }
+ tr:nth-child(odd) {
+ background-color: lightgray;
+ }
+ }
+ p#notice {
+ color: green;
+ }
+}
View
6 app/stylesheets/wine.scss
@@ -0,0 +1,6 @@
+body {
+ background: #eee;
+ p#notice {
+ color: green;
+ }
+}
View
1  app/views/layouts/alternative.html.erb
@@ -5,7 +5,6 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Wines: <%= controller.action_name %></title>
- <%= stylesheet_link_tag :all %>
<%= javascript_include_tag "http://code.jquery.com/jquery-1.6.2.min.js" %>
<%= javascript_include_tag "application" %>
</head>
View
6 app/views/layouts/application.html.erb
@@ -2,13 +2,13 @@
<html>
<head>
<title>Wine app: <%= controller_name + "->" + controller.action_name %></title>
- <%= stylesheet_link_tag :all %>
+ <%= stylesheet_link_tag "application" %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
</head>
-<body style="background: lightblue;">
+<body>
-<p style="color: green"><%= notice %></p>
+<p id="notice"><%= notice %></p>
<%= yield %>
View
6 app/views/layouts/users.html.erb
@@ -2,14 +2,14 @@
<html>
<head>
<title>Wine app: <%= controller_name + "->" + controller.action_name %></title>
- <%= stylesheet_link_tag :all %>
+ <%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "http://code.jquery.com/jquery-1.6.2.min.js" %>
<%= javascript_include_tag "users" %>
<%= csrf_meta_tag %>
</head>
-<body style="background: lightblue;">
+<body>
-<p style="color: green"><%= notice %></p>
+<p id="notice"><%= notice %></p>
<%= yield %>
View
1  app/views/layouts/why_nots/ajax.html.erb
@@ -5,7 +5,6 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Wines: <%= controller.action_name %></title>
- <%= stylesheet_link_tag :all %>
<%= javascript_include_tag "http://code.jquery.com/jquery-1.6.2.min.js" %>
<%= javascript_include_tag "why_nots" %>
</head>
View
6 app/views/layouts/wines.html.erb
@@ -7,13 +7,13 @@
<!--<meta http-equiv="refresh" content="3;url='http://www.google.com'">-->
<!--<meta http-equiv="refresh" content="3"> &lt;!&ndash; refreshes same page &ndash;&gt;-->
<title><%= yield :head_title %></title>
- <%= stylesheet_link_tag :all %>
+ <%= stylesheet_link_tag "wine" %>
<%= javascript_include_tag "http://code.jquery.com/jquery-1.6.2.min.js" %>
<%= javascript_include_tag "application" %>
</head>
-<body style="background: #eee;">
+<body>
-<p style="color: green"><%= notice %></p>
+<p id="notice"><%= notice %></p>
<%= yield %>
Please sign in to comment.
Something went wrong with that request. Please try again.