ソースを参照

debug login page

Skylsmoi 6 年 前
コミット
3453e10ab9
共有5 個のファイルを変更した85 個の追加80 個の削除を含む
  1. 7 2
      src/component/Login/LoginLogo.jsx
  2. 8 2
      src/component/common/Card/Card.jsx
  3. 7 9
      src/container/Login.jsx
  4. 0 1
      src/css/Header.styl
  5. 63 66
      src/css/Login.styl

+ 7 - 2
src/component/Login/LoginLogo.jsx ファイルの表示

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
3 3
 
4 4
 const Logo = props => {
5 5
   return (
6
-    <div className='loginpage__content__logo'>
6
+    <div className={props.customClass}>
7 7
       <img src={props.logoSrc} />
8 8
     </div>
9 9
   )
@@ -11,5 +11,10 @@ const Logo = props => {
11 11
 export default Logo
12 12
 
13 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 ファイルの表示

@@ -1,9 +1,10 @@
1 1
 import React from 'react'
2 2
 import PropTypes from 'prop-types'
3
+import classnames from 'classnames'
3 4
 
4 5
 const Card = props => {
5 6
   return (
6
-    <div className='loginpage__content__connection card'>
7
+    <div className={classnames(props.customClass, 'card')}>
7 8
       {props.children}
8 9
     </div>
9 10
   )
@@ -11,5 +12,10 @@ const Card = props => {
11 12
 export default Card
12 13
 
13 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 ファイルの表示

@@ -38,13 +38,11 @@ class Login extends React.Component {
38 38
     //   </div>
39 39
     // )
40 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 47
     const LoginCardWrapper = props => (
50 48
       <div className='row justify-content-center'>
@@ -65,10 +63,10 @@ class Login extends React.Component {
65 63
     )
66 64
     return (
67 65
       <LoginWrapper>
68
-        <LoginLogo logoSrc={LoginLogoImg} />
66
+        <LoginLogo customClass='loginpage__logo' logoSrc={LoginLogoImg} />
69 67
 
70 68
         <LoginCardWrapper>
71
-          <Card customClass='loginpage__content__connection'>
69
+          <Card customClass='loginpage__connection'>
72 70
             <CardHeader customClass='connection__header text-center'>{'Connexion'}</CardHeader>
73 71
 
74 72
             <CardBody formClass='connection__form'>

+ 0 - 1
src/css/Header.styl ファイルの表示

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

+ 63 - 66
src/css/Login.styl ファイルの表示

@@ -1,72 +1,69 @@
1 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 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 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 68
 @media (min-width: min-lg) and (max-width: max-lg)
72 69
   .loginpage__content