Skip to content
Browse files

lyrics, colors

  • Loading branch information...
1 parent 24cf23a commit 9995d447f4b06cf03841a0a4e192d4033f69de78 @pankoholic93 pankoholic93 committed Oct 25, 2011
View
9 app/controllers/lyrics_controller.rb~
@@ -1,7 +1,8 @@
-class PagesController < ApplicationController
-
- def chaos
- @title = "The 4 Skins - Chaos"
+class LyricsController < ApplicationController
+ def content
+ @title = "Lyrics"
end
+ def lyric
+ @lyric = Lyrics.find(1)
end
View
2 app/helpers/lyrics_helper.rb
@@ -0,0 +1,2 @@
+module LyricsHelper
+end
View
4 app/models/lyrics.rb~
@@ -0,0 +1,4 @@
+class Lyrics < ActiveRecord::Base
+ validates :content, :presence => true
+end
+
View
30 app/views/chaos.html.erb
@@ -0,0 +1,30 @@
+<h1>The 4 Skins - Chaos</h1>
+<p>
+Do you remember in 1969?<br>
+Seeing all the skinheads standing in a line<br>
+Foaming at the mouth, Waiting for a fight<br>
+High boots, cropped hair, what a fuckin sight<br>
+<br>
+Come back of the skinhead, come back of the boot<br>
+People that we don't beat up, We're gonna fucking shoot<br>
+We are the new breed, we will have our say<br>
+We are the new breed, we ain't gonna die<br>
+<br>
+Trouble east London, trouble in the street<br>
+On the street corners, where the gang still meets<br>
+Talking about the weekend, what they're gonna do?<br>
+If you aint careful, they are gonna do you!<br>
+<br>
+Come back of the skinhead, come back of the boot<br>
+People that we don't beat up, We're gonna fucking shoot<br>
+We are the new breed, we will have our say<br>
+We are the new breed, we ain't gonna die<br>
+<br>
+Chaos in the city, civil war now<br>
+Skinheads taking over, like skinheads know how<br>
+Skinhead with his boots on, nobodys fool<br>
+Skinheads taking over, chaos is the rule!<br>
+<br>
+Chaos, chaos, chaos - dont give a toss<br>
+Chaos, chaos, chaos - dont give a toss!<br>
+<p>
View
1 app/views/layouts/_header.html.erb~
@@ -7,7 +7,6 @@
<li><%= link_to "Profile", current_user %></li>
<li><%= link_to "Settings", edit_user_path(current_user) %></li>
<li><%= link_to "Users", users_path %></li>
- <li><%= link_to "Lyrics", root_path%></li>
<% end %>
<li><%= link_to "Help", help_path %></li>
<% if signed_in? %>
View
17 app/views/lyrics.html.erb
@@ -0,0 +1,17 @@
+<% if signed_in? %>
+ <table class="front" summary="For signed-in users">
+ <tr>
+ <td class="main">
+ <li><%= link_to "The 4 Skins - Chaos", @lyric %></li>
+
+<% else %>
+ <h1>Sample App</h1>
+
+ <p>
+ This is the home page for the
+ <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
+ sample application.
+ </p>
+
+ <%= link_to "Sign up now!", signup_path, :class => "signup_button round" %>
+<% end %>
View
2 app/views/pages/home.html.erb~
@@ -4,10 +4,12 @@
<td class="main">
<h1 class="micropost">What's up?</h1>
<%= render 'shared/micropost_form' %>
+ <%= render 'shared/feed' %>
</td>
<td class="sidebar round">
<%= render 'shared/user_info' %>
</td>
+ <a href="<%= current_user %>" onclick="window.open('<%= current_user %>','popup','width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">The 4 Skins - Chaos</a>
</tr>
</table>
<% else %>
View
3 app/views/pages/lyrics.html.erb
@@ -2,7 +2,8 @@
<table class="front" summary="For signed-in users">
<tr>
<td class="main">
- <h1>Coming soon...</h1>
+ <a href="<%= root_path %>lyrics/chaos" onclick="window.open('<%= root_path %>lyrics/chaos','popup','width=500,height=800,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">The 4 Skins - Chaos</a>
+
<% else %>
<h1>Sample App</h1>
View
32 app/views/pages/lyrics.html.erb~
@@ -2,36 +2,8 @@
<table class="front" summary="For signed-in users">
<tr>
<td class="main">
- <h1>The 4 Skins - Chaos</h1>
- <p>
- Do you remember in 1969?<br>
- Seeing all the skinheads standing in a line<br>
- Foaming at the mouth, Waiting for a fight<br>
- High boots, cropped hair, what a fuckin sight<br>
- <br>
- Come back of the skinhead, come back of the boot<br>
- People that we don't beat up, We're gonna fucking shoot<br>
- We are the new breed, we will have our say<br>
- we are the new breed, we ain't gonna die<br>
- <br>
- Trouble east London, trouble in the street<br>
- On the street corners, where the gang still meets<br>
- Talking about the weekend, what they're gonna do?<br>
- If you aint careful, they are gonna do you!<br>
- <br>
- Come back of the skinhead, come back of the boot<br>
- People that we don't beat up, We're gonna fucking shoot<br>
- We are the new breed, we will have our say<br>
- we are the new breed, we ain't gonna die<br>
- <br>
- Chaos in the city, civil war now<br>
- Skinheads taking over, like skinheads know how<br>
- Skinhead with his boots on, nobodys fool<br>
- Skinheads taking over, chaos is the rule!<br>
- <br>
- Chaos, chaos, chaos - dont give a toss<br>
- Chaos, chaos, chaos - dont give a toss!<br>
- <p>
+ <a href="<%= root_path %>lyrics/chaos" onclick="window.open('<%= root_path %>lyrics/chaos','popup','width=500,height=800,scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">The 4 Skins - Chaos</a>
+
<% else %>
<h1>Sample App</h1>
View
2 config/routes.rb
@@ -1,4 +1,5 @@
SampleApp::Application.routes.draw do
+
get "sessions/new"
resources :users
@@ -13,6 +14,7 @@
match '/about', :to => 'pages#about'
match '/help', :to => 'pages#help'
match '/lyrics', :to => 'pages#lyrics'
+ match '/lyrics/chaos', :to => 'pages#chaos'
root :to => 'pages#home'
end
View
4 config/routes.rb~
@@ -1,4 +1,5 @@
SampleApp::Application.routes.draw do
+
get "sessions/new"
resources :users
@@ -13,7 +14,6 @@ SampleApp::Application.routes.draw do
match '/about', :to => 'pages#about'
match '/help', :to => 'pages#help'
match '/lyrics', :to => 'pages#lyrics'
- match '/lyrics/chaos' :to => 'pages#lyrics#chaos'
-
+
root :to => 'pages#home'
end
View
8 db/schema.rb
@@ -10,7 +10,13 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20111023162557) do
+ActiveRecord::Schema.define(:version => 20111024181931) do
+
+ create_table "lyrics", :force => true do |t|
+ t.string "content"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
create_table "microposts", :force => true do |t|
t.string "content"
View
20 public/stylesheets/custom.css
@@ -1,9 +1,9 @@
.container {
- width: 710px;
+ width: 810px;
}
body {
- background: #cff;
+ background: #980000;
}
header {
@@ -12,14 +12,14 @@ header {
header img {
padding: 1em;
- background: #fff;
+ background: #C0C0C0;
}
section {
margin-top: 1em;
font-size: 120%;
padding: 20px;
- background: #fff;
+ background: #C0C0C0;
}
section h1 {
@@ -29,12 +29,12 @@ section h1 {
/* Links */
a {
- color: #09c;
+ color: #980000;
text-decoration: none;
}
a:hover {
- color: #069;
+ color: #980000;
text-decoration: underline;
}
@@ -48,7 +48,7 @@ nav {
}
nav {
- background-color: white;
+ background-color: #C0C0C0;
padding: 0 0.7em;
white-space: nowrap;
}
@@ -70,7 +70,7 @@ nav ul li a {
}
nav ul li a:visited {
- color: #09c;
+ color: #980000;
}
nav ul li a:hover {
@@ -85,8 +85,8 @@ a.signup_button {
display: block;
text-align: center;
width: 190px;
- color: #fff;
- background: #006400;
+ color: #C0C0C0;
+ background: #980000;
font-size: 150%;
font-weight: bold;
padding: 20px;
View
76 public/stylesheets/custom.css~
@@ -1,9 +1,9 @@
.container {
- width: 710px;
+ width: 810px;
}
body {
- background: #cff;
+ background: #980000;
}
header {
@@ -12,14 +12,14 @@ header {
header img {
padding: 1em;
- background: #fff;
+ background: #C0C0C0;
}
section {
margin-top: 1em;
font-size: 120%;
padding: 20px;
- background: #fff;
+ background: #C0C0C0;
}
section h1 {
@@ -29,12 +29,12 @@ section h1 {
/* Links */
a {
- color: #09c;
+ color: #980000;
text-decoration: none;
}
a:hover {
- color: #069;
+ color: #980000;
text-decoration: underline;
}
@@ -48,7 +48,7 @@ nav {
}
nav {
- background-color: white;
+ background-color: #C0C0C0;
padding: 0 0.7em;
white-space: nowrap;
}
@@ -70,7 +70,7 @@ nav ul li a {
}
nav ul li a:visited {
- color: #09c;
+ color: #980000;
}
nav ul li a:hover {
@@ -85,8 +85,8 @@ a.signup_button {
display: block;
text-align: center;
width: 190px;
- color: #fff;
- background: #006400;
+ color: #C0C0C0;
+ background: #980000;
font-size: 150%;
font-weight: bold;
padding: 20px;
@@ -187,3 +187,59 @@ ul.users {
list-style: none;
}
+1.micropost {
+ margin-bottom: 0.3em;
+}
+
+table.microposts {
+ margin-top: 1em;
+}
+
+table.microposts tr {
+ height: 70px;
+}
+
+table.microposts tr td.gravatar {
+ border-top: 1px solid #ccc;
+ vertical-align: top;
+ width: 50px;
+}
+
+table.microposts tr td.micropost {
+ border-top: 1px solid #ccc;
+ vertical-align: top;
+ padding-top: 10px;
+}
+
+table.microposts tr td.micropost span.timestamp {
+ display: block;
+ font-size: 85%;
+ color: #666;
+}
+
+div.user_info img {
+ padding-right: 0.1em;
+}
+
+div.user_info a {
+ text-decoration: none;
+}
+
+div.user_info span.user_name {
+ position: absolute;
+}
+
+div.user_info span.microposts {
+ font-size: 80%;
+}
+
+form.new_micropost {
+ margin-bottom: 2em;
+}
+
+form.new_micropost textarea {
+ height: 4em;
+ margin-bottom: 0;
+}
+
+
1 sample_app
@@ -0,0 +1 @@
+Subproject commit 24cf23accab75ab3d4f88c0ea4c1cede506a46f2
View
12 spec/controllers/lyrics_controller_spec.rb
@@ -0,0 +1,12 @@
+require 'spec_helper'
+
+describe LyricsController do
+
+ describe "GET 'content'" do
+ it "should be successful" do
+ get 'content'
+ response.should be_success
+ end
+ end
+
+end
View
15 spec/helpers/lyrics_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the LyricsHelper. For example:
+#
+# describe LyricsHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe LyricsHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
View
5 spec/models/lyric_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Lyric do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
View
5 spec/models/lyrics_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe Lyrics do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
View
5 spec/views/lyrics/content.html.erb_spec.rb
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe "lyrics/content.html.erb" do
+ pending "add some examples to (or delete) #{__FILE__}"
+end

0 comments on commit 9995d44

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