From 2641608f814cc4f08ad73d84c20278879f7fccbe Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Fri, 18 Mar 2022 15:21:32 -0300 Subject: [PATCH] A few css adjustments to the gallery component. --- .../tainacan-gutenberg-block-item-gallery.css | 20 ++++++++++------- ...nacan-gutenberg-block-item-gallery.css.map | 2 +- .../class-tainacan-theme-helper.php | 14 ++++++++++-- .../blocks/item-gallery/style.scss | 22 ++++++++++++------- .../blocks/item-gallery/theme.js | 2 +- 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/assets/css/tainacan-gutenberg-block-item-gallery.css b/src/assets/css/tainacan-gutenberg-block-item-gallery.css index 1b30f1311..93008e5a7 100644 --- a/src/assets/css/tainacan-gutenberg-block-item-gallery.css +++ b/src/assets/css/tainacan-gutenberg-block-item-gallery.css @@ -366,28 +366,28 @@ justify-content: center; } .tainacan-photoswipe-layer .pswp__container .attachment-without-image { width: 100%; - height: calc(100% - 44px); + height: calc(100% - 60px); display: flex; justify-content: center; align-items: center; text-align: center; - padding: 44px; - margin-top: 22px; - margin-bottom: 22px; } + padding: 60px; + margin-top: 30px; + margin-bottom: 30px; } .tainacan-photoswipe-layer .pswp__container .attachment-without-image > iframe:not(.wp-embedded-content) { width: 90vw; - height: 90vh; + height: calc(100vh - 120px); border: none; - margin: 44px; + margin: 60px; 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; + height: calc(100vh - 120px); border: none; - margin: 44px auto; + margin: 60px auto; display: block; background-image: url("../images/preloader.gif"); background-repeat: no-repeat; @@ -418,6 +418,8 @@ 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 .pswp__content > .tainacan-content-embed:not(.attachment-without-image) { + margin-top: 60px; } .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 { @@ -435,5 +437,7 @@ .tainacan-photoswipe-layer .pswp__container video { min-height: 56px; max-width: 80%; } + .tainacan-photoswipe-layer .pswp__container iframe { + border: none; } /*# sourceMappingURL=tainacan-gutenberg-block-item-gallery.css.map */ diff --git a/src/assets/css/tainacan-gutenberg-block-item-gallery.css.map b/src/assets/css/tainacan-gutenberg-block-item-gallery.css.map index a2cc18762..adeb61dda 100644 --- a/src/assets/css/tainacan-gutenberg-block-item-gallery.css.map +++ b/src/assets/css/tainacan-gutenberg-block-item-gallery.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAEQ;;0EAEoB;EAChB,MAAM,EAAE,sBAAsB;AAGtC,6CAAiB;EACb,KAAK,EAAE,IAAI;EACX,SAAS,EAAE,QAAQ;EACnB,UAAU,EAAE,MAAM;EAClB,KAAK,EAAE,OAAO;EACd,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,MAAM;EACd,OAAO,EAAE,eAAe;;AAGhC,yBAA0B;EACtB,oBAAoB,CAAC,mCAAmC;EACxD,wBAAwB,CAAC,KAAK;EAC9B,+BAA+B,CAAC,qCAAqC;EACrE,2BAA2B,CAAC,8CAA8C;EAC1E,qCAAqC,CAAC,KAAK;EAC3C,oCAAoC,CAAC,KAAK;EAC1C,sCAAsC,CAAC,KAAK;EAC5C,0CAA0C,CAAC,MAAM;EAEjD,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,KAAK;EACd,gBAAgB,EAAE,6CAA6C;EAC/D,UAAU,EAAE,UAAU;EAEtB,yDAAkC;IAC9B,KAAK,EAAE,IAAI;EAGf;;iDAEsB;IAClB,UAAU,EAAE,UAAU;;AAI9B,6DAA6D;AAGzD;;;2GACmE;EAC/D,OAAO,EAAE,UAAU;AAEvB;;;+FACuD;EACnD,WAAW,EAAE,eAAe;EAC5B,OAAO,EAAE,GAAG;EAC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AS,EAAE,GAAG;IAElB,iDAAM;MACF,UAAU,EAAE,IAAI;MAChB,SAAS,EAAE,GAAG;IAElB,kDAAO;MACH,MAAM,EAAE,IAAI", "sources": ["../../views/gutenberg-blocks/blocks/item-gallery/style.scss"], "names": [], "file": "tainacan-gutenberg-block-item-gallery.css" diff --git a/src/classes/theme-helper/class-tainacan-theme-helper.php b/src/classes/theme-helper/class-tainacan-theme-helper.php index a3f9be2b6..f3b6a8d00 100644 --- a/src/classes/theme-helper/class-tainacan-theme-helper.php +++ b/src/classes/theme-helper/class-tainacan-theme-helper.php @@ -1249,7 +1249,12 @@ class Theme_Helper { sprintf('%s', tainacan_the_item_document_download_link($item_id)) : ''), 'media_content' => tainacan_get_the_document($item_id), - 'media_content_full' => $open_lightbox_on_click ? ( $document_type === 'attachment' ? tainacan_get_the_document($item_id, 'full') : sprintf('
%s
', tainacan_get_the_document($item_id, 'full')) ) : '', + 'media_content_full' => $open_lightbox_on_click ? + ( + $document_type === 'attachment' ? + tainacan_get_the_document($item_id, 'full') : + sprintf('
%s
', tainacan_get_the_document($item_id, 'full')) + ) : '', 'media_title' => $document_type === 'attachment' ? get_the_title(tainacan_get_the_document_raw($item_id)) : '', 'media_description' => $document_type === 'attachment' ? $document_description : '', 'media_caption' => $document_type === 'attachment' ? wp_get_attachment_caption(tainacan_get_the_document_raw($item_id)) : '', @@ -1268,7 +1273,12 @@ class Theme_Helper { sprintf('%s', tainacan_the_item_attachment_download_link($attachment->ID)) : ''), 'media_content' => tainacan_get_attachment_as_html($attachment->ID, $item_id), - 'media_content_full' => $open_lightbox_on_click ? ( $is_attachment_an_image ? wp_get_attachment_image( $attachment->ID, 'full', false) : sprintf('
', $block_id, tainacan_get_attachment_html_url($attachment->ID)) ) : '', + 'media_content_full' => $open_lightbox_on_click ? + ( + $is_attachment_an_image ? + wp_get_attachment_image( $attachment->ID, 'full', false) : + sprintf('
', $block_id, tainacan_get_attachment_html_url($attachment->ID)) + ) : '', 'media_title' => $attachment->post_title, 'media_description' => $attachment->post_content, 'media_caption' => $attachment->post_excerpt, diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/style.scss b/src/views/gutenberg-blocks/blocks/item-gallery/style.scss index 595ae7a73..0201f3ef7 100644 --- a/src/views/gutenberg-blocks/blocks/item-gallery/style.scss +++ b/src/views/gutenberg-blocks/blocks/item-gallery/style.scss @@ -477,20 +477,20 @@ .attachment-without-image { width: 100%; - height: calc(100% - 44px); + height: calc(100% - 60px); display: flex; justify-content: center; align-items: center; text-align: center; - padding: 44px; - margin-top: 22px; - margin-bottom: 22px; + padding: 60px; + margin-top: 30px; + margin-bottom: 30px; &>iframe:not(.wp-embedded-content) { width: 90vw; - height: 90vh; + height: calc(100vh - 120px); border: none; - margin: 44px; + margin: 60px; display: block; background-image: url('../images/preloader.gif'); background-repeat: no-repeat; @@ -500,9 +500,9 @@ // PDFs file that come from document instead of attachments .pswp__zoom-wrap>iframe#iframePDF { width: 90vw; - height: 90vh; + height: calc(100vh - 120px); border: none; - margin: 44px auto; + margin: 60px auto; display: block; background-image: url('../images/preloader.gif'); background-repeat: no-repeat; @@ -545,6 +545,9 @@ max-width: calc((90vh * 1) / 2); } } + .pswp__content>.tainacan-content-embed:not(.attachment-without-image) { + margin-top: 60px; + } a:first-of-type, p:first-of-type , article:first-of-type { @@ -565,5 +568,8 @@ min-height: 56px; max-width: 80%; } + iframe { + border: none; + } } } \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/theme.js b/src/views/gutenberg-blocks/blocks/item-gallery/theme.js index 817e2198e..a0bf89eda 100644 --- a/src/views/gutenberg-blocks/blocks/item-gallery/theme.js +++ b/src/views/gutenberg-blocks/blocks/item-gallery/theme.js @@ -232,7 +232,7 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery { !self.options.hide_media_name ) innerHTML += item.title.name.innerHTML; - el.innerHTML += innerHTML; + el.innerHTML = innerHTML; }); } });