Make sidepanel scroll independently from timeline, allows for seeing notifications and posting new statuses even when scrolled deep down.
This commit is contained in:
parent
446de1c623
commit
83205b8c0e
28
src/App.scss
28
src/App.scss
@ -222,6 +222,12 @@ nav {
|
|||||||
flex-basis: 35%;
|
flex-basis: 35%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar-flexer {
|
||||||
|
flex: 1;
|
||||||
|
flex-basis: 35%;
|
||||||
|
width: 365px;
|
||||||
|
}
|
||||||
|
|
||||||
.mobile-shown {
|
.mobile-shown {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -238,6 +244,28 @@ nav {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media all and (min-width: 960px) {
|
||||||
|
.sidebar {
|
||||||
|
overflow: hidden;
|
||||||
|
max-height: 100vh;
|
||||||
|
max-width: 345px;
|
||||||
|
position: fixed;
|
||||||
|
margin-top: -10px;
|
||||||
|
|
||||||
|
.sidebar-container {
|
||||||
|
height: 96vh;
|
||||||
|
padding-top: 10px;
|
||||||
|
margin-right: -40px;
|
||||||
|
padding-right: 25px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sidebar-flexer {
|
||||||
|
max-height: 96vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 959px) {
|
@media all and (max-width: 959px) {
|
||||||
.mobile-hidden {
|
.mobile-hidden {
|
||||||
display: none;
|
display: none;
|
||||||
|
12
src/App.vue
12
src/App.vue
@ -15,10 +15,14 @@
|
|||||||
<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" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar' }">
|
<div class="sidebar-flexer" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar'}">
|
||||||
<user-panel></user-panel>
|
<div class="sidebar" :class="{ 'mobile-hidden': mobileActivePanel != 'sidebar' }">
|
||||||
<nav-panel></nav-panel>
|
<div class="sidebar-container">
|
||||||
<notifications v-if="currentUser"></notifications>
|
<user-panel></user-panel>
|
||||||
|
<nav-panel></nav-panel>
|
||||||
|
<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">
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user