Render video and images full width on mobile devices

This commit is contained in:
SondreB 2023-01-10 22:51:15 +01:00
parent 801955a712
commit d2667570a9
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF
2 changed files with 16 additions and 6 deletions

View File

@ -20,3 +20,17 @@
.events-videos {
text-align: left;
}
@media only screen and (max-width: 599px) {
.event-video {
width: 100vw !important;
height: 50vh !important;
margin-left: -1.6em;
}
.event-image {
width: 100vw !important;
margin-left: -1.6em;
max-width: max-content;
}
}

View File

@ -75,12 +75,8 @@ export class ContentComponent {
this.images = images.map((i) => this.utilities.sanitizeUrl(i[0]));
const thisisthewayMatch = [...content.matchAll(ContentComponent.regexpThisIsTheWay)];
console.log(thisisthewayMatch);
if (thisisthewayMatch) {
const thisistheway = thisisthewayMatch.map((i) => this.utilities.sanitizeUrl(`https://i.ytimg.com/vi/LaiN63o_BxA/maxresdefault.jpg`));
this.images.push(...thisistheway);
}
const thisistheway = thisisthewayMatch.map((i) => this.utilities.sanitizeUrl(`https://i.ytimg.com/vi/LaiN63o_BxA/maxresdefault.jpg`));
this.images.push(...thisistheway);
const videos = [...content.matchAll(ContentComponent.regexpVideo)];
this.videos = videos.map((i) => this.utilities.sanitizeUrl(`https://www.youtube.com/embed/${i[1]}`));