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

View file

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

View file

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

View file

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