diff --git a/app/assets/stylesheets/static/_donate.sass b/app/assets/stylesheets/static/_donate.sass index 1c95f47d..68088a06 100644 --- a/app/assets/stylesheets/static/_donate.sass +++ b/app/assets/stylesheets/static/_donate.sass @@ -20,12 +20,13 @@ body.static-donate background: image: url(http://images.neopets.com/new_shopkeepers/t_993.gif) - position: ($container-width - 150px - 8px) -8px + position: ($container-width - 150px - 8px) -4px repeat: no-repeat + margin-top: 1em margin-bottom: 1.5em - padding-bottom: 24px + padding-bottom: 32px padding-left: 24px - padding-top: 24px + padding-top: 32px header, div +inline-block diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index e7c2c36c..4d153d27 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -1,6 +1,5 @@ class StaticController < ApplicationController def donate - # TODO: scope by campaign? @campaign = Campaign.current @donations = @campaign.donations.includes(features: :outfit). order('created_at DESC') diff --git a/app/views/static/donate.html.haml b/app/views/static/donate.html.haml index 3c97218e..16ab9db0 100644 --- a/app/views/static/donate.html.haml +++ b/app/views/static/donate.html.haml @@ -1,9 +1,9 @@ - title "Support Dress to Impress" -= campaign_progress(@campaign) do - We've received #{number_to_currency(@campaign.progress / 100.0)} - toward our hosting costs this year. - - if @campaign.progress > 0 +- if @campaign.progress > 0 + = campaign_progress(@campaign) do + We've received #{number_to_currency(@campaign.progress / 100.0)} + toward our hosting costs this year. Thanks so much! = form_tag donations_path, method: 'POST', id: 'donation-form', @@ -61,18 +61,18 @@ [aws]: http://aws.amazon.com/ [matts_bat]: http://www.neopets.com/petlookup.phtml?pet=matts_bat -%h2 Thanks to our lovely donors! +- if @donations.present? + %h2 Thanks to our lovely donors! + %ul#outfits + - @donations.each do |donation| + - donation.features.each do |feature| + %li + - if feature.outfit_id? && feature.outfit.image? + = link_to image_tag(feature.outfit.image.small.url), feature.outfit + - else + = image_tag 'default_preview.png' -%ul#outfits - - @donations.each do |donation| - - donation.features.each do |feature| - %li - - if feature.outfit_id? && feature.outfit.image? - = link_to image_tag(feature.outfit.image.small.url), feature.outfit - - else - = image_tag 'default_preview.png' - - %header Thanks, #{donation.donor_name.presence || 'Anonymous'}! + %header Thanks, #{donation.donor_name.presence || 'Anonymous'}! #fine-print %h2 Some notes on featured outfits