Active landing page

This commit is contained in:
Xavier J 2016-02-01 17:16:00 +01:00
parent 1dd7288c70
commit 7a61786814
10 changed files with 87 additions and 63 deletions

View file

@ -27,12 +27,3 @@
//= require smart_listing //= require smart_listing
//= require turf //= require turf
//= require franceconnect //= require franceconnect
$(document).ready(function() {
$('.js-scrollTo').on('click', function() { // Au clic sur un élément
var page = $(this).attr('cible'); // Page cible
var speed = 600; // Durée de l'animation (en ms)
$('html, body').animate( { scrollTop: $(page).offset().top-100 }, speed ); // Go
return false;
});
});

View file

@ -23,21 +23,27 @@
@import "bootstrap"; @import "bootstrap";
body { body {
background-color: rgb(255, 255, 255) background-color: rgb(255, 255, 255);
} }
html, body { html, body {
height: 100%; height: 100%;
} }
body {
padding-top: 50px;
}
#wrap { #wrap {
min-height: 100%; min-height: 100%;
margin-bottom: -50px; margin-bottom: -50px;
} }
#wrap:after { #wrap:after {
content: ""; content: "";
display: block; display: block;
} }
#footer, #wrap:after { #footer, #wrap:after {
height: 40px; height: 40px;
} }
@ -46,6 +52,11 @@ html, body {
background-color: rgb(240, 240, 240) background-color: rgb(240, 240, 240)
} }
.main_div {
margin-left: 10rem;
margin-right: 10rem;
}
.logo { .logo {
margin-left: 10px; margin-left: 10px;
padding-top: 5px; padding-top: 5px;
@ -85,14 +96,26 @@ html, body {
margin-right: 105px; margin-right: 105px;
} }
.alert.alert-success,
.alert.alert-danger { #header {
margin-top: -20px top: 0;
left: -3px;
position: fixed;
width: 100%;
z-index: 10;
} }
.navbar { .navbar {
height: 35px; height: 35px;
background-color: rgb(235, 235, 235) background-color: rgba(235, 235, 235, 0.95);
.sign_in_FC {
margin-top: -18px;
height: 70px;
}
} }
.btn { .btn {
@ -161,6 +184,7 @@ div.pagination {
height: 52px; height: 52px;
width: 100%; width: 100%;
margin-top: 0px; margin-top: 0px;
z-index: 10;
} }
@ -212,7 +236,6 @@ div.pagination {
margin-top: -4px; margin-top: -4px;
} }
#fconnect-access { #fconnect-access {
right: 50px; right: 50px;
} }

View file

@ -1,15 +1,13 @@
#wrap {
}
.max-size { .max-size {
margin-left: -13%; margin-left: -10rem;
margin-right: -13%; margin-right: -10rem;
} }
#landing { #landing {
margin-top: -20px;
background-image: image-url('landing_background.jpg'); background-image: image-url('landing_background.jpg');
background-attachment: fixed;
background-position: top left;
background-repeat: no-repeat; background-repeat: no-repeat;
#title { #title {
@ -20,30 +18,34 @@
font-size: 35px; font-size: 35px;
} }
.btn {
text-shadow: none;
}
.btn-lg {
font-size: 20px;
padding: 12px 18px;
}
color: white; color: white;
padding-top: 6%; padding-top: 6%;
padding-bottom: 9%; padding-bottom: 7%;
text-shadow: 3px 3px 4px rgba(0, 0, 0, .6); text-shadow: 3px 3px 4px rgba(0, 0, 0, .6);
} }
.logo img { .logo img {
width: 70px; width: 70px;
} }
#buttons {
margin-top: 5%;
button {
margin-left: 30px;
margin-right: 30px;
}
}
} }
#suite { #suite {
.row{
width: 100%;
margin-left: 0;
margin-right: 0;
}
.word { .word {
border-bottom: solid darkgrey 1px; border-bottom: solid darkgrey 1px;
//height: 300px;
img { img {
padding-top: 50px; padding-top: 50px;
@ -57,18 +59,22 @@
img { img {
width: 300px; width: 300px;
} }
ul {
margin-top: 11%;
}
} }
.echanger { .echanger {
ul { ul {
margin-top: 6%; margin-top: 4%;
} }
} }
.profiter { .profiter {
border-bottom: none; border-bottom: none;
ul { ul {
margin-top: 9%; margin-top: 11%;
} }
} }
} }

View file

