1
0
Fork 0

Allow multiple data-background

This commit is contained in:
Christian Meeßen 2021-04-23 08:33:56 +00:00 committed by cmeessen
parent 444d127053
commit 8347a2de58
1 changed files with 7 additions and 1 deletions

View File

@ -102,7 +102,13 @@ export default class SlideContent {
// Images // Images
if( backgroundImage ) { if( backgroundImage ) {
backgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')'; let backgroundString = ''
backgroundImage.split(',').forEach(background => {
backgroundString = backgroundString.concat(
'url(' + encodeURI(background.trim()) + '),'
);
})
backgroundContent.style.backgroundImage = backgroundString.substr(0, backgroundString.length - 1);
} }
// Videos // Videos
else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) { else if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {