From ef43fadec4f2a493415989bf77b70b121eef0fa4 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sat, 23 Nov 2013 14:44:21 -0800 Subject: [PATCH 01/28] Fixing merge issues --- Gemfile | 4 +- Gemfile.lock | 9 ++- app/assets/stylesheets/application.css | 17 ----- app/assets/stylesheets/main.css.scss | 4 ++ app/assets/stylesheets/navbar.css.scss | 9 --- app/models/campaign.rb | 7 +- app/views/layouts/_navbar.html.erb | 26 +++++--- .../theme/assets/stylesheets/base.css.scss | 10 +-- .../assets/stylesheets/campaign.css.scss | 66 +++++-------------- app/views/theme/views/campaign.html.erb | 10 +-- 10 files changed, 62 insertions(+), 100 deletions(-) delete mode 100644 app/assets/stylesheets/application.css diff --git a/Gemfile b/Gemfile index c5c61dbe..4ead659f 100644 --- a/Gemfile +++ b/Gemfile @@ -3,8 +3,10 @@ ruby "1.9.3" gem 'unicorn' +#Adding support for bootstrap 3.0 and bourbon gem 'rails', '3.2.13' -gem 'bootstrap-sass', '2.1' +gem 'bootstrap-sass', '~> 3.0.2.0' +gem 'bourbon' gem 'devise' gem 'email_spec' gem 'nokogiri' diff --git a/Gemfile.lock b/Gemfile.lock index 6e0d8aaa..81a51714 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -50,7 +50,11 @@ GEM nokogiri (>= 1.4.4) uuidtools (~> 2.1) bcrypt-ruby (3.0.1) - bootstrap-sass (2.1.0.0) + bootstrap-sass (3.0.2.1) + sass (~> 3.2) + bourbon (3.1.8) + sass (>= 3.2.0) + thor builder (3.0.4) capybara (2.1.0) mime-types (>= 1.16) @@ -241,7 +245,8 @@ DEPENDENCIES active_model_serializers asset_sync aws-sdk - bootstrap-sass (= 2.1) + bootstrap-sass (~> 3.0.2.0) + bourbon capybara ckeditor coffee-rails (~> 3.2.1) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index fc74c06a..00000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - * Core files - *= require_self - *= require reset - *= require jquery.ui.all - *= require main - *= require theme -*/ \ No newline at end of file diff --git a/app/assets/stylesheets/main.css.scss b/app/assets/stylesheets/main.css.scss index af49896d..c78a3353 100644 --- a/app/assets/stylesheets/main.css.scss +++ b/app/assets/stylesheets/main.css.scss @@ -1,3 +1,7 @@ +/* Bourbon mixin library for SASS +@import "bourbon"; +*/ + /* Bootstrap framework for general styling */ @import "bootstrap"; diff --git a/app/assets/stylesheets/navbar.css.scss b/app/assets/stylesheets/navbar.css.scss index 2d8b657e..112e0241 100644 --- a/app/assets/stylesheets/navbar.css.scss +++ b/app/assets/stylesheets/navbar.css.scss @@ -19,17 +19,8 @@ } .status { - color: white; margin-top: 5px; - border-radius: 5px; margin-right:8px; - padding: 0px 10px; - } - .status.red { - background-color: red; - } - .status.green { - background-color: green; } } \ No newline at end of file diff --git a/app/models/campaign.rb b/app/models/campaign.rb index f71d067c..aa716d1b 100644 --- a/app/models/campaign.rb +++ b/app/models/campaign.rb @@ -27,12 +27,13 @@ class Campaign < ActiveRecord::Base before_validation { main_image.clear if main_image_delete == '1' } before_validation { video_placeholder.clear if video_placeholder_delete == '1' } before_validation { facebook_image.clear if facebook_image_delete == '1' } - + + #The hash indicates cropping, use ! for forced scaling, use ^ to preserve aspect ratio has_attached_file :main_image, - styles: { main: "512x385!", medium: "640x360!", small: "190x143!", thumb: "100x100#" } + styles: { main: "512x385^", medium: "640x360^", small: "190x143^", thumb: "100x100^" } has_attached_file :video_placeholder, - styles: { main: "512x385!", medium: "640x360!", thumb: "100x100#" } #The hash indicates cropping, use ! for forced scaling + styles: { main: "512x385^", medium: "640x360^", thumb: "100x100^" } has_attached_file :facebook_image, styles: { thumb: "100x100#" } diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb index d904182c..6f1f4c30 100644 --- a/app/views/layouts/_navbar.html.erb +++ b/app/views/layouts/_navbar.html.erb @@ -3,20 +3,24 @@ +
<% end %> \ No newline at end of file From 0511fa0cd299582b30375d6b71f4c56ba74d8304 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Wed, 27 Nov 2013 15:31:56 -0800 Subject: [PATCH 05/28] Few more changes/removals to get flash messages all to Bootstrap 3 --- app/assets/stylesheets/admin.css.scss | 22 +--------------------- app/assets/stylesheets/flash.css.scss | 20 -------------------- app/controllers/admin_controller.rb | 16 ++++++++-------- 3 files changed, 9 insertions(+), 49 deletions(-) delete mode 100644 app/assets/stylesheets/flash.css.scss diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss index a2cb564f..e2e89512 100644 --- a/app/assets/stylesheets/admin.css.scss +++ b/app/assets/stylesheets/admin.css.scss @@ -211,24 +211,4 @@ p { font-size: 14px; } -} - -.admin-alert { - margin-top: 30px!important; -} - -.admin-alert.alert.alert-success { - background: rgba(115, 211, 107, 1)!important; - text-shadow: none; -} - -.admin-alert.alert.alert-notice { - background: rgba(211, 211, 136, 1)!important; - text-shadow: none; -} - -.admin-alert.alert.alert-error { - background: rgba(219, 94, 94, 1)!important; - color: white; - text-shadow: none; -} +} \ No newline at end of file diff --git a/app/assets/stylesheets/flash.css.scss b/app/assets/stylesheets/flash.css.scss deleted file mode 100644 index ef81a459..00000000 --- a/app/assets/stylesheets/flash.css.scss +++ /dev/null @@ -1,20 +0,0 @@ -/*Unnecessary, gets handled by Bootstrap -.alert { - padding: 10px; - color: black; - text-align: center; - margin-bottom: 0px; -} - -.alert.alert-success { - background: rgba(0, 128, 0, 0.25); -} - -.alert.alert-notice { - background: rgba(255, 255, 0, 0.25); -} - -.alert.alert-error { - background: rgba(255, 0, 0, 0.25); -} -*/ \ No newline at end of file diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 6f2bc70e..62fb9b72 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -14,31 +14,31 @@ def admin_website @settings.errors.each do |key, error| message = message + key.to_s.humanize + ' ' + error.to_s + ', ' end - flash.now[:error] = message[0...-2] + flash.now[:danger] = message[0...-2] end end end def admin_processor_setup if request.post? - flash.now[:error] = "Invalid credentials" and return if params[:ct_prod_api_key].blank? || params[:ct_prod_api_secret].blank? + flash.now[:danger] = "Invalid credentials" and return if params[:ct_prod_api_key].blank? || params[:ct_prod_api_secret].blank? if @settings.activate_payments(params[:ct_prod_api_key], params[:ct_prod_api_secret]) flash.now[:success] = "Your payment processor is all set up!" else - flash.now[:error] = "Invalid credentials" + flash.now[:danger] = "Invalid credentials" end end end def admin_bank_setup - redirect_to admin_processor_setup_url, flash: { error: "Please set up your payment processor before providing your bank details" } and return unless @settings.payments_activated? + redirect_to admin_processor_setup_url, flash: { danger: "Please set up your payment processor before providing your bank details" } and return unless @settings.payments_activated? @bank = {} begin response = Crowdtilt.get('/users/' + @ct_admin_id + '/banks/default') rescue => exception # response threw an error, default bank may not be set up if request.post? if params[:ct_bank_id].blank? - flash.now[:error] = "An error occurred, please try again" and return + flash.now[:danger] = "An error occurred, please try again" and return else begin bank = { @@ -46,7 +46,7 @@ def admin_bank_setup } response = Crowdtilt.post('/users/' + @ct_admin_id + '/banks/default', {bank: bank}) rescue => exception - flash.now[:error] = exception.message and return + flash.now[:danger] = exception.message and return else @bank = response['bank'] end @@ -56,7 +56,7 @@ def admin_bank_setup if response['bank'] # default bank is already set up @bank = response['bank'] else - flash.now[:error] = "An error occurred, please contact team@crowdhoster.com" # this should never happen + flash.now[:danger] = "An error occurred, please contact team@crowdhoster.com" # this should never happen end end end @@ -96,7 +96,7 @@ def admin_notification_setup if current_user.update_attributes(params[:user]) flash.now[:success] = "Notification settings saved!" else - flash.now[:error] = "There was an error saving your notification settings. Please try again!" + flash.now[:danger] = "There was an error saving your notification settings. Please try again!" end end end From 1cad6bfc4d41e85eea02ed06cd829f3fedf5f801 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sat, 30 Nov 2013 15:47:14 -0800 Subject: [PATCH 06/28] Changes to admin forms, bringing them inline with Bootstrap 3 styling, adding percentage widths to textfields, inputs --- app/assets/javascripts/admin.js.coffee | 2 +- app/assets/stylesheets/admin.css.scss | 39 +++------ app/views/admin/admin_bank_setup.html.erb | 32 +++---- .../admin/admin_processor_setup.html.erb | 8 +- app/views/admin/campaigns/_form.html.erb | 84 ++++++++++--------- 5 files changed, 80 insertions(+), 85 deletions(-) diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee index 84f4091d..bd7da7ce 100644 --- a/app/assets/javascripts/admin.js.coffee +++ b/app/assets/javascripts/admin.js.coffee @@ -79,7 +79,7 @@ Crowdhoster.admin = $('#reward-add').on 'click', (e) -> e.preventDefault() - $('#rewards ul').append('
  • RewardNumber ClaimedDelete?
    $



    0
  • ') + $('#rewards ul').append('
  • RewardNumber ClaimedDelete?
    $



    0
  • ') $('.faq.sortable').sortable stop: (e, ui) -> diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss index e2e89512..382fef84 100644 --- a/app/assets/stylesheets/admin.css.scss +++ b/app/assets/stylesheets/admin.css.scss @@ -23,7 +23,12 @@ } #admin_website, #admin_campaigns { - + + /* Setting width for forms without additional divs for columns */ + .form-control { + width: 40% + } + fieldset { margin-bottom: 30px; } @@ -40,7 +45,7 @@ .explanation { float: right; - width: 400px; + width: 40%; } .explanation.inline { @@ -49,8 +54,10 @@ } label { + display: block; margin-bottom: 15px; font-size: 18px; + font-weight: 300; } label.inline { @@ -60,30 +67,12 @@ .additional_info_input { margin-top: 20px; - textarea { - width: 360px; - } } #preset-amount, #min-amount { margin-left: 20px; } - .currency { - position: relative; - - input { - padding-left: 24px; - width: 192px; - } - - span { - position: absolute; - top: 5px; - left: 10px; - } - } - #rewards { .reference { margin: 20px 0px; @@ -122,18 +111,16 @@ vertical-align: middle; cursor: move; - textarea { - width: 400px; - max-width: 400px; - margin-bottom: 0px; - } - .faq-delete { opacity: 0.5; &:hover { opacity: 1; } } + .form-control { + display: inline-block; + margin-right: 1%; + } } } diff --git a/app/views/admin/admin_bank_setup.html.erb b/app/views/admin/admin_bank_setup.html.erb index 4801b4d5..33d05f1c 100644 --- a/app/views/admin/admin_bank_setup.html.erb +++ b/app/views/admin/admin_bank_setup.html.erb @@ -32,31 +32,31 @@
    -
    +
    - +
    -
    +
    - +
    -
    +
    - +
    -
    +
    - +
    -
    +
    -
    +
    - +
    @@ -85,19 +85,19 @@

    Banking Information

    -
    +
    - +
    -
    +
    - +
    - + diff --git a/app/views/admin/admin_processor_setup.html.erb b/app/views/admin/admin_processor_setup.html.erb index 790b5b7c..d662d8dc 100644 --- a/app/views/admin/admin_processor_setup.html.erb +++ b/app/views/admin/admin_processor_setup.html.erb @@ -25,15 +25,15 @@

    Crowdhoster is set up to use the Crowdtilt API for credit card transactions and bank payouts. Please contact support.api@crowdtilt.com to request production Crowdtilt API credentials.

    -
    +
    - +
    -
    +
    - +
    diff --git a/app/views/admin/campaigns/_form.html.erb b/app/views/admin/campaigns/_form.html.erb index cfcdae54..1e06dba3 100644 --- a/app/views/admin/campaigns/_form.html.erb +++ b/app/views/admin/campaigns/_form.html.erb @@ -6,7 +6,7 @@

    This'll be both the page title (<title></title>) and the name in the header

    - <%= f.text_field :name %> + <%= f.text_field :name, class: "form-control" %>

    If you set this to be the default campaign, the homepage will redirect to the campaign.

    @@ -22,22 +22,22 @@ -
    "> - <%= f.text_field :goal_dollars, value: (number_with_precision(f.object.goal_dollars, :precision => 2) || 0) %> - $ +
    "> + $ + <%= f.text_field :goal_dollars, value: (number_with_precision(f.object.goal_dollars, :precision => 2) || 0), class: "form-control" %>
    "> - <%= f.text_field :goal_orders, value: (f.object.goal_orders || 0) %> + <%= f.text_field :goal_orders, value: (f.object.goal_orders || 0), class: "form-control" %>

    When your campaign to raise money should end.

    - <%= f.text_field :expiration_date, placeholder: "Click to select date", value: (@campaign.expiration_date.blank? ? '' : @campaign.expiration_date.strftime('%m/%d/%Y %I:%M %P %Z')) %> + <%= f.text_field :expiration_date, placeholder: "Click to select date", value: (@campaign.expiration_date.blank? ? '' : @campaign.expiration_date.strftime('%m/%d/%Y %I:%M %P %Z')), class: "form-control" %>
    @@ -52,16 +52,22 @@
    "> - - <%= f.text_field :min_payment_amount, value: (number_with_precision(f.object.min_payment_amount, :precision => 2) || 0) %> + +
    + $ + <%= f.text_field :min_payment_amount, value: (number_with_precision(f.object.min_payment_amount, :precision => 2) || 0), class: "form-control" %> +
    "> - - <%= f.text_field :fixed_payment_amount, value: (number_with_precision(f.object.fixed_payment_amount, :precision => 2) || 0) %> + +
    + $ + <%= f.text_field :fixed_payment_amount, value: (number_with_precision(f.object.fixed_payment_amount, :precision => 2) || 0), class: "form-control" %> +
    @@ -78,7 +84,7 @@ <%= f.check_box :collect_additional_info %>
    "> - <%= f.text_area :additional_info_label, rows: 2 %> + <%= f.text_area :additional_info_label, rows: 2, class: "form-control" %>
    @@ -102,7 +108,7 @@

    Assign rewards for different levels of contribution. When contributors check out, they can choose to associate a reward with their contribution. You can set a cap on how many of each reward are available and the minimum contribution amount needed to claim one.

    - <%= f.text_field :reward_reference %> + <%= f.text_field :reward_reference, class: "form-control" %>
    Add FAQ @@ -255,7 +263,7 @@ <%= f.check_box :include_comments %>
    "> - <%= f.text_field :comments_shortname %> + <%= f.text_field :comments_shortname, class: "form-control" %>
    @@ -283,19 +291,19 @@

    This is the default text that will be used for the tweet button.

    - <%= f.text_area :tweet_text, rows: 2 %> + <%= f.text_area :tweet_text, rows: 2, class: "form-control" %>

    The title shown when your site is shared via Facebook. Leave this blank if you want to use your project name.

    - <%= f.text_field :facebook_title %> + <%= f.text_field :facebook_title, class: "form-control" %>

    The description shown when your site is shared via Facebook.

    - <%= f.text_area :facebook_description, rows: 2 %> + <%= f.text_area :facebook_description, rows: 2, class: "form-control" %>
    From 52cace48984b76cfae96c768f2e1bc82adfc44f1 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sun, 1 Dec 2013 16:58:23 -0800 Subject: [PATCH 07/28] Fixes to Admin forms continue... --- app/assets/stylesheets/admin.css.scss | 9 +++++++-- app/views/admin/admin_website.html.erb | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss index 382fef84..36b58a18 100644 --- a/app/assets/stylesheets/admin.css.scss +++ b/app/assets/stylesheets/admin.css.scss @@ -26,7 +26,11 @@ /* Setting width for forms without additional divs for columns */ .form-control { - width: 40% + width: 40%; + } + + .currency { + width: 38%; } fieldset { @@ -55,7 +59,8 @@ label { display: block; - margin-bottom: 15px; + margin-top: 8px; + margin-bottom: 8px; font-size: 18px; font-weight: 300; } diff --git a/app/views/admin/admin_website.html.erb b/app/views/admin/admin_website.html.erb index 8f418e9e..02e6c279 100644 --- a/app/views/admin/admin_website.html.erb +++ b/app/views/admin/admin_website.html.erb @@ -13,13 +13,13 @@

    This will be used as the page title (for SEO) and the name in the header. Your site name is also what contributors will see on their credit card statements.

    - <%= f.text_field :site_name %> + <%= f.text_field :site_name, class: "form-control" %>

    Enter an email address where contributors can reach you.

    - <%= f.text_field :reply_to_email %> + <%= f.text_field :reply_to_email, class: "form-control" %>
    @@ -38,9 +38,9 @@

    This will place a link in the header to your blog or other such website where you can provide updates. For example, "Updates" could link to "http://myblog.com"

    - <%= f.text_field :header_link_text %> + <%= f.text_field :header_link_text, class: "form-control" %> - <%= f.text_field :header_link_url %> + <%= f.text_field :header_link_url, class: "form-control" %>
    @@ -57,25 +57,25 @@

    This is the default text that will be used for the tweet button.

    - <%= f.text_area :tweet_text, rows: 2 %> + <%= f.text_area :tweet_text, rows: 2, class: "form-control" %>

    Include your Facebook app ID here to set up your social sharing buttons. Visit https://developers.facebook.com/apps to create an app for your site. The like button will NOT show up unless you provide this ID.

    - <%= f.text_field :facebook_app_id %> + <%= f.text_field :facebook_app_id, class: "form-control" %>

    The title shown when your site is shared via Facebook. Leave this blank if you want to use your project name.

    - <%= f.text_field :facebook_title %> + <%= f.text_field :facebook_title, class: "form-control" %>

    The description shown when your site is shared via Facebook.

    - <%= f.text_area :facebook_description, rows: 2 %> + <%= f.text_area :facebook_description, rows: 2, class: "form-control" %>
    @@ -98,7 +98,7 @@

    If would like to add tracking to your site, sign up for an account at https://google.com/analytics, then paste your tracking ID here.

    - <%= f.text_field :google_id %> + <%= f.text_field :google_id, class: "form-control" %>
    @@ -109,7 +109,7 @@

    The text shown in the footer beside the copyright symbol.

    - <%= f.text_field :copyright_text %> + <%= f.text_field :copyright_text, class: "form-control" %>
    @@ -127,13 +127,13 @@

    Add your own CSS styles to fully customize the look and feel of your site.

    - <%= f.text_area :custom_css, rows: 3, style: "width:400px; height: 200px" %> + <%= f.text_area :custom_css, rows: 8, class: "form-control" %>

    Add your own JavaScript here. Use this field to paste in scripts for analytics tracking, retargeting, etc.

    - <%= f.text_area :custom_js, rows: 3, style: "width:400px; height: 200px" %> + <%= f.text_area :custom_js, rows: 8, class: "form-control" %>
    From 4528ccea3cbd9f38b2445469edc92d47cc7788ed Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Mon, 2 Dec 2013 15:48:17 -0800 Subject: [PATCH 08/28] Adding form-control class to primitives.css.scss as an extend on inputs rather than adding the class on each input because that's stupid and breaks DRY --- app/assets/javascripts/admin.js.coffee | 2 +- app/assets/stylesheets/admin.css.scss | 17 ++++++--- app/assets/stylesheets/main.css.scss | 2 +- app/assets/stylesheets/primitives.css.scss | 5 +++ app/views/admin/admin_bank_setup.html.erb | 16 ++++----- .../admin/admin_processor_setup.html.erb | 4 +-- app/views/admin/admin_website.html.erb | 24 ++++++------- app/views/admin/campaigns/_form.html.erb | 36 +++++++++---------- app/views/devise/registrations/edit.html.erb | 32 +++++++++++------ 9 files changed, 80 insertions(+), 58 deletions(-) diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee index bd7da7ce..ffae5265 100644 --- a/app/assets/javascripts/admin.js.coffee +++ b/app/assets/javascripts/admin.js.coffee @@ -79,7 +79,7 @@ Crowdhoster.admin = $('#reward-add').on 'click', (e) -> e.preventDefault() - $('#rewards ul').append('
  • RewardNumber ClaimedDelete?
    $



    0
  • ') + $('#rewards ul').append('
  • RewardNumber ClaimedDelete?
    $



    0
  • ') $('.faq.sortable').sortable stop: (e, ui) -> diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss index 36b58a18..68c93528 100644 --- a/app/assets/stylesheets/admin.css.scss +++ b/app/assets/stylesheets/admin.css.scss @@ -25,14 +25,17 @@ #admin_website, #admin_campaigns { /* Setting width for forms without additional divs for columns */ - .form-control { - width: 40%; + + .input-group .form-control { + width: 37.5%; } - .currency { - width: 38%; + .form-control { + width: 40%; } + /* Done setting form widths */ + fieldset { margin-bottom: 30px; } @@ -57,9 +60,13 @@ width: 100%; } + .explanation-left { + @extend .explanation; + float: left; + } + label { display: block; - margin-top: 8px; margin-bottom: 8px; font-size: 18px; font-weight: 300; diff --git a/app/assets/stylesheets/main.css.scss b/app/assets/stylesheets/main.css.scss index 702eb223..fe86548e 100644 --- a/app/assets/stylesheets/main.css.scss +++ b/app/assets/stylesheets/main.css.scss @@ -11,4 +11,4 @@ @import "devise"; @import "admin"; @import "campaigns"; -@import "users"; +@import "users"; \ No newline at end of file diff --git a/app/assets/stylesheets/primitives.css.scss b/app/assets/stylesheets/primitives.css.scss index 087c754d..e380f019 100644 --- a/app/assets/stylesheets/primitives.css.scss +++ b/app/assets/stylesheets/primitives.css.scss @@ -19,6 +19,11 @@ $tertiary_font: "Arial"; text-align: center; } +// Adding form-control bootstrap styling to necessary input fields +textarea, input[type=text], input[type=email], input[type=password] { + @extend .form-control; +} + #main { min-height: 400px; } diff --git a/app/views/admin/admin_bank_setup.html.erb b/app/views/admin/admin_bank_setup.html.erb index 33d05f1c..08ab7665 100644 --- a/app/views/admin/admin_bank_setup.html.erb +++ b/app/views/admin/admin_bank_setup.html.erb @@ -34,24 +34,24 @@
    - +
    - +
    - +
    - +
    @@ -76,7 +76,7 @@
    - +
    @@ -87,17 +87,17 @@
    - +
    - +
    - + diff --git a/app/views/admin/admin_processor_setup.html.erb b/app/views/admin/admin_processor_setup.html.erb index d662d8dc..8631dec9 100644 --- a/app/views/admin/admin_processor_setup.html.erb +++ b/app/views/admin/admin_processor_setup.html.erb @@ -27,13 +27,13 @@
    - +
    - +
    diff --git a/app/views/admin/admin_website.html.erb b/app/views/admin/admin_website.html.erb index 02e6c279..f63927d1 100644 --- a/app/views/admin/admin_website.html.erb +++ b/app/views/admin/admin_website.html.erb @@ -13,13 +13,13 @@

    This will be used as the page title (for SEO) and the name in the header. Your site name is also what contributors will see on their credit card statements.

    - <%= f.text_field :site_name, class: "form-control" %> + <%= f.text_field :site_name %>

    Enter an email address where contributors can reach you.

    - <%= f.text_field :reply_to_email, class: "form-control" %> + <%= f.text_field :reply_to_email %>
    @@ -38,9 +38,9 @@

    This will place a link in the header to your blog or other such website where you can provide updates. For example, "Updates" could link to "http://myblog.com"

    - <%= f.text_field :header_link_text, class: "form-control" %> + <%= f.text_field :header_link_text %> - <%= f.text_field :header_link_url, class: "form-control" %> + <%= f.text_field :header_link_url %>
    @@ -57,25 +57,25 @@

    This is the default text that will be used for the tweet button.

    - <%= f.text_area :tweet_text, rows: 2, class: "form-control" %> + <%= f.text_area :tweet_text, rows: 2 %>

    Include your Facebook app ID here to set up your social sharing buttons. Visit https://developers.facebook.com/apps to create an app for your site. The like button will NOT show up unless you provide this ID.

    - <%= f.text_field :facebook_app_id, class: "form-control" %> + <%= f.text_field :facebook_app_id %>

    The title shown when your site is shared via Facebook. Leave this blank if you want to use your project name.

    - <%= f.text_field :facebook_title, class: "form-control" %> + <%= f.text_field :facebook_title %>

    The description shown when your site is shared via Facebook.

    - <%= f.text_area :facebook_description, rows: 2, class: "form-control" %> + <%= f.text_area :facebook_description, rows: 2 %>
    @@ -98,7 +98,7 @@

    If would like to add tracking to your site, sign up for an account at https://google.com/analytics, then paste your tracking ID here.

    - <%= f.text_field :google_id, class: "form-control" %> + <%= f.text_field :google_id %>
    @@ -109,7 +109,7 @@

    The text shown in the footer beside the copyright symbol.

    - <%= f.text_field :copyright_text, class: "form-control" %> + <%= f.text_field :copyright_text %>
    @@ -127,13 +127,13 @@

    Add your own CSS styles to fully customize the look and feel of your site.

    - <%= f.text_area :custom_css, rows: 8, class: "form-control" %> + <%= f.text_area :custom_css, rows: 8 %>

    Add your own JavaScript here. Use this field to paste in scripts for analytics tracking, retargeting, etc.

    - <%= f.text_area :custom_js, rows: 8, class: "form-control" %> + <%= f.text_area :custom_js, rows: 8 %>
    diff --git a/app/views/admin/campaigns/_form.html.erb b/app/views/admin/campaigns/_form.html.erb index 1e06dba3..2a084b4c 100644 --- a/app/views/admin/campaigns/_form.html.erb +++ b/app/views/admin/campaigns/_form.html.erb @@ -6,7 +6,7 @@

    This'll be both the page title (<title></title>) and the name in the header

    - <%= f.text_field :name, class: "form-control" %> + <%= f.text_field :name %>

    If you set this to be the default campaign, the homepage will redirect to the campaign.

    @@ -24,20 +24,20 @@
    "> $ - <%= f.text_field :goal_dollars, value: (number_with_precision(f.object.goal_dollars, :precision => 2) || 0), class: "form-control" %> + <%= f.text_field :goal_dollars, value: (number_with_precision(f.object.goal_dollars, :precision => 2) || 0) %>
    "> - <%= f.text_field :goal_orders, value: (f.object.goal_orders || 0), class: "form-control" %> + <%= f.text_field :goal_orders, value: (f.object.goal_orders || 0) %>

    When your campaign to raise money should end.

    - <%= f.text_field :expiration_date, placeholder: "Click to select date", value: (@campaign.expiration_date.blank? ? '' : @campaign.expiration_date.strftime('%m/%d/%Y %I:%M %P %Z')), class: "form-control" %> + <%= f.text_field :expiration_date, placeholder: "Click to select date", value: (@campaign.expiration_date.blank? ? '' : @campaign.expiration_date.strftime('%m/%d/%Y %I:%M %P %Z')) %>
    @@ -55,7 +55,7 @@
    $ - <%= f.text_field :min_payment_amount, value: (number_with_precision(f.object.min_payment_amount, :precision => 2) || 0), class: "form-control" %> + <%= f.text_field :min_payment_amount, value: (number_with_precision(f.object.min_payment_amount, :precision => 2) || 0) %>
    @@ -66,7 +66,7 @@
    $ - <%= f.text_field :fixed_payment_amount, value: (number_with_precision(f.object.fixed_payment_amount, :precision => 2) || 0), class: "form-control" %> + <%= f.text_field :fixed_payment_amount, value: (number_with_precision(f.object.fixed_payment_amount, :precision => 2) || 0) %>
    @@ -84,7 +84,7 @@ <%= f.check_box :collect_additional_info %>
    "> - <%= f.text_area :additional_info_label, rows: 2, class: "form-control" %> + <%= f.text_area :additional_info_label, rows: 2 %>
    @@ -108,7 +108,7 @@

    Assign rewards for different levels of contribution. When contributors check out, they can choose to associate a reward with their contribution. You can set a cap on how many of each reward are available and the minimum contribution amount needed to claim one.

    - <%= f.text_field :reward_reference, class: "form-control" %> + <%= f.text_field :reward_reference %>
    Add FAQ @@ -336,7 +342,7 @@ <%= f.check_box :production_flag %> <% else %> - You must set up your payment processor before activating payments. Visit "Payment Settings" from the admin menu to do this. +

    You must set up your payment processor before activating payments. Visit "Payment Settings" from the admin menu to do this.

    <% end %> <% else %>

    You have activated payments for this campaign, which means transactions WILL be processed. This cannot be undone for this campaign. If you activated payments by mistake, we recommend ending and un-publishing this campaign and creating a new one.

    diff --git a/app/views/campaigns/checkout_amount.html.erb b/app/views/campaigns/checkout_amount.html.erb index b1eaf4d9..50a8e0e8 100644 --- a/app/views/campaigns/checkout_amount.html.erb +++ b/app/views/campaigns/checkout_amount.html.erb @@ -1,99 +1,105 @@
    -
    -
    -

    <%= @campaign.name %>

    - -
    - - - <% if @campaign.payment_type == 'fixed' %> - -
    -

    Please choose a quantity:

    -
    - - $<%= number_with_precision(@campaign.fixed_payment_amount, precision: 2) %>  x   - -   =  $<%= number_with_precision(@campaign.fixed_payment_amount, precision: 2) %> - -
    - - - - <% else %> - -
    -

    Please enter an amount:

    -
    -
    -    - $ -
    - Minimum is $<%= number_with_precision(@campaign.min_payment_amount, precision: 2) %> - -
    - - - <% end %> - - <% if @campaign.rewards? %> -
    -

    Select your <%= @campaign.reward_reference %>:

    -
      -
    • - - -
      -

      No <%= @campaign.reward_reference %>

      -
      - -
    • - <% @campaign.rewards.order("price ASC").each do |reward| %> - <% if reward.visible? %> -
    • - <%= raw('checked="checked"') if @reward && @reward.id == reward.id %>> - -
      -

      <%= reward.title %>

      -

      - <%= reward.payments.length %> <%= "of #{reward.number}" unless reward.unlimited? %> claimed - <% if reward.sold_out? %> (All gone!) <% end %> -

      -

      <%= reward.description %>

      -

      Estimated Delivery: <%= reward.delivery_date %>

      -
      - edit -
    • - <% end %> - <% end %> -
    -
    - <% end %> - +
    + + - +
    +
    + +
    + + + <% if @campaign.payment_type == 'fixed' %> + +
    +

    Please choose a quantity:

    +
    + + $<%= number_with_precision(@campaign.fixed_payment_amount, precision: 2) %>  x   + +   =  $<%= number_with_precision(@campaign.fixed_payment_amount, precision: 2) %> + +
    + + + + <% else %> + +
    +

    Please enter an amount:

    +
    +
    + $ + +
    + +
    + + + <% end %> + + <% if @campaign.rewards? %> +
    +

    Select your <%= @campaign.reward_reference %>:

    +
      +
    • + + +
      +

      No <%= @campaign.reward_reference %>

      + +
      +
    • + <% @campaign.rewards.order("price ASC").each do |reward| %> + <% if reward.visible? %> +
    • + <%= raw('checked="checked"') if @reward && @reward.id == reward.id %>> + +
      +

      <%= reward.title %>

      +

      + <%= reward.payments.length %> <%= "of #{reward.number}" unless reward.unlimited? %> claimed + <% if reward.sold_out? %> (All gone!) <% end %> +

      +

      <%= reward.description %>

      +

      Estimated Delivery: <%= reward.delivery_date %>

      + Edit +
      +
    • + <% end %> + <% end %> +
    +
    + <% end %> + + + + + +
    -
    -
    - -
    diff --git a/app/views/campaigns/checkout_confirmation.html.erb b/app/views/campaigns/checkout_confirmation.html.erb index e6807fa6..904386a5 100644 --- a/app/views/campaigns/checkout_confirmation.html.erb +++ b/app/views/campaigns/checkout_confirmation.html.erb @@ -1,45 +1,50 @@
    -
    - <%= raw(@campaign.confirmation_page_content) %> -
    diff --git a/app/views/campaigns/checkout_payment.html.erb b/app/views/campaigns/checkout_payment.html.erb index 25129700..b5fbe603 100644 --- a/app/views/campaigns/checkout_payment.html.erb +++ b/app/views/campaigns/checkout_payment.html.erb @@ -1,215 +1,244 @@
    -
    + + -
    +
    +
    -
    +
    - -

    Contact Information

    + -
    - - + +

    Contact Information

    - - +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    - <% if @campaign.collect_additional_info %> -

    Additional Information

    + <% if @campaign.collect_additional_info %> +

    Additional Information

    - - - <% end %> -
    - - <% if @campaign.collect_shipping %> -

    Shipping Address

    - -
    -
    - - - - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    - <% end %> + + + <% end %> +
    -

    Credit/Debit Card

    + <% if @campaign.collect_shipping %> +

    Shipping Address

    -
    -
    -
    - - -
    -
    - - - -
    -
    -
    -
    -
    -
    - - +
    +
    +
    + + +
    +
    +
    +
    Address2 + +
    -
    - - +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    +
    + <% end %> + +

    Credit/Debit Card

    + +
    +
    +
    +
    + + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    + + + +
    +
    + + + +
    +
    +
    + + + + + + + + + + + <% if !@campaign.production_flag %> +
    This campaign is in sandbox mode, your card will not actually be charged.
    + <% end%> + +
    + + +
    -
    - - - - - - - - - - - - - <% if !@campaign.production_flag %> -
    This campaign is in sandbox mode, your card will not actually be charged.
    - <% end%> - -
    - - - -
    - - - -
    <%= image_tag 'crowdtilt_badge_no_card_logos.png', width: "120px", height: "36px" %>
    -
    - -
    + + + +
    <%= image_tag 'crowdtilt_badge_no_card_logos.png', width: "120px", height: "36px" %>
    +
    - - <% end %> -
    - <%= raw(@campaign.checkout_sidebar_content) %> +
    + <%= raw(@campaign.checkout_sidebar_content) %> +
    -
    diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 1e79a011..22199199 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -8,21 +8,31 @@ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> <%= devise_error_messages! %> -
    <%= f.label :fullname, "Full Name" %> - <%= f.text_field :fullname, :autofocus => true %>
    +
    + <%= f.label :fullname, "Full Name" %> + <%= f.text_field :fullname, :autofocus => true %> +
    -
    <%= f.label :email %> - <%= f.email_field :email, :autofocus => true %>
    +
    + <%= f.label :email %> + <%= f.email_field :email, :autofocus => true %> +

    Change your password:

    -
    <%= f.label :password, "Enter your new password" %> - <%= f.password_field :password, :autocomplete => "off" %>
    - -
    <%= f.label :password_confirmation, "Re-enter your new password" %> - <%= f.password_field :password_confirmation %>
    +
    + <%= f.label :password, "Enter your new password" %> + <%= f.password_field :password, :autocomplete => "off" %> +
    + +
    + <%= f.label :password_confirmation, "Re-enter your new password" %> + <%= f.password_field :password_confirmation %> +


    -
    <%= f.label :current_password, "Current Password (we need this to confirm your changes)" %> - <%= f.password_field :current_password %>
    +
    + <%= f.label :current_password, "Current Password (we need this to confirm your changes)" %> + <%= f.password_field :current_password %> +
    <% end %> diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb index d904182c..56e425ae 100644 --- a/app/views/layouts/_navbar.html.erb +++ b/app/views/layouts/_navbar.html.erb @@ -1,49 +1,59 @@ <% if user_signed_in? && current_user.admin? %> <% end %> \ No newline at end of file diff --git a/app/views/layouts/_social_js.html.erb b/app/views/layouts/_social_js.html.erb index 5021741a..d3c0f6b2 100644 --- a/app/views/layouts/_social_js.html.erb +++ b/app/views/layouts/_social_js.html.erb @@ -13,7 +13,7 @@ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; - js.src = "//connect.facebook.net/en_US/all.js"; + js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7419c63e..6977cfeb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -2,6 +2,9 @@ + + + <%= @settings.site_name %> <% if @settings.indexable == false %> diff --git a/app/views/shared/_share_buttons.html.erb b/app/views/shared/_share_buttons.html.erb index 8b565717..e032b1bb 100644 --- a/app/views/shared/_share_buttons.html.erb +++ b/app/views/shared/_share_buttons.html.erb @@ -1,5 +1,12 @@
    - - -
    + +
    + +
    +
    + +
    \ No newline at end of file diff --git a/app/views/theme/assets/stylesheets/base.css.scss b/app/views/theme/assets/stylesheets/base.css.scss index e82a94e4..bc129228 100644 --- a/app/views/theme/assets/stylesheets/base.css.scss +++ b/app/views/theme/assets/stylesheets/base.css.scss @@ -4,6 +4,7 @@ $h3_color: #4B4B4B; $h4_color: #292929; $h5_color: #4B4B4B; + $text_color: #6B6B6B; $link_color: #0008D6; $text_shadow: 0 1px 0px #fff; @@ -14,6 +15,7 @@ $primary_font: "Helvetica Neue"; $secondary_font: "Helvetica"; $tertiary_font: "Arial"; + // FAQ Entry $summary_color: #0088D6; @@ -28,30 +30,30 @@ $gray_background_bottom_color: #FAFAFA; $gray_background_border_color: #C4C4C4; // Button colors/background/border -$button_color: white; +$button_color: #FFFFFF; $button_background_color: #0088d6; $button_hovered_color: #0088d6; $button_active_border: #C8C8C8; // This only affects .blue_button, which is the "Reserve Now" button you see on Lockitron's homepage -$button_text_shadow_color: rgba(0,0,0,.37); +$button_text_shadow_color: rgba(0,0,0,.37); $button_box_shadow_color: rgba(255,255,255,.92); $button_box_shadow_inset_color: rgba(0,0,0,.22); $button_border_radius: 10px; // Default State -$button_ie9_gradient: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PGxpbmVhckdyYWRpZW50IGlkPSJoYXQwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+CjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMwZTk2ZTQiIHN0b3Atb3BhY2l0eT0iMSIvPgo8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMmEwZmEiIHN0b3Atb3BhY2l0eT0iMSIvPgogICA8L2xpbmVhckdyYWRpZW50PgoKPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNoYXQwKSIgLz4KPC9zdmc+); +$button_ie9_gradient: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PGxpbmVhckdyYWRpZW50IGlkPSJoYXQwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+CjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMwZTk2ZTQiIHN0b3Atb3BhY2l0eT0iMSIvPgo8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMmEwZmEiIHN0b3Atb3BhY2l0eT0iMSIvPgogICA8L2xpbmVhckdyYWRpZW50PgoKPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNoYXQwKSIgLz4KPC9zdmc+); $button_top_gradient: #0E96E4; -$button_bottom_gradient: #02A0FA; +$button_bottom_gradient: #02A0FA; // Hover State $button_ie9_gradient_hover: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PGxpbmVhckdyYWRpZW50IGlkPSJoYXQwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+CjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMyZGE0ZTkiIHN0b3Atb3BhY2l0eT0iMSIvPgo8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMyMWFlZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICA8L2xpbmVhckdyYWRpZW50PgoKPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNoYXQwKSIgLz4KPC9zdmc+); $button_top_gradient_hover: #2DA4E9; -$button_bottom_gradient_hover: #21AEFF; +$button_bottom_gradient_hover: #21AEFF; // Active State $button_ie9_gradient_active: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PGxpbmVhckdyYWRpZW50IGlkPSJoYXQwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+CjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMwMzlmZjciIHN0b3Atb3BhY2l0eT0iMSIvPgo8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMzlmZjciIHN0b3Atb3BhY2l0eT0iMSIvPgogICA8L2xpbmVhckdyYWRpZW50PgoKPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNoYXQwKSIgLz4KPC9zdmc+); -$button_top_gradient_active: #039FF7; +$button_top_gradient_active: #039FF7; $button_bottom_gradient_active: #039ff7; // Used in the FAQ @@ -124,7 +126,8 @@ body.lt-ie9 { margin-top: 20px; margin-bottom: 20px; padding: 15px 15px; - width: 274px; + width: 80%; + max-width: 500px; font-size: 32px; line-height: 32px; @@ -140,10 +143,10 @@ body.lt-ie9 { 0 1px 1px $button_box_shadow_color /* drop shadow */, inset 0 -1px 1px $button_box_shadow_inset_color /* inner shadow */; background-image: $button_ie9_gradient_hover; /* gradient fill */ - background-image: -moz-linear-gradient(90deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ - background-image: -o-linear-gradient(90deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ - background-image: -webkit-linear-gradient(90deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ - background-image: linear-gradient(90deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ + background-image: -moz-linear-gradient(180deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ + background-image: -o-linear-gradient(180deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ + background-image: -webkit-linear-gradient(180deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ + background-image: linear-gradient(180deg, $button_top_gradient_hover 0%, $button_bottom_gradient_hover 100%); /* gradient fill */ text-decoration: none; } diff --git a/app/views/theme/assets/stylesheets/campaign.css.scss b/app/views/theme/assets/stylesheets/campaign.css.scss index 681b2a28..5477f076 100644 --- a/app/views/theme/assets/stylesheets/campaign.css.scss +++ b/app/views/theme/assets/stylesheets/campaign.css.scss @@ -19,11 +19,28 @@ } } } + + #media { + margin-bottom: 20px; + } + + #video { + position: relative; + padding-bottom: 56.25%; + padding-top: 30px; height: 0; overflow: hidden; + } + + #video iframe, + #video object, + #video embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } #video { - float: left; - width: 512px; - height: 385px; background: #fff; -moz-box-shadow: 0 2px 6px rgba(0,0,0,.39); /* drop shadow */ -webkit-box-shadow: 0 2px 6px rgba(0,0,0,.39); /* drop shadow */ @@ -36,12 +53,16 @@ } #image { - float: left; - width: 512px; - height: 385px; + max-width: 100%; + height: auto; + display: inline-block; -moz-box-shadow: 0 2px 6px rgba(0,0,0,.39); /* drop shadow */ -webkit-box-shadow: 0 2px 6px rgba(0,0,0,.39); /* drop shadow */ box-shadow: 0 2px 6px rgba(0,0,0,.39); /* drop shadow */ + img { + max-width: 100%; + height: auto; + } } #reserve_container { @@ -66,9 +87,6 @@ } #backing { - float: left; - width: 392px; - margin: 20px 0 0 34px; ul { margin: 0; @@ -76,10 +94,6 @@ #backers { border-left: none; - padding-left: 0; - ul { - float: left; - } } #days { @@ -114,70 +128,34 @@ body.lt-ie9 { - #progress { + .progress-bar { background-image: none !important; background-color: #1392dc !important; } } - #progress_bg { - overflow: hidden; + .progress { + background-color: #efefef; margin-top: 20px; - float: left; - height: 40px; - -moz-box-shadow: 0 1px 1px rgba(0,0,0,.41); /* drop shadow */ - -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.41); /* drop shadow */ - box-shadow: 0 1px 1px rgba(0,0,0,.41); /* drop shadow */ - -webkit-border-radius: 30px; - -moz-border-radius: 30px; - border-radius: 30px; - width: 383px; - background: #dbdbdb; - - #progress { - height: 40px; - -moz-box-shadow: 0 1px 1px rgba(0,0,0,.59); /* drop shadow */ - -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.59); /* drop shadow */ - box-shadow: 0 1px 1px rgba(0,0,0,.59); /* drop shadow */ - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+PGxpbmVhckdyYWRpZW50IGlkPSJoYXQwIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjEwMCUiIHgyPSI1MCUiIHkyPSIwJSI+CjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMxMzkyZGMiIHN0b3Atb3BhY2l0eT0iMSIvPgo8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwNjlkZjQiIHN0b3Atb3BhY2l0eT0iMSIvPgogICA8L2xpbmVhckdyYWRpZW50PgoKPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNoYXQwKSIgLz4KPC9zdmc+); /* gradient fill */ - background-image: -moz-linear-gradient(90deg, #1392dc 0%, #069df4 100%); /* gradient fill */ - background-image: -o-linear-gradient(90deg, #1392dc 0%, #069df4 100%); /* gradient fill */ - background-image: -webkit-linear-gradient(90deg, #1392dc 0%, #069df4 100%); /* gradient fill */ - background-image: linear-gradient(90deg, #1392dc 0%, #069df4 100%); /* gradient fill */ - -webkit-border-radius: 30px; - -moz-border-radius: 30px; - border-radius: 30px; - min-width: 2%; - width: 100%; - max-width: 100%; - display: inline-block; - } + margin-bottom: 0px; + } - #progress_text { - margin: 0 auto; - width: 100%; - font-size: 14pt; - display: inline-block; - color: white; - text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.37); - text-align: center; - position: relative; - top: -35px; - } + #progress_text { + margin: 0 auto; + width: 100%; + font-size: 14pt; + display: inline-block; + color: white; + text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.37); + text-align: center; + position: relative; + top: -35px; } .small { height: 20px !important; - - #progress { - height: 20px !important; - } } - .share { - margin-left: 100px; - margin-top: 24px; - } } /************************************* @@ -191,22 +169,20 @@ .main_content { .tabbable { width: 100%; - float: left; } - } - .main_content.narrow { - width: 620px; - float: left; + .tab-content { + margin-top: 15px; + } } .rewards_sidebar { - float: right; - width: 280px; background: #f6f6f6; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; + display: inline-block; h3 { margin: 20px 0px 0px 20px; + padding-top: 10px; } ul { margin: 0px; @@ -295,12 +271,9 @@ ul { margin-top: 30px; - float: left; - width: 45%; li { - width: 400px; - margin: 0 49px 30px 0; + margin-bottom: 30px; padding-left: 18px; background: image-url('bullet.png') no-repeat left 8px; diff --git a/app/views/theme/assets/stylesheets/header.css.scss b/app/views/theme/assets/stylesheets/header.css.scss index 518d3869..abdf0a5a 100644 --- a/app/views/theme/assets/stylesheets/header.css.scss +++ b/app/views/theme/assets/stylesheets/header.css.scss @@ -7,18 +7,4 @@ box-shadow: 0 1px 2px rgba(0,0,0,0.29); background: #ffffff; position: relative; - .container { - position: relative; - - h1 { - width: 800px; - } - - .header_link { - position: absolute; - top: 6px; - right: 0px; - } - } - } \ No newline at end of file diff --git a/app/views/theme/assets/stylesheets/homepage.css.scss b/app/views/theme/assets/stylesheets/homepage.css.scss index 13ddb91a..a679a8a9 100644 --- a/app/views/theme/assets/stylesheets/homepage.css.scss +++ b/app/views/theme/assets/stylesheets/homepage.css.scss @@ -30,8 +30,8 @@ img { margin-bottom: 5px; - width: 190px; - height: 143px; + width: 100%; + height: auto; background-color: #cecece; display:block; } diff --git a/app/views/theme/views/_header.html.erb b/app/views/theme/views/_header.html.erb index 7c6c5a71..b12b2e72 100644 --- a/app/views/theme/views/_header.html.erb +++ b/app/views/theme/views/_header.html.erb @@ -1,20 +1,20 @@ \ No newline at end of file diff --git a/app/views/theme/views/campaign.html.erb b/app/views/theme/views/campaign.html.erb index ee25f786..10e2ff48 100644 --- a/app/views/theme/views/campaign.html.erb +++ b/app/views/theme/views/campaign.html.erb @@ -6,105 +6,134 @@

    <%= @campaign.name %>

    -
    - <% if @campaign.media_type == 'video' %> +
    +
    +
    + <% if @campaign.media_type == 'video' %> -
    - <% if @campaign.video_placeholder.file? %> -
    - <%= image_tag @campaign.video_placeholder.url(:main), alt: "video_place_holder" %> -
    - <% if !@campaign.video_embed_id.blank? %> - - <% end %> - <% else %> - <% if !@campaign.video_embed_id.blank? %> - - <% end %> - <% end %> -
    +
    + <% if @campaign.video_placeholder.file? %> +
    + <%= image_tag @campaign.video_placeholder.url(:main), alt: "video_place_holder" %> +
    + <% if !@campaign.video_embed_id.blank? %> + + <% end %> + <% else %> + <% if !@campaign.video_embed_id.blank? %> + + <% end %> + <% end %> +
    + + <% else %> - <% else %> +
    + <%= image_tag @campaign.main_image.url(:main), alt: "project_image" %> +
    -
    - <%= image_tag @campaign.main_image.url(:main), alt: "project_image" %> + <% end %> +
    - <% end %> +
    +
    + +
    + <%# If Goal is Dollars %> + <% if @campaign.goal_type == 'dollars' %> +
    + <%= number_with_delimiter @campaign.number_of_contributions.to_i, :delimiter => "," %> + <%= @campaign.contributor_reference.pluralize(@campaign.number_of_contributions.to_i) %> +
    +
    + <%= number_to_currency @campaign.raised_amount.ceil, :precision => 0 %> + of <%= number_to_currency @campaign.goal_dollars.ceil, :precision => 0 %> +
    -
    -
      + <%# Checking to see if Campaign is Expired %> + <% if !@campaign.expired? %> +
      + <%= distance_of_time_in_words_to_now(@campaign.expiration_date).gsub(/\D/, "") %> + <%= distance_of_time_in_words_to_now(@campaign.expiration_date).gsub(/\d/, "").gsub("about", "") %> left +
      + <% else %> +
      + No + days left! +
      + <% end %> + <%# End Expiration Check %> - <% if @campaign.goal_type == 'dollars' %> -
    • - <%= number_with_delimiter @campaign.number_of_contributions.to_i, :delimiter => "," %> - <%= @campaign.contributor_reference.pluralize(@campaign.number_of_contributions.to_i) %> -
    • -
    • - <%= number_to_currency @campaign.raised_amount.ceil, :precision => 0 %> - of <%= number_to_currency @campaign.goal_dollars.ceil, :precision => 0 %> -
    • - <% else %> -
    • - <%= @campaign.orders %> <%= @campaign.contributor_reference.pluralize(@campaign.orders) %> - of <%= @campaign.goal_orders %> needed -
    • - <% end %> + <% else %> + <%# Else, Goal is in Orders %> +
      + <%= @campaign.orders %> <%= @campaign.contributor_reference.pluralize(@campaign.orders) %> + of <%= @campaign.goal_orders %> needed +
      - <% if !@campaign.expired? %> -
    • - <%= distance_of_time_in_words_to_now(@campaign.expiration_date).gsub(/\D/, "") %> - <%= distance_of_time_in_words_to_now(@campaign.expiration_date).gsub(/\d/, "").gsub("about", "") %> left -
    • - <% else %> -
    • - No - days left! -
    • - <% end %> -
    + <%# Checking to see if Campaign is Expired %> + <% if !@campaign.expired? %> +
    + <%= distance_of_time_in_words_to_now(@campaign.expiration_date).gsub(/\D/, "") %> + <%= distance_of_time_in_words_to_now(@campaign.expiration_date).gsub(/\d/, "").gsub("about", "") %> left +
    + <% else %> +
    + No + days left! +
    + <% end %> + <%# End Expiration Check %> - <% if @campaign.raised_amount < @campaign.goal_dollars %> -
    -
    -
    -
    - <% else %> -
    -
    + <% end %> + <%# End If/Else %>
    -
    <%= @campaign.tilt_percent.ceil %>% <%= @campaign.progress_text %>
    -
    - <% end %> -
    -
    - <% if @campaign.expired? %> - - <%= @campaign.primary_call_to_action_button %> - + <% if @campaign.raised_amount < @campaign.goal_dollars %> +
    +
    + <%= @campaign.tilt_percent.to_i %>% Complete +
    +
    <% else %> - - <%= @campaign.primary_call_to_action_button %> - +
    +
    + 100% Complete (Success!) +
    +
    <%= @campaign.tilt_percent.ceil %>% <%= @campaign.progress_text %>
    +
    <% end %> + +
    +
    + <% if @campaign.expired? %> + + <%= @campaign.primary_call_to_action_button %> + + <% else %> + + <%= @campaign.primary_call_to_action_button %> + + <% end %> +
    +
    + <%= raw(@campaign.primary_call_to_action_description) %> +
    + +
    -
    - <%= raw(@campaign.primary_call_to_action_description) %> -
    -
    -
    -
    -
    @@ -112,69 +141,73 @@
    -
    - <% if @campaign.include_comments %> -
    - -
    -
    - <%= raw(@campaign.main_content) %> -
    -
    -
    -
    - - +
    +
    + <% if @campaign.include_comments %> +
    + +
    +
    + <%= raw(@campaign.main_content) %>
    +
    +
    +
    + + +
    +
    + <% else %> + <%= raw(@campaign.main_content) %> + <% end %> +
    + + <% if @campaign.rewards? %> + <% end %>
    - - <% if @campaign.rewards? %> - - <% end %>
    @@ -201,26 +234,32 @@

    Frequently Asked Questions

    -
      - <% for i in 0...(@campaign.faqs.count/2.0).ceil %> -
    • -
      - <%= @campaign.faqs[i].question %> -

      <%= raw(@campaign.faqs[i].answer.gsub("\n", '
      ')) %>

      -
      -
    • - <% end %> -
    -
      - <% for i in (@campaign.faqs.count/2.0).ceil...@campaign.faqs.count %> -
    • -
      - <%= @campaign.faqs[i].question %> -

      <%= raw(@campaign.faqs[i].answer.gsub("\n", '
      ')) %>

      -
      -
    • - <% end %> -
    +
    +
    +
      + <% for i in 0...(@campaign.faqs.count/2.0).ceil %> +
    • +
      + <%= @campaign.faqs[i].question %> +

      <%= raw(@campaign.faqs[i].answer.gsub("\n", '
      ')) %>

      +
      +
    • + <% end %> +
    +
    +
    +
      + <% for i in (@campaign.faqs.count/2.0).ceil...@campaign.faqs.count %> +
    • +
      + <%= @campaign.faqs[i].question %> +

      <%= raw(@campaign.faqs[i].answer.gsub("\n", '
      ')) %>

      +
      +
    • + <% end %> +
    +
    +
    <% end %> diff --git a/app/views/theme/views/homepage.html.erb b/app/views/theme/views/homepage.html.erb index e7a4b8c1..8e2a3d34 100644 --- a/app/views/theme/views/homepage.html.erb +++ b/app/views/theme/views/homepage.html.erb @@ -6,10 +6,12 @@
    +
    <% if @campaigns.count > 0 %> <% @campaigns.each do |campaign| %> <% if campaign.published_flag %> +
    <% if campaign.media_type == 'video' && !campaign.video_embed_id.blank?%> @@ -35,15 +37,15 @@

    <% if campaign.raised_amount.to_f/100 < campaign.goal_dollars.to_f %> -
    -
    +
    +
    <% else %> -
    <% end %> <% else %> From 032c8ace831589e8e51c653810e6ca6b11f539c6 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Tue, 7 Jan 2014 15:03:37 -0800 Subject: [PATCH 23/28] Added max-width:100% height:auto responsive fix for reward images --- app/views/theme/assets/stylesheets/campaign.css.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/theme/assets/stylesheets/campaign.css.scss b/app/views/theme/assets/stylesheets/campaign.css.scss index 5477f076..5f8a3b43 100644 --- a/app/views/theme/assets/stylesheets/campaign.css.scss +++ b/app/views/theme/assets/stylesheets/campaign.css.scss @@ -226,6 +226,10 @@ } &.image { margin-bottom: 12px; + img { + max-width: 100%; + height: auto; + } } &.description { margin-bottom: 12px; From 8b75f27094c087f9395252a95cd833205f4a5bad Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sun, 19 Jan 2014 15:21:22 -0800 Subject: [PATCH 24/28] Removes merge conflict missed in previous commit --- app/controllers/admin/campaigns_controller.rb | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/app/controllers/admin/campaigns_controller.rb b/app/controllers/admin/campaigns_controller.rb index 41f1292c..16c2dddc 100644 --- a/app/controllers/admin/campaigns_controller.rb +++ b/app/controllers/admin/campaigns_controller.rb @@ -61,15 +61,7 @@ def create # Check if the new settings pass validations...if not, re-render form and display errors in flash msg if !@campaign.valid? -<<<<<<< HEAD - message = '' - @campaign.errors.each do |key, error| - message = message + key.to_s.humanize + ' ' + error.to_s + ', ' - end - flash.now[:danger] = message[0...-2] -======= flash.now[:danger] = @campaign.errors.full_messages.join(', ') ->>>>>>> backup render action: "new" return end @@ -128,15 +120,7 @@ def create # Check again for campaign validity now that we've added faqs and rewards if !@campaign.valid? -<<<<<<< HEAD - message = '' - @campaign.errors.each do |key, error| - message = message + key.to_s.humanize + ' ' + error.to_s + ', ' - end - flash.now[:danger] = message[0...-2] -======= flash.now[:danger] = @campaign.errors.full_messages.join(', ') ->>>>>>> backup render action: "new" return end @@ -223,15 +207,7 @@ def update # Check if the new settings pass validations...if not, re-render form and display errors in flash msg if !@campaign.valid? -<<<<<<< HEAD - message = '' - @campaign.errors.each do |key, error| - message = message + key.to_s.humanize + ' ' + error.to_s + ', ' - end - flash.now[:danger] = message[0...-2] -======= flash.now[:danger] = @campaign.errors.full_messages.join(', ') ->>>>>>> backup render action: "edit" return end @@ -307,10 +283,6 @@ def payments if payment @payments = [payment] else -<<<<<<< HEAD - @payments = @campaign.payments.order("created_at ASC") - flash.now[:danger] = "Contributor not found for " + params[:payment_id] -======= @payments = @campaign.payments_completed.order("created_at ASC") flash.now[:danger] = "Contributor not found for " + params[:payment_id] end @@ -319,7 +291,6 @@ def payments if @payments.blank? @payments = @campaign.payments_completed.order("created_at ASC") flash.now[:danger] = "Contributor not found for " + params[:email] ->>>>>>> backup end else @payments = @campaign.payments_completed.order("created_at ASC") From e601a46b8606611ce2ec2773eb248a12b28630d8 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sun, 26 Jan 2014 15:23:48 -0800 Subject: [PATCH 25/28] Closed class on input-group-addon for rewards in admin.js.coffee, was causing reward min-contribution to not display. --- app/assets/javascripts/admin.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/admin.js.coffee b/app/assets/javascripts/admin.js.coffee index 36c6c4f3..e259c685 100644 --- a/app/assets/javascripts/admin.js.coffee +++ b/app/assets/javascripts/admin.js.coffee @@ -89,7 +89,7 @@ Crowdhoster.admin = $('#reward-add').on 'click', (e) -> e.preventDefault() - $('#rewards ul').append('
  • RewardNumber ClaimedDelete?




    0
  • ') + $('#rewards ul').append('
  • RewardNumber ClaimedDelete?
    $




    0
  • ') $('.faq.sortable').sortable stop: (e, ui) -> From f041995c330827c2835b73c484a6132f7792fc54 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sun, 26 Jan 2014 15:50:17 -0800 Subject: [PATCH 26/28] Another unclosed tag on Checkout_payment --- app/views/campaigns/checkout_payment.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/campaigns/checkout_payment.html.erb b/app/views/campaigns/checkout_payment.html.erb index dee8bdb8..4d48ff74 100644 --- a/app/views/campaigns/checkout_payment.html.erb +++ b/app/views/campaigns/checkout_payment.html.erb @@ -43,13 +43,13 @@
    - +
    -
    Address2 +
    +
    From 44cd0033b2aae14a3b3d54007ba14eec276e0268 Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sun, 26 Jan 2014 16:20:47 -0800 Subject: [PATCH 27/28] Rebundling gems after changes. --- Gemfile.lock | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9f3edc7b..a2c20006 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,9 +52,6 @@ GEM bcrypt-ruby (3.0.1) bootstrap-sass (3.0.2.1) sass (~> 3.2) - bourbon (3.1.8) - sass (>= 3.2.0) - thor builder (3.0.4) capybara (2.1.0) mime-types (>= 1.16) @@ -246,7 +243,6 @@ DEPENDENCIES asset_sync aws-sdk bootstrap-sass (~> 3.0.2.0) - bourbon capybara ckeditor coffee-rails (~> 3.2.1) From ef4d30c5de7c43d2e8b9cc4d0add54024adfa19c Mon Sep 17 00:00:00 2001 From: Andy Eblin Date: Sun, 26 Jan 2014 16:34:44 -0800 Subject: [PATCH 28/28] Cleans up leftover merge error on admin.css.scss --- app/assets/stylesheets/admin.css.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss index cae72c01..bcdda3d5 100644 --- a/app/assets/stylesheets/admin.css.scss +++ b/app/assets/stylesheets/admin.css.scss @@ -257,4 +257,3 @@ color: white; text-shadow: none; } ->>>>>>> 98752a34f1ba1d51c959745045c8d6eccd2a814b