css changes to make scrollbar sticky

This commit is contained in:
Jean Jacques Avril 2021-07-20 02:54:44 +02:00
parent 73b2b493a4
commit 3f6a74a45d
5 changed files with 15053 additions and 41 deletions

3
.vs/ProjectSettings.json Normal file
View File

@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}

View File

@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}

BIN
.vs/slnx.sqlite Normal file

Binary file not shown.

14995
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -18,65 +18,73 @@
</b-sidebar> </b-sidebar>
</div> </div>
</template> </template>
<style> <style lang="scss">
.sidebar-container .sidebar-fixed { .sidebar-container {
.nav {
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: white transparent;
max-height: 100vh;
padding-bottom: 80px;
flex-wrap: nowrap;
}
.sidebar-fixed {
position: sticky;
top: 0;
padding-left: 0.5rem; padding-left: 0.5rem;
padding-right: 0.5rem; padding-right: 0.5rem;
padding-bottom: 180px;
width: 250px; width: 250px;
} }
.sidebar-brand {
.sidebar-container .sidebar-brand {
padding: 1rem 1rem 0.75rem; padding: 1rem 1rem 0.75rem;
} }
.sidebar-heading {
.sidebar-container .sidebar-heading {
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
font-weight: bold; font-weight: bold;
text-transform: uppercase; text-transform: uppercase;
display: block; display: block;
} }
.sidebar-container .nav-link { a.nav-link {
flex-shrink: 0;
width: calc(100%); width: calc(100%);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
.b-icon {
margin-right: 0.75rem;
}
&:not(.router-link-active) .b-icon {
color: var(--text-muted);
}
&:hover {
color: inherit;
background-color: rgba(255, 255, 255, 0.045);
}
&.router-link-active {
color: var(--primary);
background-color: rgba(255, 255, 255, 0.045);
&:hover {
color: var(--primary);
}
}
} }
}
.sidebar-container a.nav-link .b-icon {
margin-right: 0.75rem;
}
.sidebar-container .nav-link:not(.router-link-active) .b-icon {
color: var(--text-muted);
}
.sidebar-container .nav-link:hover {
color: inherit;
background-color: rgba(255, 255, 255, 0.045);
}
.sidebar-container .nav-link.router-link-active {
color: var(--primary);
background-color: rgba(255, 255, 255, 0.045);
}
.sidebar-container .nav-link.router-link-active:hover {
color: var(--primary);
}
</style> </style>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from "vue";
import Nav from './Nav.vue' import Nav from "./Nav.vue";
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from "vuex";
export default Vue.extend({ export default Vue.extend({
components: { components: {
Nav, Nav,
}, },
computed: { computed: {
...mapState(['showMenu']) ...mapState(["showMenu"]),
}, },
methods: { methods: {
...mapActions(['hideMenu']), ...mapActions(["hideMenu"]),
}, },
}) });
</script> </script>