Browse Source

sidebar and page content are now using flexbox

Skylsmoi 7 years ago
parent
commit
196fbff243
3 changed files with 13 additions and 16 deletions
  1. 7 5
      src/container/Tracim.jsx
  2. 5 3
      src/css/Generic.styl
  3. 1 8
      src/css/Sidebar.styl

+ 7 - 5
src/container/Tracim.jsx View File

21
 
21
 
22
         <Route path='/login' component={Login} />
22
         <Route path='/login' component={Login} />
23
 
23
 
24
-        { location.pathname !== '/login' && // cant find "except" in <Route path />
25
-          <Sidebar />
26
-        }
27
-        <Route exact path='/' component={Workspace} />
28
-        <PrivateRoute path='/page' component={Page} />
24
+        <div className='sidebarpagecontainer'>
25
+          { location.pathname !== '/login' && // cant find "except" in <Route path />
26
+            <Sidebar />
27
+          }
28
+          <Route exact path='/' component={Workspace} />
29
+          <PrivateRoute path='/page' component={Page} />
30
+        </div>
29
 
31
 
30
         <Footer />
32
         <Footer />
31
       </div>
33
       </div>

+ 5 - 3
src/css/Generic.styl View File

1
+.sidebarpagecontainer
2
+  display flex
3
+  min-height calc(100% - 50px)
4
+  padding-top 85px
5
+
1
 .pageWrapperGeneric
6
 .pageWrapperGeneric
2
-  display table-cell
3
-  vertical-align top
4
-  padding-top 87px
5
   width 100%
7
   width 100%
6
   &__header
8
   &__header
7
     display flex
9
     display flex

+ 1 - 8
src/css/Sidebar.styl View File

16
 
16
 
17
 .sidebar
17
 .sidebar
18
   display none
18
   display none
19
-  height 100%
19
+  min-height 100%
20
   background-color dark-blue
20
   background-color dark-blue
21
   z-index 1
21
   z-index 1
22
 
22
 
24
 .sidebar-visible
24
 .sidebar-visible
25
   .sidebar-expandbar
25
   .sidebar-expandbar
26
     left sidebar-width
26
     left sidebar-width
27
-  .sidebar
28
-    display table-cell
29
-    vertical-align top
30
-  .containerdocument
31
-    display table-cell
32
-    vertical-align top
33
 
27
 
34
 .sidebar
28
 .sidebar
35
-  padding-top 85px
36
   &__btnnewworkspace
29
   &__btnnewworkspace
37
     margin-top 40px
30
     margin-top 40px
38
     padding 10px
31
     padding 10px