Skip to content

Commit 980552a

Browse files
committed
image styling for flip cards
1 parent afa2616 commit 980552a

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

0 Bytes
Binary file not shown.

h5p-player/h5p-libraries/H5P.Dialogcards-1.9/dist/h5p-dialogcards.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
.h5p-dialogcards-card-text-area {
2525
outline: 0;
2626
font-size: 1.125em;
27+
display: flex;
28+
flex-flow: row nowrap;
29+
justify-content: center;
30+
align-items: center;
2731
}
2832

2933
.h5p-dialogcards {
@@ -96,6 +100,9 @@
96100
height: 100%;
97101
-webkit-transition: -webkit-transform 0.2s ease-in-out;
98102
transition: transform 0.2s ease-in-out;
103+
display: flex;
104+
flex-flow: column nowrap;
105+
justify-content: center;
99106
}
100107

101108
.h5p-dialogcards .h5p-dialogcards-card-content {
@@ -121,6 +128,10 @@
121128
position: relative;
122129
}
123130

131+
.h5p-dialogcards-image-wrapper-no-image {
132+
height: 0em !important;
133+
}
134+
124135
.h5p-dialogcards .h5p-dialogcards-image-wrapper > .h5p-dialogcards-image {
125136
text-align: center;
126137
max-height: 100%;

h5p-player/h5p-libraries/H5P.Dialogcards-1.9/dist/h5p-dialogcards.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
var e = r("<div>", { class: "h5p-dialogcards-image-wrapper" });
7575
return (
7676
void 0 !== t.image
77-
? ((this.image = t.image),
77+
? ((e = r("<div>", { class: "h5p-dialogcards-image-wrapper" })),
78+
(this.image = t.image),
7879
(this.$image = r(
7980
'<img class="h5p-dialogcards-image" src="' +
8081
H5P.getPath(t.image.path, this.contentId) +
@@ -85,7 +86,10 @@
8586
"alt",
8687
this.massageAttributeOutput(t.imageAltText)
8788
))
88-
: (this.$image = r('<div class="h5p-dialogcards-image"></div>')),
89+
: ((e = r("<div>", {
90+
class: "h5p-dialogcards-image-wrapper-no-image",
91+
})),
92+
(this.$image = r('<div class="h5p-dialogcards-image"></div>'))),
8993
this.$image.appendTo(e),
9094
e
9195
);

h5p-player/h5p-libraries/H5P.Dialogcards-1.9/src/scripts/h5p-dialogcards-card.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ class Card {
114114
class: "h5p-dialogcards-image-wrapper",
115115
});
116116

117-
console.log(card.image);
118117
if (card.image !== undefined) {
119118
this.$image = $(
120119
'<img class="h5p-dialogcards-image" src="/' +

0 commit comments

Comments
 (0)