Selaa lähdekoodia

changing the way comments are published

AlexiCauvin 6 vuotta sitten
vanhempi
commit
1c0935454e
3 muutettua tiedostoa jossa 81 lisäystä ja 46 poistoa
  1. 18 16
      src/component/Thread.jsx
  2. 1 1
      src/container/Thread.jsx
  3. 62 29
      src/css/index.styl

+ 18 - 16
src/component/Thread.jsx Näytä tiedosto

@@ -25,26 +25,28 @@ const Thread = props => {
25 25
         )}
26 26
       </ul>
27 27
 
28
-      <form className='wsContentThread__app__texteditor wsContentGeneric__texteditor'>
29
-        <div className='wsContentThread__app__texteditor__simpletext wsContentGeneric__texteditor__simpletext input-group d-inline-flex d-sm-inline-flex d-md-inline-flex d-lg-none'>
30
-          <input type='text' className='wsContentThread__app__texteditor__simpletext__input wsContentGeneric__texteditor__simpletext__input form-control' placeholder='...' />
28
+      <form className='wsContentThread__app__texteditor wsContentGeneric__texteditor d-flex align-items-center justify-content-between flex-wrap'>
29
+        <div className='wsContentThread__app__texteditor__textinput wsContentGeneric__texteditor__textinput'>
30
+          <textarea placeholder='Taper votre message ici'/>
31
+        </div>
32
+
33
+        <div className='wsContentThread__app__texteditor__wrapper'>
31 34
 
32
-          <div className='wsContentThread__app__texteditor__simpletext__icon wsContentGeneric__texteditor__simpletext__icon input-group-addon'>
33
-            <i className='fa fa-font' />
35
+          <div className='wsContentThread__app__texteditor__advancedtext wsContentGeneric__texteditor__advancedtext mb-2'>
36
+            <button type='button' className='wsContentThread__app__texteditor__advancedtext__btn wsContentGeneric__texteditor__advancedtext__btn btn btn-outline-primary'>
37
+              Texte Avancé
38
+            </button>
34 39
           </div>
35
-        </div>
36 40
 
37
-        <div className='wsContentGeneric__texteditor__wysiwyg d-none d-lg-block'>
38
-          <textarea className='form-control' />
39
-        </div>
41
+          <div className='wsContentThread__app__texteditor__submit wsContentGeneric__texteditor__submit mb-2'>
42
+            <button type='submit' className='wsContentThread__app__texteditor__submit__btn wsContentGeneric__texteditor__submit__btn btn btn-primary'>
43
+              Envoyer
44
+              <div className='wsContentThread__app__texteditor__submit__btn__icon wsContentGeneric__texteditor__submit__btn__icon ml-3'>
45
+                <i className='fa fa-paper-plane-o' />
46
+              </div>
47
+            </button>
48
+          </div>
40 49
 
41
-        <div className='wsContentThread__app__texteditor__submit wsContentGeneric__texteditor__submit d-lg-flex justify-content-lg-center my-3'>
42
-          <button type='submit' className='wsContentThread__app__texteditor__submit__btn wsContentGeneric__texteditor__submit__btn btn btn-primary'>
43
-            Envoyer
44
-            <div className='wsContentThread__app__texteditor__submit__btn__icon wsContentGeneric__texteditor__submit__btn__icon ml-3'>
45
-              <i className='fa fa-paper-plane-o' />
46
-            </div>
47
-          </button>
48 50
         </div>
49 51
       </form>
50 52
     </div>

+ 1 - 1
src/container/Thread.jsx Näytä tiedosto

@@ -95,7 +95,7 @@ class Thread extends React.Component {
95 95
       listMessage: fetchResultThread.json.message_list
96 96
     })
97 97
 
98
-    wysiwyg()
98
+    // wysiwyg()
99 99
   }
100 100
 
101 101
   handleClickBtnCloseApp = () => {

+ 62 - 29
src/css/index.styl Näytä tiedosto

@@ -1,7 +1,17 @@
1 1
 @import "../../node_modules/tracim_lib/src/css/Variable.styl"
2 2
 
3
+bgandcolor()
4
+  border-color threadColor
5
+  color off-white
6
+  background-color threadColor
7
+
8
+bgandcolorhover()
9
+  border-color darkenThread
10
+  background-color darkenThread
11
+  box-shadow shadow-all-side-thread
12
+
3 13
 .wsContentThread
4
-  width 550px
14
+  width 1100px
5 15
   &__header
6 16
     color white
7 17
     background-color threadColor
@@ -44,21 +54,34 @@
44 54
     &__texteditor
45 55
       flex 0 1 auto
46 56
       border-top 1px solid grey
47
-      &__simpletext
48
-        &__input
49
-          &:focus
50
-            color darkBlue
51
-            border-color darkBlue
57
+      padding 35px 20px
58
+      &__textinput
59
+        width 85%
60
+        & > textarea
61
+          border-radius 5px
62
+          border 1.5px solid grey
63
+          padding 5px
64
+          height 80px
65
+          width 100%
66
+      &__wrapper
67
+        display flex
68
+        flex-direction column
69
+        justify-content center
70
+      &__advancedtext
71
+        &__btn
72
+          border-color threadColor
73
+          color threadColor
74
+          cursor pointer
75
+          &:hover, &:focus
76
+            bgandcolorhover()
52 77
       &__submit
53 78
         &__btn
54 79
           display flex
55
-          border-color threadColor
56
-          color off-white
57
-          background-color threadColor
80
+          cursor pointer
81
+          bgandcolor()
82
+          width 118px
58 83
           &:hover, &:focus
59
-            border-color darkenThread
60
-            background-color darkenThread
61
-            box-shadow shadow-all-side-thread
84
+            bgandcolorhover()
62 85
 
63 86
 .received
64 87
   text-align right
@@ -80,21 +103,35 @@
80 103
       &__title
81 104
         display none
82 105
 
83
-@media (min-width: max-xs) and (max-width: max-md)
106
+.activeAdvancedText
107
+  .wsContentThread__app
108
+    &__texteditor
109
+      padding 10px
110
+      height 500px
111
+      &__textinput
112
+        width 100%
113
+      &__wrapper
114
+        flex-direction row
115
+        width 100%
116
+      &__advancedtext
117
+        margin-right 20px
118
+
119
+@media (min-width: min-lg) and (max-width: max-lg)
84 120
   .wsContentThread
85
-    &__app
86
-      &__texteditor
87
-        padding 7px
88
-        &__simpletext
89
-          display inline-flex
90
-          width 70%
91
-        &__submit
92
-          display inline-flex
93
-          margin-left 30px
121
+    width 900px
122
+
123
+@media (min-width: min-md) and (max-width: max-md)
124
+  .wsContentThread
125
+    width 700px
126
+    &__app__texteditor__textinput
127
+      width 75%
94 128
 
95 129
 @media (min-width: min-sm) and (max-width: max-sm)
96 130
   .wsContentThread
97 131
     top 69px
132
+    width 500px
133
+    &__app__texteditor__textinput
134
+      width 70%
98 135
 
99 136
 @media (max-width: max-xs)
100 137
   .wsContentThread
@@ -104,10 +141,6 @@
104 141
     z-index 1
105 142
     &__app
106 143
       &__texteditor
107
-        padding 7px
108
-        &__simpletext
109
-          display inline-flex
110
-          margin-right 15px
111
-          width 62%
112
-        &__submit
113
-          display inline-flex
144
+        padding 55px 20px 30px 20px
145
+        &__textinput
146
+          width 60%