Skip to content

Commit

Permalink
Merge pull request #8143 from sairina/exercise-scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
jonboiser committed Jun 11, 2021
2 parents adf80ee + 4254ff0 commit 56482a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
22 changes: 5 additions & 17 deletions kolibri/core/assets/src/views/MultiPaneLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,16 @@
name: 'MultiPaneLayout',
mixins: [responsiveWindowMixin, responsiveElementMixin],
computed: {
maxHeight() {
const APP_BAR_HEIGHT = this.windowIsSmall ? 56 : 64;
const PADDING = this.windowIsSmall ? 16 : 32;
const MARGIN = 16;
let maxHeight = this.windowHeight - APP_BAR_HEIGHT - PADDING * 2 - MARGIN;
if (this.$refs.header) {
maxHeight = maxHeight - this.$refs.header.clientHeight;
}
if (this.$refs.footer) {
maxHeight = maxHeight - this.$refs.footer.clientHeight;
}
return maxHeight;
},
styles() {
return {
header: {
borderBottomColor: this.$themeTokens.textDisabled,
},
aside: {
maxHeight: `${this.maxHeight}px`,
maxHeight: `${this.windowHeight}px`,
},
main: {
maxHeight: this.$slots.aside ? `${this.maxHeight}px` : '',
maxHeight: this.$slots.aside ? `${this.windowHeight}px` : '',
},
footer: {
borderTopColor: this.$themeTokens.textDisabled,
Expand Down Expand Up @@ -103,8 +90,9 @@
border-bottom-width: 1px;
}
.aside,
.main {
.main,
.aside {
height: 100%;
overflow-y: auto;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<div>
<KGrid>
<KGridItem
:layout8="{ span: 4 }"
:layout12="{ span: 6 }"
:layout8="{ span: 6 }"
:layout12="{ span: 9 }"
>
<h1>
<KLabeledIcon :icon="content.kind" :label="content.title" />
</h1>
</KGridItem>
<KGridItem
:layout="{ alignment: 'right' }"
:layout8="{ span: 4 }"
:layout12="{ span: 6 }"
:layout8="{ span: 2 }"
:layout12="{ span: 3 }"
>
<template v-if="displaySelectOptions">
<template v-if="isSelected">
Expand Down

0 comments on commit 56482a4

Please sign in to comment.