Browse Source

debug login page

Skylsmoi 7 years ago
parent
commit
3453e10ab9

+ 7 - 2
src/component/Login/LoginLogo.jsx View File

3
 
3
 
4
 const Logo = props => {
4
 const Logo = props => {
5
   return (
5
   return (
6
-    <div className='loginpage__content__logo'>
6
+    <div className={props.customClass}>
7
       <img src={props.logoSrc} />
7
       <img src={props.logoSrc} />
8
     </div>
8
     </div>
9
   )
9
   )
11
 export default Logo
11
 export default Logo
12
 
12
 
13
 Logo.PropTypes = {
13
 Logo.PropTypes = {
14
-  logoSrc: PropTypes.string.isRequired
14
+  logoSrc: PropTypes.string.isRequired,
15
+  customClass: PropTypes.string
16
+}
17
+
18
+Logo.defaultProps = {
19
+  customClass: ''
15
 }
20
 }

+ 8 - 2
src/component/common/Card/Card.jsx View File

1
 import React from 'react'
1
 import React from 'react'
2
 import PropTypes from 'prop-types'
2
 import PropTypes from 'prop-types'
3
+import classnames from 'classnames'
3
 
4
 
4
 const Card = props => {
5
 const Card = props => {
5
   return (
6
   return (
6
-    <div className='loginpage__content__connection card'>
7
+    <div className={classnames(props.customClass, 'card')}>
7
       {props.children}
8
       {props.children}
8
     </div>
9
     </div>
9
   )
10
   )
11
 export default Card
12
 export default Card
12
 
13
 
13
 Card.PropTypes = {
14
 Card.PropTypes = {
14
-  children: PropTypes.element.isRequired
15
+  children: PropTypes.element.isRequired,
16
+  customClass: PropTypes.string
17
+}
18
+
19
+Card.defaultProps = {
20
+  customClass: ''
15
 }
21
 }

+ 7 - 9
src/container/Login.jsx View File

38
     //   </div>
38
     //   </div>
39
     // )
39
     // )
40
     const LoginWrapper = props => (
40
     const LoginWrapper = props => (
41
-      <div className='loginpage'>
42
-        <section className='loginpage__content'>
43
-          <div className='container-fluid'>
44
-            {props.children}
45
-          </div>
46
-        </section>
47
-      </div>
41
+      <section className='loginpage'>
42
+        <div className='container-fluid'>
43
+          {props.children}
44
+        </div>
45
+      </section>
48
     )
46
     )
49
     const LoginCardWrapper = props => (
47
     const LoginCardWrapper = props => (
50
       <div className='row justify-content-center'>
48
       <div className='row justify-content-center'>
65
     )
63
     )
66
     return (
64
     return (
67
       <LoginWrapper>
65
       <LoginWrapper>
68
-        <LoginLogo logoSrc={LoginLogoImg} />
66
+        <LoginLogo customClass='loginpage__logo' logoSrc={LoginLogoImg} />
69
 
67
 
70
         <LoginCardWrapper>
68
         <LoginCardWrapper>
71
-          <Card customClass='loginpage__content__connection'>
69
+          <Card customClass='loginpage__connection'>
72
             <CardHeader customClass='connection__header text-center'>{'Connexion'}</CardHeader>
70
             <CardHeader customClass='connection__header text-center'>{'Connexion'}</CardHeader>
73
 
71
 
74
             <CardBody formClass='connection__form'>
72
             <CardBody formClass='connection__form'>

+ 0 - 1
src/css/Header.styl View File

23
     &__rightside
23
     &__rightside
24
       display flex
24
       display flex
25
       margin-top 15px
25
       margin-top 15px
26
-      width 100%
27
       list-style none
26
       list-style none
28
       &__itemsearch
27
       &__itemsearch
29
         margin-right 8%
28
         margin-right 8%

+ 63 - 66
src/css/Login.styl View File

1
 .loginpage
1
 .loginpage
2
-  &__content
3
-    position relative
4
-    padding-top 85px // 85 = header height
5
-    min-height 100%
6
-    background dark-blue url('../img/tracimLogoAsBg.png') no-repeat 25% 3px
7
-    background-size contain
8
-    display table
9
-    width 100%
10
-    &__logo
11
-      margin 0 auto
12
-      padding 35px 0
13
-      width 170px
14
-    &__connection
2
+  padding-top 85px // 85 = header height
3
+  min-height calc(100% - 50px)
4
+  background dark-blue url('../img/tracimLogoAsBg.png') no-repeat 25% 3px
5
+  background-size contain
6
+  width 100%
7
+  &__logo
8
+    margin 0 auto
9
+    padding 50px 0
10
+    width 170px
11
+  &__connection
12
+    border none
13
+    box-shadow shadow-right
14
+    margin-bottom 50px
15
+    .connection__header
16
+      background-color blue
17
+      color #FFF
18
+      font-size 25px
19
+  .connection__form
20
+    width 70%
21
+    margin 0 auto
22
+    &__rememberme
23
+      &__label
24
+        font-size 13px
25
+    &__groupemail
26
+      position relative
27
+      &__icon
28
+        position absolute
29
+        top 6px
30
+        left 10px
31
+        width 20px
32
+      &__input
33
+        padding-left 45px
34
+    &__groupepw
35
+      position relative
36
+      &__icon
37
+        font-size 20px
38
+        width 20px
39
+        position absolute
40
+        top 5px
41
+        left 8px
42
+      &__input
43
+        padding-left 45px
44
+    &__btnsubmit
45
+      width 150px
46
+      background-color green
15
       border none
47
       border none
16
-      box-shadow shadow-right
17
-      margin-bottom 50px
18
-      .connection__header
19
-        background-color blue
20
-        color #FFF
21
-        font-size 25px
22
-    .connection__form
23
-      width 70%
48
+      cursor pointer
49
+      display block
24
       margin 0 auto
50
       margin 0 auto
25
-      &__rememberme
26
-        &__label
27
-          font-size 13px
28
-      &__groupemail
29
-        position relative
30
-        &__icon
31
-          position absolute
32
-          top 6px
33
-          left 10px
34
-          width 20px
35
-        &__input
36
-          padding-left 45px
37
-      &__groupepw
38
-        position relative
39
-        &__icon
40
-          font-size 20px
41
-          width 20px
42
-          position absolute
43
-          top 5px
44
-          left 8px
45
-        &__input
46
-          padding-left 45px
47
-      &__btnsubmit
48
-        width 150px
49
-        background-color green
50
-        border none
51
-        cursor pointer
52
-        display block
53
-        margin 0 auto
54
-        &:hover
55
-          background-color dark-green
56
-        &:focus
57
-          box-shadow shadow-all-side-green
58
-      &__pwforgot
59
-        cursor pointer
60
-        font-size 13px
61
-        margin-top 3px
62
-        &:hover::after
63
-          content ' '
64
-          position absolute
65
-          top 20px
66
-          right 15px
67
-          width 130px
68
-          padding-bottom 2px
69
-          border-bottom 1px solid dark-grey
51
+      &:hover
52
+        background-color dark-green
53
+      &:focus
54
+        box-shadow shadow-all-side-green
55
+    &__pwforgot
56
+      cursor pointer
57
+      font-size 13px
58
+      margin-top 3px
59
+      &:hover::after
60
+        content ' '
61
+        position absolute
62
+        top 20px
63
+        right 15px
64
+        width 130px
65
+        padding-bottom 2px
66
+        border-bottom 1px solid dark-grey
70
 
67
 
71
 @media (min-width: min-lg) and (max-width: max-lg)
68
 @media (min-width: min-lg) and (max-width: max-lg)
72
   .loginpage__content
69
   .loginpage__content