Bläddra i källkod

fixed display of timeline

Côme Huguiès 6 år sedan
förälder
incheckning
810515f79a

+ 3 - 0
src/component/PopinFixed/PopinFixed.styl Visa fil

@@ -65,6 +65,9 @@
65 65
           color blue
66 66
   &__content
67 67
     display flex
68
+    flex-flow row
69
+    // 209 = wsContentGeneric:top wsContentGeneric__header:height - wsContentGeneric__option:height
70
+    height calc(100% - 209px)
68 71
     &__left
69 72
       width 55%
70 73
     &__right

+ 1 - 1
src/component/PopinFixed/PopinFixedOption.jsx Visa fil

@@ -17,7 +17,7 @@ const PopinFixedOption = props => {
17 17
           <i className='fa fa-plus-circle' />
18 18
         </div>
19 19
 
20
-        <SelectStatus />
20
+        {/* <SelectStatus /> */}
21 21
 
22 22
         <div className='wsContentGeneric__option__menu__action'>
23 23
           <i className='fa fa-archive' />

+ 12 - 13
src/component/Timeline/Timeline.styl Visa fil

@@ -7,6 +7,7 @@
7 7
   border-radius 10px
8 8
   height 100%
9 9
   &__header
10
+    flex 0 1 auto
10 11
     border-radius 10px 10px 0 0
11 12
     padding 15px
12 13
     text-align center
@@ -14,7 +15,8 @@
14 15
     color darkGrey
15 16
     background-color grey-hover
16 17
   &__messagelist
17
-    flex 1 1 0
18
+    flex 1 1 auto
19
+    // flex 1 1 0
18 20
     margin-bottom 0
19 21
     padding-left 0
20 22
     border-bottom 1px solid grey
@@ -25,23 +27,23 @@
25 27
       padding 0 25px 20px 35px
26 28
       &__avatar
27 29
         position relative
28
-        top 43px
29
-        left -25px
30
+        top 40px
31
+        left -20px
30 32
         & > img
31 33
           width 45px
32 34
           height 45px
33 35
           border-radius 25px
34 36
       &__createhour
35
-        margin-left 30px
37
+        margin-left 35px
36 38
         opacity 0.7
37 39
         font-size 14px
38 40
       &__content
41
+        display inline-block
39 42
         border 1px solid grey
40 43
         border-radius 5px
41 44
         padding 15px
42 45
         background-color off-white
43 46
         font-size 15px
44
-        z-index -1
45 47
     &__version
46 48
       display flex
47 49
       justify-content space-between
@@ -64,6 +66,7 @@
64 66
         font-size 17px
65 67
         margin auto 0
66 68
   &__texteditor
69
+    flex 0 1 auto
67 70
     padding 2px
68 71
     &__simpletext
69 72
       display none
@@ -86,19 +89,15 @@
86 89
         &__icon
87 90
           margin-left 10px
88 91
 
89
-.sended
90
-  .timeline__messagelist__item__content
91
-    margin-right 25%
92
-
93 92
 .received
93
+  text-align right
94 94
   .timeline__messagelist__item
95 95
     &__avatar
96
-      left 93%
96
+      left 20px
97 97
     &__createhour
98
-      text-align right
99
-      margin-right 50px
98
+      margin-left 0
99
+      margin-right 35px
100 100
     &__content
101
-      margin-left 25%
102 101
       color white
103 102
 
104 103
 /**** MEDIA 992px & 1199px ****/

+ 34 - 7
src/component/Timeline/debugData.js Visa fil

@@ -7,10 +7,10 @@ export const TimelineDebugData = [{
7 7
     avatar: 'https://avatars3.githubusercontent.com/u/11177014?s=460&v=4'
8 8
   },
9 9
   createdAt: {
10
-    day: '27/11/17',
10
+    day: '28/11/17',
11 11
     hour: '11h45'
12 12
   },
13
-  text: 'Proident esse laboris in sed officia exercitation ut anim ea.'
13
+  text: "Ajout du paragraphe 3"
14 14
 }, {
15 15
   id: 1,
16 16
   type: 'message',
@@ -21,11 +21,24 @@ export const TimelineDebugData = [{
21 21
   },
22 22
   createdAt: {
23 23
     day: '27/11/16',
24
-    hour: '10h30'
24
+    hour: '15h30'
25 25
   },
26
-  text: 'Proident esse laboris in sed officia exercitation ut anim ea. in sed officia exercitation ut'
26
+  text: 'correction des fautes en tous genre'
27 27
 }, {
28 28
   id: 2,
29
+  type: 'version',
30
+  author: {
31
+    id: 1,
32
+    name: 'smoi',
33
+    avatar: 'https://www.algoo.fr/static/images/algoo_images/algoo-logo.jpg'
34
+  },
35
+  createdAt: {
36
+    day: '27/11/11',
37
+    hour: '10h50'
38
+  },
39
+  number: '5'
40
+}, {
41
+  id: 3,
29 42
   type: 'message',
30 43
   author: {
31 44
     id: 1,
@@ -36,9 +49,9 @@ export const TimelineDebugData = [{
36 49
     day: '27/11/15',
37 50
     hour: '10h30'
38 51
   },
39
-  text: 'Proident esse laboris in sed officia exercitation ut anim ea. Proident esse laboris in sed officia exercitation ut anim ea. Proident esse laboris in sed officia exercitation ut anim ea.'
52
+  text: 'Déplacement de la partie 2 pour une meilleur lisibilité du contenu. Tout le contenu est maintenant dans l\'ordre chronologique. Également, développement de la conclusion sur un ton plus léger.'
40 53
 }, {
41
-  id: 3,
54
+  id: 4,
42 55
   type: 'version',
43 56
   author: {
44 57
     id: 1,
@@ -46,9 +59,23 @@ export const TimelineDebugData = [{
46 59
     avatar: 'https://www.algoo.fr/static/images/algoo_images/algoo-logo.jpg'
47 60
   },
48 61
   createdAt: {
49
-    day: '27/11/11'
62
+    day: '27/11/11',
63
+    hour: '8h30'
50 64
   },
51 65
   number: '5'
66
+}, {
67
+  id: 5,
68
+  type: 'message',
69
+  author: {
70
+    id: 5,
71
+    name: 'MrLapin',
72
+    avatar: 'https://avatars3.githubusercontent.com/u/11177014?s=460&v=4'
73
+  },
74
+  createdAt: {
75
+    day: '26/11/15',
76
+    hour: '10h30'
77
+  },
78
+  text: 'premiere version'
52 79
 }]
53 80
 
54 81
 export default TimelineDebugData

+ 1 - 1
src/index.dev.js Visa fil

@@ -36,7 +36,7 @@ ReactDOM.render(
36 36
       <Timeline
37 37
         customClass={`${'randomClass'}__contentpage`}
38 38
         loggedUser={{
39
-          id: '1',
39
+          id: 1,
40 40
           name: 'smoi',
41 41
           avatar: 'https://www.algoo.fr/static/images/algoo_images/algoo-logo.jpg'
42 42
         }}