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
end end
def campaign_progress(content=nil, &block) def campaign_progress(&block)
include_campaign_progress_requirements 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') + html = content_tag(:div, nil, :class => 'campaign-progress') +
content_tag(:div, content, :class => 'campaign-progress-label') content_tag(:div, content, :class => 'campaign-progress-label')
content_tag(:div, html, :class => 'campaign-progress-wrapper') content_tag(:div, html, :class => 'campaign-progress-wrapper')

View file

@ -1,6 +1,10 @@
@import "partials/campaign-progress"
body.items body.items
+campaign-progress
text-align: center text-align: center
input[type=text] input[type=text]
font-size: 125% font-size: 125%
width: 15em width: 15em
@ -17,3 +21,4 @@ body.items
text-decoration: underline text-decoration: underline
&:hover span &:hover span
text-decoration: none text-decoration: none

View file

@ -1,29 +1,34 @@
@import "partials/campaign-progress"
body.outfits-show body.outfits-show
+campaign-progress
#title #title
float: left float: left
#outfit-wardrobe-link #outfit-wardrobe-link
float: left float: left
font-size: 85% font-size: 85%
margin: margin:
left: 2em left: 2em
top: .75em top: .75em
#outfit-user #outfit-user
float: right float: right
margin-top: 1em margin-top: 1em
#preview-wrapper #preview-wrapper
clear: both clear: both
height: 400px height: 400px
margin: 0 auto 1em margin: 0 auto 1em
position: relative position: relative
width: 400px width: 400px
#preview-swf #preview-swf
left: 0 left: 0
position: absolute position: absolute
top: 0 top: 0
#outfit-items #outfit-items
text-align: center text-align: center

View file

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

View file

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

View file

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

View file

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

View file

@ -591,34 +591,93 @@ body.contributions-index .contributions span.time-ago {
font-size: 75%; font-size: 75%;
} }
/* line 1, ../../../app/stylesheets/_items.sass */ /* line 3, ../../../app/stylesheets/_items.sass */
body.items { body.items {
text-align: center; 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 { 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%; font-size: 125%;
width: 15em; width: 15em;
} }
/* line 8, ../../../app/stylesheets/_items.sass */ /* line 12, ../../../app/stylesheets/_items.sass */
body.items h1 { body.items h1 {
margin-bottom: 1em; margin-bottom: 1em;
} }
/* line 10, ../../../app/stylesheets/_items.sass */ /* line 14, ../../../app/stylesheets/_items.sass */
body.items h1 img { body.items h1 img {
height: 80px; height: 80px;
margin-bottom: -0.5em; margin-bottom: -0.5em;
width: 80px; width: 80px;
} }
/* line 14, ../../../app/stylesheets/_items.sass */ /* line 18, ../../../app/stylesheets/_items.sass */
body.items h1 a { body.items h1 a {
text-decoration: none; text-decoration: none;
} }
/* line 16, ../../../app/stylesheets/_items.sass */ /* line 20, ../../../app/stylesheets/_items.sass */
body.items h1 a span { body.items h1 a span {
text-decoration: underline; text-decoration: underline;
} }
/* line 18, ../../../app/stylesheets/_items.sass */ /* line 22, ../../../app/stylesheets/_items.sass */
body.items h1 a:hover span { body.items h1 a:hover span {
text-decoration: none; text-decoration: none;
} }
@ -2435,23 +2494,82 @@ body.outfits-new #read-more {
float: right; 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 { body.outfits-show #title {
float: left; float: left;
} }
/* line 5, ../../../app/stylesheets/outfits/_show.sass */ /* line 9, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #outfit-wardrobe-link { body.outfits-show #outfit-wardrobe-link {
float: left; float: left;
font-size: 85%; font-size: 85%;
margin-left: 2em; margin-left: 2em;
margin-top: 0.75em; margin-top: 0.75em;
} }
/* line 12, ../../../app/stylesheets/outfits/_show.sass */ /* line 16, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #outfit-user { body.outfits-show #outfit-user {
float: right; float: right;
margin-top: 1em; margin-top: 1em;
} }
/* line 16, ../../../app/stylesheets/outfits/_show.sass */ /* line 20, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #preview-wrapper { body.outfits-show #preview-wrapper {
clear: both; clear: both;
height: 400px; height: 400px;
@ -2459,13 +2577,13 @@ body.outfits-show #preview-wrapper {
position: relative; position: relative;
width: 400px; width: 400px;
} }
/* line 23, ../../../app/stylesheets/outfits/_show.sass */ /* line 27, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #preview-wrapper #preview-swf { body.outfits-show #preview-wrapper #preview-swf {
left: 0; left: 0;
position: absolute; position: absolute;
top: 0; top: 0;
} }
/* line 28, ../../../app/stylesheets/outfits/_show.sass */ /* line 32, ../../../app/stylesheets/outfits/_show.sass */
body.outfits-show #outfit-items { body.outfits-show #outfit-items {
text-align: center; text-align: center;
} }