drop donate bar into items, outfits#show

This commit is contained in:
Emi Matchu 2011-07-09 11:45:30 -04:00
parent 33519bd579
commit 7640369332
8 changed files with 160 additions and 24 deletions

View file

@ -14,10 +14,16 @@ module ApplicationHelper
end
end
def campaign_progress(content=nil, &block)
def campaign_progress(&block)
include_campaign_progress_requirements
content ||= capture(&block)
if block_given?
content = capture(&block)
else
content = link_to('We need your help to keep growing and stay online!', donate_path) +
link_to('Donate now!', donate_path, :class => 'button')
end
html = content_tag(:div, nil, :class => 'campaign-progress') +
content_tag(:div, content, :class => 'campaign-progress-label')
content_tag(:div, html, :class => 'campaign-progress-wrapper')

View file

@ -1,4 +1,8 @@
@import "partials/campaign-progress"
body.items
+campaign-progress
text-align: center
input[type=text]
@ -17,3 +21,4 @@ body.items
text-decoration: underline
&:hover span
text-decoration: none

View file

@ -1,4 +1,8 @@
@import "partials/campaign-progress"
body.outfits-show
+campaign-progress
#title
float: left
@ -27,3 +31,4 @@ body.outfits-show
#outfit-items
text-align: center

View file

@ -18,6 +18,7 @@
%body{:class => body_class}
= javascript_include_tag "analytics"
#container
= yield :before_title
- if content_for?(:title) && show_title_header?
%h1#title= yield :title
= render 'static/announcement.html'

View file

@ -1,3 +1,4 @@
- content_for :before_title, campaign_progress
- content_for :title_category do
Infinite Closet: Neopets customization clothing and wearables database
- content_for :before_flashes do

View file

@ -1,8 +1,6 @@
- hide_home_link
= campaign_progress do
= link_to 'We need your help to keep growing and stay online!', donate_path
= link_to 'Donate now!', donate_path, :class => 'button'
= campaign_progress
#outfit-forms
- cache :action_suffix => 'outfit_forms_intro' do

View file

@ -1,4 +1,6 @@
- title(@outfit.name || "Shared outfit")
- content_for :before_title, campaign_progress
= link_to_edit_outfit(@outfit, :class => 'button', :id => 'outfit-wardrobe-link') do
Edit
- unless user_signed_in? && @outfit.user == current_user

View file

