From e0d4fcbed26e9ee750b3e366d51a2a0ea122ece6 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Thu, 13 May 2021 09:59:01 -0300 Subject: [PATCH] New embed responsiveness strategy. --- src/assets/css/media-component.css | 87 +++++++++++--- src/assets/css/media-component.css.map | 2 +- src/assets/css/tainacan-embeds.css | 100 +++++++++------- src/classes/class-tainacan-embed.php | 88 ++++++++++++-- .../media-component/media-component.scss | 112 ++++++++++++++---- 5 files changed, 293 insertions(+), 96 deletions(-) diff --git a/src/assets/css/media-component.css b/src/assets/css/media-component.css index b77b24c43..8212f36fd 100644 --- a/src/assets/css/media-component.css +++ b/src/assets/css/media-component.css @@ -687,17 +687,37 @@ a.pswp__share--download:hover { .tainacan-media-component__swiper-main .swiper-slide-content { width: 100%; height: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; } - .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-embed-container { + display: block; + text-align: center; } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed { width: 100%; height: auto; } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-has-aspect-ratio { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 2) / 1); + /* Default to 2:1 aspect ratio. */ + margin-left: auto; + margin-right: auto; } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-21-9 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 21) / 9); } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-18-9 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 18) / 9); } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-16-9 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 16) / 9); } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-4-3 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 4) / 3); } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-1-1 { + max-width: var(--tainacan-media-main-carousel-height, 60vh); } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-3-4 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 3) / 4); } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-9-16 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 9) / 16); } + .tainacan-media-component__swiper-main .swiper-slide-content .tainacan-content-embed.tainacan-embed-aspect-1-2 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 1) / 2); } .tainacan-media-component__swiper-main .swiper-slide-content iframe { max-height: var(--tainacan-media-main-carousel-height, 60vh); - width: 100%; max-width: 100%; + margin-left: auto; + margin-right: auto; border: none; display: block; background-image: url("../images/preloader.gif"); @@ -724,6 +744,9 @@ a.pswp__share--download:hover { .tainacan-media-component__swiper-main .swiper-slide-content img { width: auto; max-height: var(--tainacan-media-main-carousel-height, 60vh); } + .tainacan-media-component__swiper-main .swiper-slide-content .twitter-tweet { + margin-left: auto; + margin-right: auto; } .tainacan-media-component__swiper-thumbs { width: 100%; @@ -833,27 +856,53 @@ a.pswp__share--download:hover { justify-content: center; } .tainacan-photoswipe-layer .pswp__container .attachment-without-image { width: 100%; - height: 100%; + height: calc(100% - 44px); display: flex; + justify-content: center; align-items: center; - justify-content: center; } - .tainacan-photoswipe-layer .pswp__container .attachment-without-image.tainacan-embed-container:not(.tainacan-embed-without-iframe) { - padding: 0px; } - .tainacan-photoswipe-layer .pswp__container .attachment-without-image .tainacan-embed-container .twitter-tweet { - width: 100vw !important; } - .tainacan-photoswipe-layer .pswp__container iframe { + text-align: center; padding: 44px; - min-height: 90vh; - max-height: 90vh; - height: 100%; - width: 100%; - max-width: 100%; - margin: 0 auto; + margin-top: 22px; } + .tainacan-photoswipe-layer .pswp__container .attachment-without-image > iframe:not(.wp-embedded-content) { + width: 90vw; + height: 90vh; + border: none; + margin: 44px; + display: block; + background-image: url("../images/preloader.gif"); + background-repeat: no-repeat; + background-position: center; } + .tainacan-photoswipe-layer .pswp__container .pswp__zoom-wrap > iframe#iframePDF { + width: 90vw; + height: 90vh; border: none; + margin: 44px auto; display: block; background-image: url("../images/preloader.gif"); background-repeat: no-repeat; background-position: center; } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed { + width: 100%; + height: auto; } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-has-aspect-ratio { + max-width: calc((90vh * 2) / 1); + /* Default to 2:1 aspect ratio. */ + margin-left: auto; + margin-right: auto; } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-21-9 { + max-width: calc((90vh * 21) / 9); } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-18-9 { + max-width: calc((90vh * 18) / 9); } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-16-9 { + max-width: calc((90vh * 16) / 9); } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-4-3 { + max-width: calc((90vh * 4) / 3); } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-1 { + max-width: 90vh; } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-9-16 { + max-width: calc((90vh * 9) / 16); } + .tainacan-photoswipe-layer .pswp__container .tainacan-content-embed.tainacan-embed-aspect-1-2 { + max-width: calc((90vh * 1) / 2); } .tainacan-photoswipe-layer .pswp__container a:first-of-type, .tainacan-photoswipe-layer .pswp__container p:first-of-type, .tainacan-photoswipe-layer .pswp__container article:first-of-type { diff --git a/src/assets/css/media-component.css.map b/src/assets/css/media-component.css.map index 9d873030b..d784dd66e 100644 --- a/src/assets/css/media-component.css.map +++ b/src/assets/css/media-component.css.map @@ -1,6 +1,6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,MAAM;EAClB,SAAS,EAAE,OAAO;EAClB,OAAO,EAAE,KAAK;EACd,MAAM,EAAE,IAAI;EACZ,SAAS,EAAE,kBAAkB;EAC7B,KAAK,EAAE,IAAI;EACX,IAAI,EAAE,IAAI;EACV,QAAQ,EAAE,QAAQ;EAClB,QAAQ,EAAE,MAAM;EAChB,aAAa,EAAE,QAAQ;EACvB,WAAW,EAAE,MAAM;EACnB,WAAW,EAAE,IAAI;EACjB,OAAO,EAAE,MAAM;AAEnB,gDAAsB;EAClB,SAAS,EAAE,OAAO;EAClB,UAAU,EAAE,MAAM;AAEtB,6CAAmB;EACf,SAAS,EAAE,QAAQ;AAEvB,iDAAuB;EACnB,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,GAAG;EACd,SAAS,EAAE,KAAK", "sources": ["../../../node_modules/photoswipe/src/css/main.scss","../../views/media-component/media-component.scss","../../../node_modules/photoswipe/src/css/default-skin/default-skin.scss"], "names": [], "file": "media-component.css" diff --git a/src/assets/css/tainacan-embeds.css b/src/assets/css/tainacan-embeds.css index 557fb1cbd..5cbe681b2 100644 --- a/src/assets/css/tainacan-embeds.css +++ b/src/assets/css/tainacan-embeds.css @@ -1,54 +1,64 @@ -body:not(.wp-embed-responsive) .tainacan-embed-container, -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container { - position: relative; - overflow: hidden; +/* TAINACAN EMBEDS + * This file copies most of Gutenberg's logic for responsive blocks, + * but uses different classes to avoid future conflicts. + * Check their original css: /packages/block-library/src/embed/style.scss + */ + +/* + * The embed container is in a `figure` element, and many themes zero this out. + * This rule explicitly sets it, to ensure at least some bottom-margin in the flow. + */ +:not(.wp-block-embed__wrapper)>.tainacan-content-embed { + margin-bottom: 1em; + margin-left: 0; + margin-right: 0; + clear: both; +} + +/* Don't allow iframe to overflow it's container. */ +:not(.wp-block-embed__wrapper)>.tainacan-content-embed iframe { max-width: 100%; - height: auto; +} +:not(.wp-block-embed__wrapper)>.tainacan-content-embed .tainacan-content-embed__wrapper { + position: relative; } -body:not(.wp-embed-responsive) .tainacan-embed-container:not(.tainacan-embed-without-iframe), -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container:not(.tainacan-embed-without-iframe) { - padding-bottom: 56.25%; - padding-top: 30px; - width: 100%; - margin: auto; +/* Add responsiveness to embeds with aspect ratios. */ +:not(.wp-block-embed__wrapper)>.tainacan-has-aspect-ratio .tainacan-content-embed__wrapper::before { + content: ""; + display: block; + padding-top: 50%; /* Default to 2:1 aspect ratio. */ } -body:not(.wp-embed-responsive) .tainacan-embed-container .twitter-tweet, -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container .twitter-tweet { - margin: 0 auto; +:not(.wp-block-embed__wrapper)>.tainacan-has-aspect-ratio iframe { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + height: 100%; + width: 100%; } -body:not(.wp-embed-responsive) .tainacan-embed-container iframe.wp-embedded-content, -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container iframe.wp-embedded-content { - display: flex !important; - align-items: center; - justify-content: center; - margin: auto !important; - width: auto !important; - top: 50%; - bottom: 50%; +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-21-9 .tainacan-content-embed__wrapper::before { + padding-top: 42.85%; /* 9 / 21 * 100 */ } -@media screen and (max-width: 1024px) { - body:not(.wp-embed-responsive) .tainacan-embed-container iframe.wp-embedded-content, - body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container iframe.wp-embedded-content { - position: relative; - } +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-18-9 .tainacan-content-embed__wrapper::before { + padding-top: 50%; /* 9 / 18 * 100 */ } -body:not(.wp-embed-responsive) .tainacan-embed-container #tainacan-attachment-iframe , -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container #tainacan-attachment-iframe { /* PDF */ - width: 100%; +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-16-9 .tainacan-content-embed__wrapper::before { + padding-top: 56.25%; /* 9 / 16 * 100 */ } - -body:not(.wp-embed-responsive) .tainacan-embed-container iframe, -body:not(.wp-embed-responsive) .tainacan-embed-container object, -body:not(.wp-embed-responsive) .tainacan-embed-container embed, -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container iframe, -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container object, -body.wp-embed-responsive :not(.wp-block-embed__wrapper)>.tainacan-embed-container embed { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-4-3 .tainacan-content-embed__wrapper::before { + padding-top: 75%; /* 3 / 4 * 100 */ } +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-1-1 .tainacan-content-embed__wrapper::before { + padding-top: 100%; /* 1 / 1 * 100 */ +} +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-9-16 .tainacan-content-embed__wrapper::before { + padding-top: 177.77%; /* 16 / 9 * 100 */ +} +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-3-4 .tainacan-content-embed__wrapper::before { + padding-top: 133.33%; /* 4 / 3 * 100 */ +} +:not(.wp-block-embed__wrapper)>.tainacan-embed-aspect-1-2 .tainacan-content-embed__wrapper::before { + padding-top: 200%; /* 2 / 1 * 100 */ +} \ No newline at end of file diff --git a/src/classes/class-tainacan-embed.php b/src/classes/class-tainacan-embed.php index da65db0d5..055518c11 100644 --- a/src/classes/class-tainacan-embed.php +++ b/src/classes/class-tainacan-embed.php @@ -12,6 +12,19 @@ class Embed { return self::$instance; } + + private static $aspect_ratios = array( + // Common video resolutions. + array("ratio" => '2.33', "className" => 'tainacan-embed-aspect-21-9'), + array("ratio" => '2.00', "className" => 'tainacan-embed-aspect-18-9'), + array("ratio" => '1.78', "className" => 'tainacan-embed-aspect-16-9'), + array("ratio" => '1.33', "className" => 'tainacan-embed-aspect-4-3'), + // Vertical video and instagram square video support. + array("ratio" => '1.00', "className" => 'tainacan-embed-aspect-1-1' ), + array("ratio" => '0.75', "className" => 'tainacan-embed-aspect-3-4'), + array("ratio" => '0.56', "className" => 'tainacan-embed-aspect-9-16'), + array("ratio" => '0.50', "className" => 'tainacan-embed-aspect-1-2' ) + ); protected function __construct() { @@ -24,7 +37,7 @@ class Embed { /** * Add responsiveness to embeds */ - add_filter('embed_oembed_html', [$this, 'responsive_embed'], 10, 3); + add_filter( 'embed_oembed_html', [$this, 'responsive_embed'], 10, 3); add_action( 'admin_enqueue_scripts', array( &$this, 'add_css' ) ); add_action( 'wp_enqueue_scripts', array( &$this, 'add_css' ) ); @@ -74,7 +87,7 @@ class Embed { ); $args = array_merge($attr, $defaults); - + $dimensions = ''; if ( ! empty( $args['width'] ) && ! empty( $args['height'] ) ) { $dimensions .= sprintf( "width='%s' ", $args['width'] ); @@ -109,7 +122,6 @@ class Embed { } - /** * Responsiveness */ @@ -117,6 +129,69 @@ class Embed { global $TAINACAN_BASE_URL; wp_enqueue_style( 'tainacan-embeds', $TAINACAN_BASE_URL . '/assets/css/tainacan-embeds.css', [], TAINACAN_VERSION ); } + + /** + * Get responsive class based on aspect ratio + * This code is heavily inspired by Gutenberg plugin's "getClassNames" function. + * Check their source code for more details: /packages/block-library/src/embed/util.js + * + * @param {string} html The preview HTML that possibly contains an iframe with width and height set. + * @param {string} existingClassNames Any existing class names. + * @return {string} Deduped class names. + */ + public function add_responsive_wrapper( $html, $existingClassNames = '' ) { + + $height = false; + $width = false; + + $dom = new \DOMDocument(); + $dom->loadHTML($html); + + // If we have a fixed aspect iframe, and it's a responsive embed content. + if ($dom) { + $externalContentElement = $dom->getElementsByTagName('iframe'); + + if (!$externalContentElement) + $externalContentElement = $dom->getElementsByTagName('embed'); + + if (!$externalContentElement) + $externalContentElement = $dom->getElementsByTagName('object'); + + if ($externalContentElement) { + foreach($externalContentElement as $element) { + foreach($element->attributes as $attribute) { + if ($attribute->nodeName == 'width') + $width = $attribute->nodeValue; + if ($attribute->nodeName == 'height') + $height = $attribute->nodeValue; + + if ($attribute->nodeName == 'class' && $attribute->nodeValue == 'wp-embedded-content') { + $height = false; + $width = false; + break; + } + } + } + } + + if ( $height && $width ) { + $aspect_ratio = number_format(( $width / $height ), 2, '.', ""); + + // Given the actual aspect ratio, find the widest ratio to support it. + for ($ratioIndex = 0; $ratioIndex < count(self::$aspect_ratios); $ratioIndex++) { + + $potentialRatio = self::$aspect_ratios[ $ratioIndex ]; + if ( $aspect_ratio >= $potentialRatio['ratio'] ) { + $class = $potentialRatio['className'] . ' tainacan-content-embed tainacan-has-aspect-ratio'; + return '
' . $html . '
'; + } + } + } + } + + return $html; + } + /** * Adds a responsive embed wrapper around oEmbed content * @param string $html The oEmbed markup @@ -126,12 +201,9 @@ class Embed { */ function responsive_embed($html, $url, $attr) { - $class = 'tainacan-embed-container'; + $element = $this->add_responsive_wrapper($html); - if ( !preg_match('/(?:]*)(?:(?:\/>)|(?:>.*?<\/iframe>))/i', $html ) && !preg_match('/(?:]*)(?:(?:\/>)|(?:>.*?<\/object>))/i', $html) && !preg_match('/(?:]*)(?:(?:\/>)|(?:>.*?<\/embed>))/i', $html ) ) - $class .= ' tainacan-embed-without-iframe'; - - return $html !== '' ? '
'.$html.'
' : ''; + return $element; } } \ No newline at end of file diff --git a/src/views/media-component/media-component.scss b/src/views/media-component/media-component.scss index b28f3e12e..1af2fbb86 100644 --- a/src/views/media-component/media-component.scss +++ b/src/views/media-component/media-component.scss @@ -112,26 +112,54 @@ $pswp__include-minimal-style: true !default; .swiper-slide-content { width: 100%; height: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-direction: column; + display: block; + text-align: center; - .tainacan-embed-container { + .tainacan-content-embed { width: 100%; height: auto; + + &.tainacan-has-aspect-ratio { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 2) / 1); /* Default to 2:1 aspect ratio. */ + margin-left: auto; + margin-right: auto; + } + &.tainacan-embed-aspect-21-9 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 21) / 9); + } + &.tainacan-embed-aspect-18-9 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 18) / 9); + } + &.tainacan-embed-aspect-16-9 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 16) / 9); + } + &.tainacan-embed-aspect-4-3 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 4) / 3); + } + &.tainacan-embed-aspect-1-1 { + max-width: var(--tainacan-media-main-carousel-height, 60vh); + } + &.tainacan-embed-aspect-3-4 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 3) / 4); + } + &.tainacan-embed-aspect-9-16 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 9) / 16); + } + &.tainacan-embed-aspect-1-2 { + max-width: calc((var(--tainacan-media-main-carousel-height, 60vh) * 1) / 2); + } } iframe { max-height: var(--tainacan-media-main-carousel-height, 60vh); - width: 100%; max-width: 100%; + margin-left: auto; + margin-right: auto; border: none; display: block; background-image: url('../images/preloader.gif'); background-repeat: no-repeat; background-position: center; } - a:first-of-type, p:first-of-type { z-index: 99; @@ -157,6 +185,10 @@ $pswp__include-minimal-style: true !default; width: auto; max-height: var(--tainacan-media-main-carousel-height, 60vh); } + .twitter-tweet { + margin-left: auto; + margin-right: auto; + } } } .tainacan-media-component__swiper-thumbs { @@ -304,34 +336,68 @@ $pswp__include-minimal-style: true !default; .attachment-without-image { width: 100%; - height: 100%; + height: calc(100% - 44px); display: flex; - align-items: center; justify-content: center; + align-items: center; + text-align: center; + padding: 44px; + margin-top: 22px; - &.tainacan-embed-container:not(.tainacan-embed-without-iframe) { - padding: 0px; - } - .tainacan-embed-container .twitter-tweet { - width: 100vw !important; + &>iframe:not(.wp-embedded-content) { + width: 90vw; + height: 90vh; + border: none; + margin: 44px; + display: block; + background-image: url('../images/preloader.gif'); + background-repeat: no-repeat; + background-position: center; } } - - iframe { - padding: 44px; - min-height: 90vh; - max-height: 90vh; - height: 100%; - width: 100%; - max-width: 100%; - margin: 0 auto; + // PDFs file that come from document instead of attachments + .pswp__zoom-wrap>iframe#iframePDF { + width: 90vw; + height: 90vh; border: none; + margin: 44px auto; display: block; background-image: url('../images/preloader.gif'); background-repeat: no-repeat; background-position: center; } + .tainacan-content-embed { + width: 100%; + height: auto; + + &.tainacan-has-aspect-ratio { + max-width: calc((90vh * 2) / 1); /* Default to 2:1 aspect ratio. */ + margin-left: auto; + margin-right: auto; + } + &.tainacan-embed-aspect-21-9 { + max-width: calc((90vh * 21) / 9); + } + &.tainacan-embed-aspect-18-9 { + max-width: calc((90vh * 18) / 9); + } + &.tainacan-embed-aspect-16-9 { + max-width: calc((90vh * 16) / 9); + } + &.tainacan-embed-aspect-4-3 { + max-width: calc((90vh * 4) / 3); + } + &.tainacan-embed-aspect-1-1 { + max-width: 90vh; + } + &.tainacan-embed-aspect-9-16 { + max-width: calc((90vh * 9) / 16); + } + &.tainacan-embed-aspect-1-2 { + max-width: calc((90vh * 1) / 2); + } + } a:first-of-type, p:first-of-type , article:first-of-type {