@ -1,13 +1,11 @@
.dynamic_ul { .dynamic_ul {
list-style-type: none;
margin-left: 20px; margin-left: 20px;
margin-top: 13%; margin-top: 13%;
li { li {
font: 200 20px/1.5 Helvetica, Verdana, sans-serif; font: 200 20px/1.5 Helvetica, Verdana, sans-serif;
border-bottom: 1px solid #ccc; margin-top: 15px;
margin-top: 9px; margin-bottom: 15px;
margin-bottom: 9px;
} }
li:last-child { li:last-child {

View file

@ -11,7 +11,7 @@ class RootController < ApplicationController
redirect_to admin_procedures_path redirect_to admin_procedures_path
else else
redirect_to new_user_session_path render 'landing'
end end
end end
end end

View file

@ -9,10 +9,11 @@
= javascript_include_tag 'application', 'data-turbolinks-track' => true = javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags = csrf_meta_tags
%body %body
#beta
Beta
%div#wrap %div#wrap
%div.navbar %div#header.navbar
#beta
Beta
= image_tag('marianne_small.png', class: 'logo') = image_tag('marianne_small.png', class: 'logo')
%a{href: '/'} %a{href: '/'}
= image_tag('logo-tps.png', class: 'logo') = image_tag('logo-tps.png', class: 'logo')
@ -38,6 +39,9 @@
= current_user.email = current_user.email
= link_to "Déconnexion", '/users/sign_out', method: :delete, :class => 'btn btn-md' = link_to "Déconnexion", '/users/sign_out', method: :delete, :class => 'btn btn-md'
-#- else
-# = link_to "Se connecter", '/users/sign_in', method: :get, :class => 'btn btn-md'
-# = link_to "S'inscrire", '/users/sign_up', method: :get, :class => 'btn btn-md'
#flash_message.center #flash_message.center
- if flash.notice - if flash.notice
@ -47,7 +51,7 @@
.alert.alert-danger .alert.alert-danger
= flash.alert = flash.alert
%div{:style => 'margin-left:10%; margin-right:10%;'} %div.main_div
= yield = yield
%br %br
@ -60,7 +64,7 @@
=link_to 'SGMAP', "http://etatplateforme.modernisation.gouv.fr" =link_to 'SGMAP', "http://etatplateforme.modernisation.gouv.fr"
2016. All Rights Reserved 2016 - Tous droits réservés
=link_to 'contact@tps.apientreprise.fr', "mailto:contact@tps.apientreprise.fr" =link_to 'contact@tps.apientreprise.fr', "mailto:contact@tps.apientreprise.fr"

View file

@ -7,19 +7,15 @@
%br %br
%h3.center %h3.center
Simplifié toutes vos démarches pour les rendre 100% en ligne. Simplifiez toutes vos démarches pour les rendre 100% en ligne.
#buttons.center %br
%button.js-scrollTo.btn.btn-lg.btn-default{cible: '.simplifier'} %br
Simplifier
%button.js-scrollTo.btn.btn-lg.btn-default{cible: '.securiser'} .center
Sécuriser =mail_to "contact@tps.apientreprise.fr", 'Ouvrir un compte TPS',{ subject: 'Ouvrir un compte TPS',
%button.js-scrollTo.btn.btn-lg.btn-default{cible: '.echanger'} body: 'Bonjour, je souhaiterais ouvrir un compte TPS. Merci de me recontacter par email ou par téléphone au _____.',
Échanger class: 'btn btn-lg btn-default' }
%button.js-scrollTo.btn.btn-lg.btn-default{cible: '.faciliter'}
Faciliter
%button.js-scrollTo.btn.btn-lg.btn-default{cible: '.profiter'}
Profiter
#suite.max-size #suite.max-size
.row.word.simplifier .row.word.simplifier
@ -32,7 +28,7 @@
%li %li
%a Ne demander que les informations strictement nécessaires %a Ne demander que les informations strictement nécessaires
%li %li
%a Gérer les procédures, publication, suspension, en un clic. %a Gérer les procédures, publication, suspension, en un clic
.row.word.securiser .row.word.securiser
.col-md-6.col-lg-6 .col-md-6.col-lg-6
@ -61,10 +57,10 @@
.row.word.faciliter .row.word.faciliter
.col-md-6.col-lg-6 .col-md-6.col-lg-6
%ul.dynamic_ul %ul.dynamic_ul
%li
Construire la démarche en plusieurs fois
%li %li
Gagner du temps sur linstruction Gagner du temps sur linstruction
%li
Profiter des ressources cartographiques directement mobilisées, si nécessaire
.col-md-6.col-lg-6 .col-md-6.col-lg-6
= image_tag image_url('keywords/faciliter.png') = image_tag image_url('keywords/faciliter.png')
@ -77,4 +73,4 @@
%li %li
Récupérer des informations officielles collectées directement auprès des administrations Récupérer des informations officielles collectées directement auprès des administrations
%li %li
Profiter des ressources cartographiques directement mobilisées, si nécessaire Construire la démarche en plusieurs fois

View file

@ -29,6 +29,12 @@ describe RootController, type: :controller do
end end
context 'when nobody is connected' do context 'when nobody is connected' do
it { expect(subject).to redirect_to(new_user_session_path) } render_views
before do
subject
end
it { expect(response.body).to have_css('#landing') }
end end
end end

View file

@ -32,7 +32,7 @@ feature 'Administrator connection' do
page.find_by_id('admin_sign_out').click page.find_by_id('admin_sign_out').click
end end
scenario 'admin is redireted to home page' do scenario 'admin is redireted to home page' do
expect(page).to have_css('#login_user') expect(page).to have_css('#landing')
end end
end end
context 'when clicking on profile' do context 'when clicking on profile' do

View file

@ -9,7 +9,7 @@ feature 'user access to the list of his dossier' do
before do before do
last_updated_dossier.update_attributes(nom_projet: 'salut la compagnie') last_updated_dossier.update_attributes(nom_projet: 'salut la compagnie')
visit root_path visit new_user_session_path
within('#new_user') do within('#new_user') do
page.find_by_id('user_email').set user.email page.find_by_id('user_email').set user.email
page.find_by_id('user_password').set user.password page.find_by_id('user_password').set user.password