NxTIC/css/timeline-form.scss

517 lines
9.1 KiB
SCSS
Raw Normal View History

@import 'constants';
/* [1] Formulaire de type timeline
=========================================================*/
#WRAPPER > #CONTAINER section[data-timeline]{
display: block;
position: relative;
background-color: #fff;
font-size: .9em;
color: #000;
/* (1) On ajoute le liseré à droite pour TOUS les éléments */
2016-04-22 09:48:25 +00:00
& h5,
& h4,
& h3,
& *.line{
display: block;
color: #333;
margin: 0 40px;
padding: 5px 60px;
2016-04-25 08:39:04 +00:00
border-left: 2px solid #d8e0e9;
}
/* (2) Titres de sections */
2016-04-22 09:48:25 +00:00
& h3{
display: block;
padding: 20px 40px;
font-size: 1.4em;
2016-04-25 08:39:04 +00:00
color: #000;
font-weight: bold;
2016-04-25 08:39:04 +00:00
// background-color: $timeline-color;
2016-04-22 08:27:58 +00:00
/* TODO: Transformer les background en ::before pour que ca soit juste un cercle avec bg et border*/
/* FIXME: Corriger le liseré pour les autres navigateurs que FF*/
2016-04-22 08:27:58 +00:00
/* Gestion du before (compteur css) //*/
2016-04-20 15:06:48 +00:00
&[data-n]:before{
content: attr(data-n);
display: inline-block;
position: absolute;
2016-04-25 08:54:10 +00:00
margin-top: .6em;
margin-left: -41px;
padding: 3px 12px;
border-radius: 50%;
2016-04-22 08:27:58 +00:00
/* Contour blanc*/
box-shadow: 0 0 0 3px #fff;
2016-04-22 08:27:58 +00:00
background-color: $timeline-color;
2016-04-20 15:06:48 +00:00
font-size: 1.3em;
color: #fff;
font-weight: bold;
2016-04-22 08:27:58 +00:00
/* On centre sur la ligne*/
@include transform( translateX(-50%) translateY(-50%) );
2016-04-20 15:06:48 +00:00
}
}
/* (3) Titres des sous-sections */
2016-04-22 09:48:25 +00:00
& h4{
display: block;
padding: 20px 40px;
font-size: 1.2em;
2016-04-22 08:27:58 +00:00
color: darken($timeline-color, 20);
font-weight: bold;
2016-04-22 08:27:58 +00:00
/* Gestion du before (compteur css) //*/
&[data-icon]:before{
content: attr(data-icon);
display: inline-block;
position: absolute;
2016-04-25 08:54:10 +00:00
margin-top: .9em;
margin-left: -41px;
2016-04-25 08:43:33 +00:00
padding: 9px;
border-radius: 50%;
2016-04-22 08:27:58 +00:00
/* Contour blanc*/
box-shadow: 0 0 0 2px #fff;
2016-04-22 08:27:58 +00:00
background-color: $timeline-color;
2016-04-25 08:43:33 +00:00
font-size: .9em;
font-family: 'icomoon';
color: #fff;
font-weight: bold;
2016-04-22 08:27:58 +00:00
/* On centre sur la ligne*/
@include transform( translateX(-50%) translateY(-50%) );
}
}
/* (4) Titres genre text message */
2016-04-22 09:48:25 +00:00
& h5{
display: block;
padding: 20px 40px;
font-size: 1.2em;
2016-04-22 08:27:58 +00:00
color: darken($timeline-color, 20);
font-weight: bold;
2016-04-22 08:27:58 +00:00
/* Gestion du before (compteur css) //*/
&:before{
content: '';
display: inline-block;
position: absolute;
margin-top: .7em;
margin-left: -41px;
padding: 7px;
border-radius: 50%;
2016-04-22 08:27:58 +00:00
/* Contour blanc*/
box-shadow: 0 0 0 2px #fff;
2016-04-22 08:27:58 +00:00
background-color: $timeline-color;
2016-04-22 08:27:58 +00:00
/* On centre sur la ligne*/
@include transform( translateX(-50%) translateY(-50%) );
}
2016-04-22 08:27:58 +00:00
/* Texte genre text message*/
&[data-text]:after{
content: attr(data-text);
padding: 6px 10px;
border-radius: 3px;
2016-04-25 08:39:04 +00:00
background: $timeline-color;
color: #fff;
font-weight: normal;
}
}
/* (5) 'Tags' -> textes sur le liseré gauche */
& [data-tag]{
display: block;
padding: 40px 60px;
&:before{
content: attr(data-tag);
display: inline-block;
position: absolute;
margin-top: .5em;
margin-left: -41px;
padding: 2px;
background-color: #fff;
font-size: 1.2em;
2016-04-22 08:27:58 +00:00
color: $timeline-color;
font-weight: bold;
2016-04-22 08:27:58 +00:00
/* On centre sur la ligne*/
@include transform( translateX(-50%) translateY(-50%) );
}
}
/* (6) Input d'upload de fichier (css hack) */
& input[type='file']{
position: relative;
opacity: 0;
z-index: 8;
cursor: pointer;
}
2016-04-22 08:27:58 +00:00
/* Contiendra l'input*/
& input[type='file'] + span.file-input{
display: inline-block;
position: absolute;
margin-top: -1px;
margin-left: -290px;
width: calc( 290px - 2*15px );
height: 30px;
padding: 0 15px;
border-radius: 3px;
2016-04-25 08:51:43 +00:00
background: $timeline-1;
2016-04-25 08:51:43 +00:00
color: #222;
line-height: 30px;
font-weight: normal;
z-index: 9;
cursor: pointer;
pointer-events: none;
2016-04-22 08:27:58 +00:00
/* Icone d'upload*/
&:before{
content: 'e ';
font-size: 1em;
font-family: 'icomoon';
2016-04-25 08:51:43 +00:00
color: #222;
font-weight: bold;
}
2016-04-22 08:27:58 +00:00
@include transition( background .1s ease-in-out );
}
2016-04-22 08:27:58 +00:00
/* Animation de hover*/
& input[type='file']:hover + span.file-input{
2016-04-25 08:51:43 +00:00
background: darken($timeline-1, 10);
box-shadow: inset 0 0 5px #888;
}
2016-04-22 08:27:58 +00:00
/* Animation de .active*/
& input[type='file'].active + span.file-input{
2016-04-22 08:27:58 +00:00
background: $timeline-color;
color: #fff;
2016-04-22 09:48:25 +00:00
// On change l'icône
&:before{
content: 'v ';
color: #fff;
}
}
/* (7) Inputs de type text */
2016-04-22 08:27:58 +00:00
& input[type='text'],
& input[type='password'],
& input[type='number'],
& input[type='button'],
& input[type='submit'],
& input[type='mail']{
display: inline;
width: auto;
margin: unset;
padding: 5px 10px;
margin-bottom: 5px;
margin-right: 15px;
border-radius: 0;
2016-04-22 09:48:25 +00:00
border: 0;
border-bottom: 1px solid #555;
font-size: .8em;
font-weight: normal;
color: #333;
@include transition( border .2s ease-in-out, background .2s ease-in-out, color .2s ease-in-out );
2016-04-22 08:27:58 +00:00
/* Animation de @focus*/
&:focus{
2016-04-25 08:51:43 +00:00
border-color: $timeline-2;
}
}
// Boutons
& input[type='submit']{
border-color: darken($timeline-2, 20);
background: $timeline-2;
color: #fff;
// Animation de @hover pour les boutons
&:hover,
&:focus{
background: darken($timeline-2, 5);
}
}
& label{
color: #555;
}
/* (8) Gestion des espacements */
& [data-space]{
2016-04-22 09:48:25 +00:00
@extend *.line;
padding-top: 20px;
padding-bottom: 20px;
}
2016-04-22 08:27:58 +00:00
/* (10) Gestion des espacements verticaux */
2016-04-22 09:48:25 +00:00
& .spacetop{ margin-top: 20px !important; }
2016-04-22 08:27:58 +00:00
& .spacebtm{ margin-bottom: 20px !important; }
& .spaced{
@extend .spacetop;
@extend .spacebtm;
}
2016-04-22 09:48:25 +00:00
& .nobold,
& .nobold *{
2016-04-22 08:27:58 +00:00
font-weight: normal !important;
}
/* (11) Gestion des custom <select> */
& select{
width: auto;
display: inline-block;
background: transparent;
border: 0;
// Hides right arrow
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 1px;
text-overflow: '';
font-size: .9em;
& option:not(:disabled){
padding-left: 1.5em;
}
& option:disabled:not(:first-child){
font-size: 1.2em;
color: #000;
font-weight: bold;
}
& option.pad{
padding-left: 2.5em;
}
}
& .select-container select{
// width: auto;
display: inline-block;
padding: 2px;
2016-04-22 09:48:25 +00:00
padding-right: 30px;
2016-04-22 09:48:25 +00:00
border: none;
border-bottom: 1px solid #333;
2016-04-22 09:48:25 +00:00
background: #fff url('/f/svg/bottom_arrow/st/container/333333') right 10px center no-repeat;
background-size: 10px auto;
overflow: hidden;
2016-04-22 09:48:25 +00:00
// Animation de @focus
&:focus{
2016-04-25 08:51:43 +00:00
border-color: $timeline-2;
background-image:url('/f/svg/bottom_arrow/st/container/#{color-str($timeline-2)}');
2016-04-22 09:48:25 +00:00
}
}
2016-04-25 08:39:04 +00:00
/* (12) Gestion des coloris pour les titres */
& h5.color0,
& h4.color0,
& h3.color0{
color: $timeline-0;
&:before,&:after{
background-color: $timeline-0;
}
}
& h5.color1,
& h4.color1,
& h3.color1{
color: $timeline-1;
&:before,&:after{
background-color: $timeline-1;
}
}
& h5.color2,
& h4.color2,
& h3.color2{
color: $timeline-2;
&:before,&:after{
background-color: $timeline-2;
}
}
& h5.color3,
& h4.color3,
& h3.color3{
color: $timeline-3;
&:before,&:after{
background-color: $timeline-3;
}
}
& h5.color4,
& h4.color4,
& h3.color4{
color: $timeline-4;
&:before,&:after{
background-color: $timeline-4;
}
}
/* (13) Gestion de la navigation fléchée */
& .arrow-container{
& span{
display: inline-block;
position: relative;
margin: .3em 0;
padding: .5em .8em;
border: 1px solid darken(#d8e0e9, 10);
// Pas de rebord droite sauf si dernier
&:not(:last-child){
border-right: 0;
}
color: darken(#d8e0e9, 30);
cursor: pointer;
@include transition( .2s ease-in-out );
&:first-child{ border-radius: 5px 0 0 5px; }
&:last-child{ border-radius: 0 5px 5px 0; }
// Animation quand la page est validée
&.done{
font-weight: normal;
color: $timeline-2;
// Animation de hover
&:hover,
&.active{//:not(:first-child):not(:last-child)
border-color: $timeline-2;
background: $timeline-2;
color: #fff;
// font-weight: bold;
}
}
// Quand la page n'est pas validée
&:not(.done){
font-weight: bold;
color: #333;
// Animation de hover
&:hover,
&.active{//:not(:first-child):not(:last-child)
border-color: #aaa;
background: #aaa;
color: #fff;
// font-weight: bold;
}
}
}
}
/* (14) Gestion de l'affichage des MINI fiches et des FICHES relations */
& article > article{
display: none;
&.active{
display: block;
}
}
}