Skip to content

Commit

Permalink
prettied up everything
Browse files Browse the repository at this point in the history
  • Loading branch information
blatyo committed Jul 7, 2010
1 parent ae6ee6a commit 9c81592
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.DS_Store
.bundle
db/*.sqlite3
log/*.log
Expand Down
3 changes: 3 additions & 0 deletions app/helpers/ranks_helper.rb
@@ -1,2 +1,5 @@
module RanksHelper
def answer(question)
question ? "Yes!" : "No. :("
end
end
1 change: 0 additions & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -7,7 +7,6 @@
<%= csrf_meta_tag %>
</head>
<body>
<h1>Is it popular?</h1>
<%= yield %>
</body>
</html>
3 changes: 3 additions & 0 deletions app/views/ranks/new.html.erb
@@ -1,4 +1,7 @@
<h1>is <span id="site">it</span> popular<span id="question">?</span></h1>

<%= form_for @page_rank, :url => ranks_path do |f| %>
<p id="label"><%= f.label :site, "Enter a site" %></p>
<p id="input">
<%= f.text_field :site %>
<%= f.submit "Go" %>
Expand Down
5 changes: 4 additions & 1 deletion app/views/ranks/show.html.erb
@@ -1,3 +1,6 @@
<h1>is <span id="site">it</span> popular?</h1>

<div id="popular">
<%= @page_rank.popular? ? "Yes!" : "No. :(" %>
<h3>is <span id="site"><%= @page_rank.site %></span> popular?</h3>
<h2><%= answer @page_rank.popular? %></h2>
</div>
Binary file added public/images/bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions public/stylesheets/application.css
@@ -0,0 +1,68 @@
* {
margin: 0;
padding: 0;
}

body {
background: #4E7085 url('/images/bg.jpg') repeat;
color: #78AA9B;
font-family: Helvetica, Verdana, Arial, sans-serif;
}

h1 {
font-size: 100px;
color: #FFFFFF;
font-family: Helvetica, Verdana, Arial, sans-serif;
text-align: center;
}

h2, h3 {
text-align: center;
}

h2 {
color: #FFFFFF;
font-size: 150px;
margin-top: -20px;
}

#popular {
margin-top: 180px;
}

span#site {
color: #E3A43F;
}

span#question {
color: #E8D995;
}

#page_rank_site {
height: 50px;
width: 400px;
font-size: 35px;
text-align: center;
}

p {
text-align: center;
}

#page_rank_submit {
height: 52px;
border: 2px solid #E3A43F;
background: #E3A43F;
position: relative;
font-size: 35px;
-moz-border-radius: 0 20px 20px 0;
-webkit-border-radius: 0 20px 20px 0;
-khtml-border-radius: 0 20px 20px 0;
border-radius: 0 20px 20px 0;
color: #152D38;
}

form {
margin: 200px auto 0;
width: 500px;
}

0 comments on commit 9c81592

Please sign in to comment.