@ -591,34 +591,93 @@ body.contributions-index .contributions span.time-ago {
font-size: 75%;
}
/* line 1, ../../../app/stylesheets/_items.sass */
/* line 3, ../../../app/stylesheets/_items.sass */
body.items {
text-align: center;
}
/* line 4, ../../../app/stylesheets/_items.sass */
/* line 2, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items .campaign-progress-wrapper {
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
background: #aaaaaa;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #cccccc), color-stop(100%, #aaaaaa));
background-image: -moz-linear-gradient(top, #cccccc 0%, #aaaaaa 100%);
background-image: linear-gradient(top, #cccccc 0%, #aaaaaa 100%);
border: 4px solid #006600;
clear: both;
margin-bottom: 1.5em;
position: relative;
visibility: hidden;
}
/* line 13, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items .campaign-progress-wrapper .button {
background: #ff5c00 url('/images/alert-overlay.png?1296599919') repeat-x;
font-size: 75%;
margin-left: 1em;
padding: 0.25em 0.75em;
}
/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */
body.items .campaign-progress-wrapper .button:hover {
background-color: #ee4b00;
}
/* line 19, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items .campaign-progress-wrapper .button:after {
content: none;
}
/* line 22, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items .campaign-progress {
background: #006600;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #228822), color-stop(100%, #006600));
background-image: -moz-linear-gradient(top, #228822 0%, #006600 100%);
background-image: linear-gradient(top, #228822 0%, #006600 100%);
border-right: 1px solid #006600;
}
/* line 27, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items .campaign-progress-wrapper, body.items .campaign-progress {
height: 2.5em;
}
/* line 30, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items .campaign-progress-label {
text-shadow: #777777 -1px -1px 0;
font-size: 150%;
left: 0;
position: absolute;
top: 0;
text-align: center;
width: 100%;
}
/* line 39, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items .campaign-progress-label, body.items .campaign-progress-label a {
color: white;
}
/* line 43, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.items.campaign-loaded .campaign-progress-wrapper {
visibility: visible;
}
/* line 8, ../../../app/stylesheets/_items.sass */
body.items input[type=text], body.items body.pets-bulk #bulk-pets-form textarea, body.pets-bulk #bulk-pets-form body.items textarea {
font-size: 125%;
width: 15em;
}
/* line 8, ../../../app/stylesheets/_items.sass */
/* line 12, ../../../app/stylesheets/_items.sass */
body.items h1 {
margin-bottom: 1em;
}
/* line 10, ../../../app/stylesheets/_items.sass */
/* line 14, ../../../app/stylesheets/_items.sass */
body.items h1 img {
height: 80px;
margin-bottom: -0.5em;
width: 80px;
}
/* line 14, ../../../app/stylesheets/_items.sass */
/* line 18, ../../../app/stylesheets/_items.sass */
body.items h1 a {
text-decoration: none;
}
/* line 16, ../../../app/stylesheets/_items.sass */
/* line 20, ../../../app/stylesheets/_items.sass */
body.items h1 a span {
text-decoration: underline;
}
/* line 18, ../../../app/stylesheets/_items.sass */
/* line 22, ../../../app/stylesheets/_items.sass */
body.items h1 a:hover span {
text-decoration: none;
}
@ -2435,23 +2494,82 @@ body.outfits-new #read-more {
float: right;
}
/* line 2, ../../../app/stylesheets/outfits/_show.sass */
/* line 2, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show .campaign-progress-wrapper {
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
background: #aaaaaa;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #cccccc), color-stop(100%, #aaaaaa));
background-image: -moz-linear-gradient(top, #cccccc 0%, #aaaaaa 100%);
background-image: linear-gradient(top, #cccccc 0%, #aaaaaa 100%);
border: 4px solid #006600;
clear: both;
margin-bottom: 1.5em;
position: relative;
visibility: hidden;
}
/* line 13, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show .campaign-progress-wrapper .button {
background: #ff5c00 url('/images/alert-overlay.png?1296599919') repeat-x;
font-size: 75%;
margin-left: 1em;
padding: 0.25em 0.75em;
}
/* line 34, ../../../app/stylesheets/partials/clean/_mixins.sass */
body.outfits-show .campaign-progress-wrapper .button:hover {
background-color: #ee4b00;
}
/* line 19, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show .campaign-progress-wrapper .button:after {
content: none;
}
/* line 22, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show .campaign-progress {
background: #006600;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #228822), color-stop(100%, #006600));
background-image: -moz-linear-gradient(top, #228822 0%, #006600 100%);
background-image: linear-gradient(top, #228822 0%, #006600 100%);
border-right: 1px solid #006600;
}
/* line 27, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show .campaign-progress-wrapper, body.outfits-show .campaign-progress {
height: 2.5em;
}
/* line 30, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show .campaign-progress-label {
text-shadow: #777777 -1px -1px 0;
font-size: 150%;
left: 0;
position: absolute;
top: 0;
text-align: center;
width: 100%;
}
/* line 39, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show .campaign-progress-label, body.outfits-show .campaign-progress-label a {
color: white;
}
/* line 43, ../../../app/stylesheets/partials/_campaign-progress.sass */
body.outfits-show.campaign-loaded .campaign-progress-wrapper {
visibility: visible;
}
/* line 6, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #title {
float: left;
}
/* line 5, ../../../app/stylesheets/outfits/_show.sass */
/* line 9, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #outfit-wardrobe-link {
float: left;
font-size: 85%;
margin-left: 2em;
margin-top: 0.75em;
}
/* line 12, ../../../app/stylesheets/outfits/_show.sass */
/* line 16, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #outfit-user {
float: right;
margin-top: 1em;
}
/* line 16, ../../../app/stylesheets/outfits/_show.sass */
/* line 20, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #preview-wrapper {
clear: both;
height: 400px;
@ -2459,13 +2577,13 @@ body.outfits-show #preview-wrapper {
position: relative;
width: 400px;
}
/* line 23, ../../../app/stylesheets/outfits/_show.sass */
/* line 27, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #preview-wrapper #preview-swf {
left: 0;
position: absolute;
top: 0;
}
/* line 28, ../../../app/stylesheets/outfits/_show.sass */
/* line 32, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #outfit-items {
text-align: center;
}