Skip to content

Commit

Permalink
Merge pull request learningequality#752 from AllanOXDi/Card-fix
Browse files Browse the repository at this point in the history
fixes card display without a thumbnail
  • Loading branch information
AllanOXDi authored Sep 11, 2024
2 parents dd13ea6 + 8bdfa47 commit 2b03efb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/KCard/BaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@
@extend %dropshadow-2dp;
position: relative;
display: block;
text-align: left;
text-decoration: none;
list-style-type: none;
Expand Down
12 changes: 10 additions & 2 deletions lib/KCard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
<slot name="title"></slot>
</template>
<template #default>
<div class="thumbnail">
<div
v-if="thumbnailDisplay !== Thumbnail_Displays.NONE"
class="thumbnail"
>
<!--
Render KImg even if thumbnailSrc is not provided since in that case
KImg takes care of showing the gray placeholder area.
Expand Down Expand Up @@ -230,6 +233,11 @@
default: false,
},
},
data() {
return {
Thumbnail_Displays,
};
},
computed: {
rootClass() {
return this.stylesAndClasses.rootClass;
Expand Down Expand Up @@ -418,7 +426,7 @@
/************* Layout-specific styles *************/
.vertical-with-large-thumbnail {
height: 480px; /* (1) */
height: auto; /* (1) */
.thumbnail {
height: 45%;
Expand Down

0 comments on commit 2b03efb

Please sign in to comment.