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,11 +21,13 @@ class Tracim extends React.Component {
21 21
 
22 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 32
         <Footer />
31 33
       </div>

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

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

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

@@ -16,7 +16,7 @@
16 16
 
17 17
 .sidebar
18 18
   display none
19
-  height 100%
19
+  min-height 100%
20 20
   background-color dark-blue
21 21
   z-index 1
22 22
 
@@ -24,15 +24,8 @@ sidebar-width = 300px
24 24
 .sidebar-visible
25 25
   .sidebar-expandbar
26 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 28
 .sidebar
35
-  padding-top 85px
36 29
   &__btnnewworkspace
37 30
     margin-top 40px
38 31
     padding 10px