diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 597ca83..a69d574 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -18,8 +18,13 @@ $ -> $(document).popover(selector: '[rel=popover]') $(document).tooltip(selector: '[rel=tooltip]') - $('.pjax-nav a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]') - - $(document).on 'pjax:success', (event, data, status, xhr, options) -> - $('ul.pjax-nav').find('li.active').removeClass 'active' - $("ul.pjax-nav a[href=\"#{window.location.pathname}\"]").parents('li').addClass 'active' + pjaxContainer = '[data-pjax-container]' + $('.pjax-nav a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax(pjaxContainer) + $pjaxContainer = $(pjaxContainer) + $pjaxContainer.on 'pjax:success', (event, data, status, xhr, options) -> + $('.pjax-nav').find('li.active').removeClass 'active' + $(".pjax-nav a[href=\"#{window.location.pathname}\"]").parents('li').addClass 'active' + if $pjaxContainer.parent().hasClass('container') || $pjaxContainer.find('.container').length > 0 + $pjaxContainer.removeClass 'container' + else + $pjaxContainer.addClass 'container' diff --git a/app/assets/stylesheets/pages/home.css.scss b/app/assets/stylesheets/pages/home.css.scss index c304ad0..29f9ec2 100644 --- a/app/assets/stylesheets/pages/home.css.scss +++ b/app/assets/stylesheets/pages/home.css.scss @@ -14,13 +14,41 @@ font-weight: normal; } -.incentives-unit li, -.incentives-unit p -{ +.page-home-incentives li, +.page-home-incentives p { font-size: 14px; line-height: 20px; } -blockquote { - font-style: italic; -} \ No newline at end of file +.page-home-header { + background-color: #B9DCFF; + border-bottom: 1px solid darken(#B9DCFF, 10%); + .page-header { + small { + color: #3F3F39; + } + border-bottom: none; + padding-bottom: 0; + } +} + +.page-home-incentives { + border-top: 1px solid white; + background-color: #DAFFCD; + padding-top: 17px; + padding-bottom: 17px; + border-bottom: 1px solid darken(#DAFFCD, 10%); +} + +.page-home-quotes { + border-top: 1px solid white; + padding-top: 17px; + blockquote { + font-style: italic; + color: #555; + } +} + +.page-home-extra { + padding-top: 17px; +} diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 2f1625d..28a8f48 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -15,11 +15,17 @@ class PagesController < ApplicationController def show return redirect_to(domains_path) if user_signed_in? && params[:id] == "home" - if params[:id] == "contact" + + options = {template: current_page} + case params[:id] + when "contact" init = user_signed_in? ? {:name => current_user.name, :email => current_user.email} : {} @contact_form = ContactForm.new(init) + when "home" + options[:layout] = 'home' unless request.xhr? end - render :template => current_page + + render options end def contact diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ba9987c..a2544b5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -13,14 +13,14 @@ <%= csrf_meta_tag %>
- <%= render :partial => 'fragments/navigation' %> + <%= render 'shared/navigation' %>