From d2667570a99b9006cf83b81017d48c0e2739baad Mon Sep 17 00:00:00 2001 From: SondreB Date: Tue, 10 Jan 2023 22:51:15 +0100 Subject: [PATCH] Render video and images full width on mobile devices --- src/app/shared/content/content.component.css | 14 ++++++++++++++ src/app/shared/content/content.component.ts | 8 ++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/shared/content/content.component.css b/src/app/shared/content/content.component.css index 396f154..007bbe7 100644 --- a/src/app/shared/content/content.component.css +++ b/src/app/shared/content/content.component.css @@ -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; + } +} diff --git a/src/app/shared/content/content.component.ts b/src/app/shared/content/content.component.ts index ec1c087..6e1427c 100644 --- a/src/app/shared/content/content.component.ts +++ b/src/app/shared/content/content.component.ts @@ -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]}`));