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' %>
<%= flash_display 'flash' %> <%= yield %>
- <%= render :partial => 'fragments/bottom' %> + <%= render 'shared/bottom' %>
diff --git a/app/views/layouts/errors.html.erb b/app/views/layouts/errors.html.erb index f0dbabe..1305fc2 100644 --- a/app/views/layouts/errors.html.erb +++ b/app/views/layouts/errors.html.erb @@ -12,14 +12,14 @@ <%= csrf_meta_tag %> - <%= render :partial => 'fragments/top' %> + <%= render 'shared/top' %>
<%= flash_display 'flash' %> <%= yield %>
- <%= render :partial => 'fragments/bottom' %> + <%= render 'shared/bottom' %>
diff --git a/app/views/layouts/home.html.erb b/app/views/layouts/home.html.erb new file mode 100644 index 0000000..6fd86c5 --- /dev/null +++ b/app/views/layouts/home.html.erb @@ -0,0 +1,15 @@ +<%= render 'shared/public_top' %> + + + <%= render 'shared/navigation' %> + +
+ <%= flash_display 'flash' %> + <%= yield %> +
+
+ <%= render 'shared/bottom' %> +
+ + + diff --git a/app/views/layouts/public.html.erb b/app/views/layouts/public.html.erb index bcb2643..6d45f90 100644 --- a/app/views/layouts/public.html.erb +++ b/app/views/layouts/public.html.erb @@ -1,29 +1,14 @@ - - - - - - - - <%= content_for?(:title) ? yield(:title) : "EntryDNS free DNS service and dynamic DNS" %> +<%= render 'shared/public_top' %> - " /> - " /> - - - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tag %> - - <%= render :partial => 'fragments/navigation' %> + <%= render 'shared/navigation' %>
<%= flash_display 'flash' %> <%= yield %>
- <%= render :partial => 'fragments/bottom' %> + <%= render 'shared/bottom' %>
diff --git a/app/views/pages/about.html.erb b/app/views/pages/about.html.erb index e3f9dc8..e57ab8f 100644 --- a/app/views/pages/about.html.erb +++ b/app/views/pages/about.html.erb @@ -20,7 +20,7 @@

How can you benefit from this

-<%= render 'pages/fragments/benefits' %> +<%= render 'pages/shared/benefits' %>

We are open to new ideas or suggestions how to make the service better for you to use. diff --git a/app/views/pages/home.html.erb b/app/views/pages/home.html.erb index d0363a8..62e889d 100644 --- a/app/views/pages/home.html.erb +++ b/app/views/pages/home.html.erb @@ -1,55 +1,73 @@ -

+
+
+