From 336e6120a689c0b864a868dc70f95e4c6ffe1aa0 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Tue, 4 Apr 2017 14:37:16 +0200 Subject: [PATCH] Add the new header --- app/assets/images/header/logo-tps.svg | 1 + app/assets/stylesheets/_constants.scss | 2 + app/assets/stylesheets/header.scss | 53 +++++++++++++++++++++ app/views/layouts/_new_header.haml | 7 +++ app/views/layouts/new_application.html.haml | 1 + 5 files changed, 64 insertions(+) create mode 100644 app/assets/images/header/logo-tps.svg create mode 100644 app/assets/stylesheets/header.scss create mode 100644 app/views/layouts/_new_header.haml diff --git a/app/assets/images/header/logo-tps.svg b/app/assets/images/header/logo-tps.svg new file mode 100644 index 000000000..fe6557db5 --- /dev/null +++ b/app/assets/images/header/logo-tps.svg @@ -0,0 +1 @@ +C03A1FFC-B3DD-48D2-8111-A47EEA63E68F \ No newline at end of file diff --git a/app/assets/stylesheets/_constants.scss b/app/assets/stylesheets/_constants.scss index 119b9eaea..1208ef340 100644 --- a/app/assets/stylesheets/_constants.scss +++ b/app/assets/stylesheets/_constants.scss @@ -3,3 +3,5 @@ $light-blue: #F2F6FA; // Bootstrap constants $font-size-base: 16px; + +$page-width: 1040px; diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss new file mode 100644 index 000000000..fdc9e81c8 --- /dev/null +++ b/app/assets/stylesheets/header.scss @@ -0,0 +1,53 @@ +@import "constants"; +@import "colors"; +@import "mixins"; +@import "typography"; + +// FIXME: Rename when the header is generalized +.new-header { + @extend %new-type; + height: 72px; + background-color: #FFFFFF; + // FIXME: Delete when the header is generalized + margin-top: -60px; +} + +.header-inner-content { + width: $page-width; + margin: 0 auto; +} + +.header-logo { + margin-top: 17px; +} + +$header-login-button-height: 36px; +$header-login-button-border-size: 1px; + +.header-login-button { + @include horizontal-padding(16px); + + display: inline-block; + height: $header-login-button-height; + line-height: $header-login-button-height - (2 * $header-login-button-border-size); + border-radius: $header-login-button-height; + border: $header-login-button-border-size solid $blue; + color: $blue; + font-size: 14px; + margin-top: 18px; + + &:hover { + color: #FFFFFF; + text-decoration: none; + background-color: $light-blue; + } + + &:focus { + color: $blue; + text-decoration: none; + } + + &:hover:focus { + color: #FFFFFF; + } +} diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml new file mode 100644 index 000000000..1f9049ce7 --- /dev/null +++ b/app/views/layouts/_new_header.haml @@ -0,0 +1,7 @@ +.new-header + .header-inner-content + %img{ src: image_url("header/logo-tps.svg"), class: "header-logo pull-left" } + + = link_to "Connexion", new_user_session_path, :class => "header-login-button pull-right" + + .clear-fix diff --git a/app/views/layouts/new_application.html.haml b/app/views/layouts/new_application.html.haml index 4241c648d..0dbeee052 100644 --- a/app/views/layouts/new_application.html.haml +++ b/app/views/layouts/new_application.html.haml @@ -21,6 +21,7 @@ - else Env Test + = render partial: "layouts/new_header" = render partial: "layouts/flash_messages" = yield