campaign banner on homepage is pretty

This commit is contained in:
Emi Matchu 2014-09-11 18:09:00 -05:00
parent 2e08a1261b
commit d588253c4c
4 changed files with 16 additions and 8 deletions

View file

@ -10,14 +10,12 @@
position: relative
.button
+awesome-button
+loud-awesome-button-color
font-size: 75%
margin-left: 1em
padding: .25em .75em
&:after
content: none
.campaign-progress
background: $module-border-color
background-image: linear-gradient(color-stops($module-border-color + #222, $module-border-color))
@ -28,6 +26,7 @@
.campaign-progress-label
+text-shadow(#777, -1px, -1px, 0)
color: white
font-size: 150%
left: 0
position: absolute
@ -35,8 +34,14 @@
text-align: center
width: 100%
&, a
color: white
a
color: inherit
display: block
text-decoration: none
.button
position: relative
top: -2px /* lame hack to align well with text; sigh */
&.campaign-loaded
.campaign-progress-wrapper

View file

@ -77,6 +77,8 @@ class OutfitsController < ApplicationController
end
@neopets_usernames = user_signed_in? ? current_user.neopets_usernames : []
@campaign = Campaign.current
end
def show

View file

@ -25,8 +25,9 @@ module ApplicationHelper
if block_given?
content = capture(&block)
else
content = link_to('Help Dress to Impress stay online!', donate_path) +
link_to('Learn more', donate_path, :class => 'button')
content = link_to(
content_tag(:span, 'Help Dress to Impress stay online!') +
content_tag(:span, 'Learn more', :class => 'button'), donate_path)
end
meter = content_tag(:div, nil, :class => 'campaign-progress',

View file

@ -1,6 +1,6 @@
- hide_home_link
= campaign_progress
= campaign_progress @campaign
%p#pet-not-found.alert= t 'pets.load.not_found'
%p#neopia-error.alert= t 'pets.load.neopia_error'