From e9b6cd627adf18744879451b06aca43903a203d2 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 5 Mar 2015 12:52:27 +0100 Subject: [PATCH] better signup flow from the homepage --- .../theme1/elements/_header.css.sass | 54 ++++++++++++------- app/views/theme1/_header.html.slim | 1 + app/views/theme1/_social.html.slim | 9 ++-- config/routes.rb | 2 +- 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/app/assets/stylesheets/theme1/elements/_header.css.sass b/app/assets/stylesheets/theme1/elements/_header.css.sass index d4666a67..81c0d7c0 100644 --- a/app/assets/stylesheets/theme1/elements/_header.css.sass +++ b/app/assets/stylesheets/theme1/elements/_header.css.sass @@ -52,25 +52,43 @@ margin-bottom: 10px #logo max-width: 80% + float: left a margin: 20px + .signup-button + +button + margin-left: 40px + margin-top: 16px #header-right padding-right: 30px - .social - float: right - width: 222px - text-align: right - a - background-image: image-url('theme1/social.png') - margin: 0 0 0 3px - width: 32px - height: 56px - display: inline-block - &.wsite-social-facebook - background-position: 0 0 - &.wsite-social-twitter - background-position: -35px 0 - &.wsite-social-linkedin - background-position: -70px 0 - &.wsite-social-rss - background-position: -141px 0 + float: right + width: 222px + text-align: right + .social-link + background-image: image-url('theme1/social.png') + margin: 0 0 0 3px + width: 32px + height: 56px + display: inline-block + &.facebook + background-position: 0 0 + &.twitter + background-position: -35px 0 + &.linkedin + background-position: -70px 0 + &.rss + background-position: -141px 0 + .theme-button + margin-top: 11px + margin-bottom: 14px + vertical-align: top + display: inline-block + margin-right: 8px + .locale-link + display: inline-block + vertical-align: top + line-height: 56px + color: white + margin-right: 8px + &.active + color: $primary-color diff --git a/app/views/theme1/_header.html.slim b/app/views/theme1/_header.html.slim index 821c96fd..1303f623 100644 --- a/app/views/theme1/_header.html.slim +++ b/app/views/theme1/_header.html.slim @@ -10,6 +10,7 @@ #header #header-right= render 'theme1/social' #logo= link_to image_tag('icons/logo-text.png', alt: application_title), root_path + = link_to t('devise.registrations.link'), new_suppliers_path, class: 'signup-button' #nav-wrap .navbar .navbar-inner= render 'theme1/navigation' diff --git a/app/views/theme1/_social.html.slim b/app/views/theme1/_social.html.slim index 0e285fdc..31b14bef 100644 --- a/app/views/theme1/_social.html.slim +++ b/app/views/theme1/_social.html.slim @@ -1,11 +1,10 @@ -.social - a.wsite-social-facebook href="https://www.facebook.com/mozo.bar" target=:_blank - span.wsite-social-inner += link_to t('devise.sign_in.link'), new_employee_session_path, class: 'theme-button' +- Rails.configuration.i18n.available_locales.each do |locale| + = link_to locale, go_to_locale_path(locale), class: ['locale-link', I18n.locale == locale ? 'active' : nil] +a.social-link.facebook href="https://www.facebook.com/mozo.bar" target=:_blank /a.wsite-social-twitter href="https://twitter.com/mozo.bar" target=:_blank span.wsite-social-inner /a.wsite-social-linkedin href="http://www.linkedin.com/company/2801351" target=:_blank span.wsite-social-inner /a.wsite-social-rss span.wsite-social-inner -.pull-right - = link_to t('devise.registrations.link'), new_suppliers_path, class: 'theme-button' diff --git a/config/routes.rb b/config/routes.rb index 9708b1d7..21d1189d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -178,7 +178,7 @@ Qwaiter::Application.routes.draw do mount Cmtool::Engine => '/cmtool' # /nl is not matched to pages#home with locale => nl - get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES} + get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES}, as: :go_to_locale #devise_scope :supplier do #get '/:locale/suppliers/sign_up' => 'registrations#new', constraints: {locale: ALLOWED_LOCALES} #end