diff --git a/common/modal/modal.css b/common/modal/modal.css index dd3148ed..abf16302 100644 --- a/common/modal/modal.css +++ b/common/modal/modal.css @@ -48,6 +48,10 @@ position: relative; transform: translateY(-100vh); transition: transform 0.3s ease-out; +} + +:root:not(.redesign-v2) .modal-content { + margin-top: 100px; background-color: var(--c-grey-1); } @@ -105,7 +109,7 @@ outline-offset: 5px; } -.modal-top-bar svg { +.modal-top-bar .icon svg { height: 24px; width: 24px; } @@ -179,6 +183,7 @@ gap: 2%; } +/* stylelint-disable-next-line no-descending-specificity */ .modal-content:has(.modal-soundcloud) { aspect-ratio: unset; } @@ -199,3 +204,36 @@ width: 100%; height: unset; } + +.redesign-v2 .modal-content:has(.modal-video) { + padding: 0 16px; + max-width: calc(var(--wrapper-width) + 32px); +} + +.redesign-v2 .modal-video { + width: calc(100% - 32px); + height: auto; + border-radius: 8px 8px 0 0; +} + +@media (min-width: 744px) { + .redesign-v2 .modal-content:has(.modal-video) { + padding: 0 32px; + } + + .redesign-v2 .modal-video { + width: calc(100% - 64px); + } +} + +@media (min-width: 1200px) { + .redesign-v2 .modal-content:has(.modal-video) { + padding: 0; + margin: 0 auto; + max-width: var(--wrapper-width); + } + + .redesign-v2 .modal-video { + width: 100%; + } +} diff --git a/common/modal/modal.js b/common/modal/modal.js index 853f3957..cb4e8efc 100644 --- a/common/modal/modal.js +++ b/common/modal/modal.js @@ -1,5 +1,5 @@ import { createElement, getTextLabel } from '../../scripts/common.js'; -import { loadCSS } from '../../scripts/lib-franklin.js'; +import { decorateIcons, loadCSS } from '../../scripts/lib-franklin.js'; // eslint-disable-next-line import/no-cycle import { createIframe, isLowResolutionVideoUrl } from '../../scripts/video-helper.js'; @@ -16,15 +16,14 @@ const createModalTopBar = (parentEl) => { `); + decorateIcons(topBar); parentEl.prepend(...topBar.children); // eslint-disable-next-line no-use-before-define parentEl.querySelector('.modal-close-button').addEventListener('click', () => hideModal()); @@ -126,12 +125,6 @@ const createModal = () => { bannerWrapper.classList.add('modal-before-banner'); bannerWrapper.addEventListener('click', (event) => event.stopPropagation()); bannerWrapper.appendChild(beforeBanner); - const closeButton = document.createElement('button'); - closeButton.classList.add('modal-close-button'); - closeButton.innerHTML = ''; - bannerWrapper.appendChild(closeButton); - // eslint-disable-next-line no-use-before-define - closeButton.addEventListener('click', () => hideModal()); videoOrIframe.before(bannerWrapper); }