Merge branch 'feature/sidepanel-independent-scrolling' into 'develop'

Sidepanel independent scrolling

See merge request !72
This commit is contained in:
lambadalambda 2017-04-14 07:50:45 -04:00
commit dcced2d2e1
4 changed files with 45 additions and 9 deletions

View file

@ -213,15 +213,22 @@ nav {
} }
.main { .main {
flex: 1; flex-basis: 60%;
flex-basis: 65%; flex-grow: 1;
flex-shrink: 1;
} }
.sidebar { .sidebar {
flex: 1; flex: 0;
flex-basis: 35%; flex-basis: 35%;
} }
.sidebar-flexer {
flex: 1;
flex-basis: 345px;
width: 365px;
}
.mobile-shown { .mobile-shown {
display: none; display: none;
} }
@ -238,6 +245,30 @@ nav {
} }
} }
@media all and (min-width: 960px) {
.sidebar {
overflow: hidden;
max-height: 100vh;
width: 350px;
position: fixed;
margin-top: -10px;
.sidebar-container {
height: 96vh;
width: 362px;
padding-top: 10px;
padding-right: 20px;
overflow-x: hidden;
overflow-y: scroll;
}
}
.sidebar-flexer {
max-height: 96vh;
flex-shrink: 0;
flex-grow: 0;
}
}
@media all and (max-width: 959px) { @media all and (max-width: 959px) {
.mobile-hidden { .mobile-hidden {
display: none; display: none;

View file

@ -15,11 +15,15 @@
<button @click="activatePanel('sidebar')">Sidebar</button> <button @click="activatePanel('sidebar')">Sidebar</button>
<button @click="activatePanel('timeline')">Timeline</button> <button @click="activatePanel('timeline')">Timeline</button>
</div> </div>
<div class="sidebar-flexer" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar'}">
<div class="sidebar" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar' }"> <div class="sidebar" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar' }">
<div class="sidebar-container">
<user-panel></user-panel> <user-panel></user-panel>
<nav-panel></nav-panel> <nav-panel></nav-panel>
<notifications v-if="currentUser"></notifications> <notifications v-if="currentUser"></notifications>
</div> </div>
</div>
</div>
<div class="main" :class="{ 'mobile-hidden': mobileActivePanel != 'timeline' }"> <div class="main" :class="{ 'mobile-hidden': mobileActivePanel != 'timeline' }">
<transition name="fade"> <transition name="fade">
<router-view></router-view> <router-view></router-view>

View file

@ -1,6 +1,8 @@
@import '../../_variables.scss'; @import '../../_variables.scss';
.notifications { .notifications {
// a bit of a hack to allow scrolling below notifications
padding-bottom: 15em;
.panel-heading { .panel-heading {
// force the text to stay centered, while keeping // force the text to stay centered, while keeping

View file

@ -116,7 +116,6 @@
} }
.profile-panel-body { .profile-panel-body {
padding-top: 0em;
top: -0em; top: -0em;
padding-top: 4em; padding-top: 4em;
} }