Skip to content

Commit

Permalink
Merge pull request #11062 from rtibbles/layout_tweaks
Browse files Browse the repository at this point in the history
Layout tweaks for Learn
  • Loading branch information
rtibbles authored Aug 4, 2023
2 parents 0203f3f + 92b23e9 commit e09bf54
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
6 changes: 5 additions & 1 deletion kolibri/plugins/learn/assets/src/views/HomePage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@
<style lang="scss" scoped>
.section:not(:first-child) {
margin-top: 42px;
margin-top: 32px;
}
.section:first-child {
margin-top: 16px;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<component
:is="!windowIsSmall && currentCardViewStyle === 'list' ? 'div' : 'CardGrid'"
:data-test="`${windowIsSmall ? '' : 'non-'}mobile-card-grid`"
:gridType="grid"
>
<component
:is="componentType"
Expand Down Expand Up @@ -74,14 +73,6 @@
return ['card', 'list'].includes(value);
},
},
// Used to define the "type" (number of columns) for <CardGrid />
// Currently only either `1` or `2`
// See props in CardGrid.vue for more details on # of cards per level
gridType: {
type: Number,
required: true,
default: 1,
},
keepCurrentBackLink: {
type: Boolean,
default: false,
Expand All @@ -102,12 +93,6 @@
}
return 'CardList';
},
grid() {
if (this.windowIsSmall) {
return 1;
}
return this.gridType;
},
},
methods: {
contentLink(id, isResource) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
:contents="topic.children"
:allowDownloads="allowDownloads"
currentCardViewStyle="card"
:gridType="2"
:keepCurrentBackLink="true"
@toggleInfoPanel="$emit('toggleInfoPanel', $event)"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
<!-- display all resources at the top level of the folder -->
<LibraryAndChannelBrowserMainContent
v-if="resources.length"
:gridType="2"
:allowDownloads="allowDownloads"
data-test="search-results"
:contents="resourcesDisplayed"
Expand Down

0 comments on commit e09bf54

Please sign in to comment.