Skip to content

Commit

Permalink
3089: Cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
tuj committed Dec 2, 2024
1 parent fc8a985 commit 472dba6
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/calendar/calendar-multiple-days.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,14 @@ const Wrapper = styled.div`
font-size: var(--font-size-base);
height: 100%;
overflow: hidden;
background-repeat: no-repeat;
background-size: cover;
/*
--bg-color is local to this template file and is populated from configuration.
--background-color serves as fallback to the global variable, that will serve a light og dark background color depending on the user preferences.
*/
background-color: var(--bg-color, var(--background-color));
background-image: var(--bg-image, none);
color: var(--text-color);
display: grid;
grid-template-areas:
Expand Down
3 changes: 3 additions & 0 deletions src/calendar/calendar-multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ const Wrapper = styled.div`
font-size: var(--font-size-base);
overflow: hidden;
height: 100%;
background-repeat: no-repeat;
background-size: cover;
/*
--bg-color is local to this template file and is populated from configuration.
--background-color serves as fallback to the global variable, that will serve a light og dark background color depending on the user preferences.
*/
background-color: var(--bg-color, var(--background-color));
background-image: var(--bg-image, none);
color: var(--text-color);
display: grid;
grid-template-areas:
Expand Down
3 changes: 3 additions & 0 deletions src/calendar/calendar-single-booking-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ const Wrapper = styled.div`
/* Wrapper styling */
font-family: var(--font-family-base);
height: 100%;
background-repeat: no-repeat;
background-size: cover;
/*
--bg-color is local to this template file and is populated from configuration.
--background-color serves as fallback to the global variable, that will serve a light og dark background color depending on the user preferences.
*/
background-color: var(--bg-color, var(--background-color));
background-image: var(--bg-image, none);
color: var(--text-color);
overflow: hidden;
Expand Down
3 changes: 3 additions & 0 deletions src/calendar/calendar-single.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ const Wrapper = styled.div`
/* Wrapper styling */
font-family: var(--font-family-base);
height: 100%;
background-repeat: no-repeat;
background-size: cover;
/*
--bg-color is local to this template file and is populated from configuration.
--background-color serves as fallback to the global variable, that will serve a light og dark background color depending on the user preferences.
*/
background-color: var(--bg-color, var(--background-color));
background-image: var(--bg-image, none);
color: var(--text-color);
padding: var(--padding-size-base);
`;
Expand Down
3 changes: 1 addition & 2 deletions src/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Calendar({ slide, content, run, slideDone, executionId }) {
const imageUrl = getFirstMediaUrlFromField(slide.mediaData, content.image);

if (imageUrl) {
rootStyle.backgroundImage = `url("${imageUrl}")`;
rootStyle["--bg-image"] = `url("${imageUrl}")`;
}

/** Setup slide run function. */
Expand Down Expand Up @@ -149,7 +149,6 @@ Calendar.propTypes = {
content: PropTypes.shape({
duration: PropTypes.number.isRequired,
layout: PropTypes.string,

image: PropTypes.arrayOf(PropTypes.string),
fontSize: PropTypes.string,
resourceUnavailableText: PropTypes.string,
Expand Down
2 changes: 1 addition & 1 deletion src/image-text/image-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function ImageText({ slide, content, run, slideDone, executionId }) {
}}
ref={currentImage.nodeRef}
className={`background-image${
mediaContain ? " image-contain" : ""
mediaContain ? " media-contain" : ""
}`}
/>
</CSSTransition>
Expand Down
2 changes: 1 addition & 1 deletion src/image-text/image-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
bottom: 0;
}

.background-image.image-contain {
.background-image.media-contain {
background-size: contain;
background-repeat: no-repeat;
}
Expand Down
2 changes: 1 addition & 1 deletion src/video/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function Video({ slide, content, run, slideDone, executionId }) {
height="100%"
ref={videoRef}
muted={!sound}
className={mediaContain ? " media-contain" : ""}
className={mediaContain ? "media-contain" : ""}
>
{videoUrls.map((url) => (
<source key={url} src={url} />
Expand Down

0 comments on commit 472dba6

Please sign in to comment.