diff --git a/src/assets/css/tainacan-gutenberg-block-item-gallery.css b/src/assets/css/tainacan-gutenberg-block-item-gallery.css index 131dc0862..daca13344 100644 --- a/src/assets/css/tainacan-gutenberg-block-item-gallery.css +++ b/src/assets/css/tainacan-gutenberg-block-item-gallery.css @@ -609,34 +609,49 @@ a.pswp__share--download:hover { .pswp--minimal--dark .pswp__top-bar { background: none; } +.item-gallery-edit-container .tainacan-media-component .swiper-slide, +.item-gallery-edit-container .tainacan-media-component .swiper-button-prev, +.item-gallery-edit-container .tainacan-media-component .swiper-button-next { + cursor: not-allowed !important; } +.item-gallery-edit-container .preview-warning { + width: 100%; + font-size: 0.875rem; + font-style: italic; + color: inherit; + text-align: center; + margin: 0 auto; + padding: 8px 2px 2px 2px; } + .tainacan-media-component { --swiper-theme-color: var(--tainacan-secondary, #298596); --swiper-navigation-size: 44px; + --tainacan-media-metadata-color: var(--tainacan-label-color, #454647); --tainacan-media-background: var(--tainacan-background-color, transparent); --tainacan-media-main-carousel-height: 60vh; --tainacan-media-main-carousel-width: 100%; --tainacan-media-thumbs-carousel-width: 100%; --tainacan-media-thumbs-carousel-item-size: 136px; - width: 100%; height: auto; display: block; background-color: var(--tainacan-media-background, transparent); box-sizing: border-box; } + .tainacan-media-component:not(.alignfull):not(.alignwide) { + width: 100%; } .tainacan-media-component .swiper-slide, .tainacan-media-component .swiper-slide::after, .tainacan-media-component .swiper-slide::before { box-sizing: border-box; } /* Style valid for both cases of carousel, main and thumbs */ -.tainacan-media-component__swiper-main .swiper-button-prev::after, -.tainacan-media-component__swiper-main .swiper-container-rtl .swiper-button-next::after, -.tainacan-media-component__swiper-thumbs .swiper-button-prev::after, -.tainacan-media-component__swiper-thumbs .swiper-container-rtl .swiper-button-next::after { +.tainacan-media-component__swiper-main .swiper-button-prev:not(.swiper-button-has-svg)::after, +.tainacan-media-component__swiper-main .swiper-container-rtl .swiper-button-next:not(.swiper-button-has-svg)::after, +.tainacan-media-component__swiper-thumbs .swiper-button-prev:not(.swiper-button-has-svg)::after, +.tainacan-media-component__swiper-thumbs .swiper-container-rtl .swiper-button-next:not(.swiper-button-has-svg)::after { content: 'previous'; } -.tainacan-media-component__swiper-main .swiper-button-next::after, -.tainacan-media-component__swiper-main .swiper-button-prev::after, -.tainacan-media-component__swiper-thumbs .swiper-button-next::after, -.tainacan-media-component__swiper-thumbs .swiper-button-prev::after { +.tainacan-media-component__swiper-main .swiper-button-next:not(.swiper-button-has-svg)::after, +.tainacan-media-component__swiper-main .swiper-button-prev:not(.swiper-button-has-svg)::after, +.tainacan-media-component__swiper-thumbs .swiper-button-next:not(.swiper-button-has-svg)::after, +.tainacan-media-component__swiper-thumbs .swiper-button-prev:not(.swiper-button-has-svg)::after { font-family: "TainacanIcons"; opacity: 0.7; transition: opacity ease 0.2s; } @@ -645,6 +660,18 @@ a.pswp__share--download:hover { .tainacan-media-component__swiper-thumbs:hover .swiper-button-next::after, .tainacan-media-component__swiper-thumbs:hover .swiper-button-prev::after { opacity: 1; } +.tainacan-media-component__swiper-main .swiper-button-next.swiper-button-has-svg::after, +.tainacan-media-component__swiper-main .swiper-button-prev.swiper-button-has-svg::after, +.tainacan-media-component__swiper-thumbs .swiper-button-next.swiper-button-has-svg::after, +.tainacan-media-component__swiper-thumbs .swiper-button-prev.swiper-button-has-svg::after { + display: none; } +.tainacan-media-component__swiper-main .swiper-button-next.swiper-button-has-svg svg, +.tainacan-media-component__swiper-main .swiper-button-prev.swiper-button-has-svg svg, +.tainacan-media-component__swiper-thumbs .swiper-button-next.swiper-button-has-svg svg, +.tainacan-media-component__swiper-thumbs .swiper-button-prev.swiper-button-has-svg svg { + min-width: calc(var(--swiper-navigation-size) * 1.35); + min-height: calc(var(--swiper-navigation-size) * 1.35); + fill: currentColor; } .tainacan-media-component__swiper-main ul.swiper-wrapper, .tainacan-media-component__swiper-thumbs ul.swiper-wrapper { list-style: none; @@ -689,16 +716,21 @@ a.pswp__share--download:hover { .tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-name.hide-description.hide-caption br { display: none; visibility: hidden; } + .tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata.hide-name.hide-description.hide-caption { + display: none; + visibility: hidden; } .tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata__name { font-size: 1em; font-weight: bold; - color: var(--tainacan-label-color, #454647); } + color: var(--tainacan-media-metadata-color, #454647); + opacity: 0.75; } .tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata__caption { font-size: 0.9375em; - color: var(--tainacan-input-color, #1d1d1d); } + color: var(--tainacan-media-metadata-color, #454647); } .tainacan-media-component__swiper-main li.swiper-slide .swiper-slide-metadata__caption { font-size: 0.875em; - color: var(--tainacan-info-color, #555758); } + color: var(--tainacan-media-metadata-color, #454647); + opacity: 0.85; } .tainacan-media-component__swiper-main .swiper-slide-content { width: 100%; height: 100%; @@ -760,7 +792,9 @@ a.pswp__share--download:hover { max-height: var(--tainacan-media-main-carousel-height, 60vh); } .tainacan-media-component__swiper-main .swiper-slide-content img { width: auto; - max-height: var(--tainacan-media-main-carousel-height, 60vh); } + max-height: var(--tainacan-media-main-carousel-height, 60vh); + max-width: 100%; + height: auto; } .tainacan-media-component__swiper-main .swiper-slide-content .twitter-tweet { margin-left: auto; margin-right: auto; } @@ -806,13 +840,15 @@ a.pswp__share--download:hover { border-bottom-color: var(--swiper-theme-color, #298596); } .tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata__name { font-size: 1em; - color: var(--tainacan-label-color, #454647); } + color: var(--tainacan-media-metadata-color, #454647); + opacity: 0.75; } .tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata__caption { font-size: 0.9375em; - color: var(--tainacan-input-color, #1d1d1d); } + color: var(--tainacan-media-metadata-color, #454647); } .tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata__caption { font-size: 0.875em; - color: var(--tainacan-info-color, #555758); } + color: var(---tainacan-media-metadata-color, #454647); + opacity: 0.85; } .tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata { text-align: center; display: block; @@ -829,6 +865,9 @@ a.pswp__share--download:hover { .tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata.hide-name.hide-description.hide-caption br { display: none; visibility: hidden; } + .tainacan-media-component__swiper-thumbs li.swiper-slide .swiper-slide-metadata.hide-name.hide-description.hide-caption { + display: none; + visibility: hidden; } .tainacan-media-component__swiper-thumbs li.swiper-slide a { width: 100%; max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px); 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 0d5606fa0..28e5b23e3 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": "AAAA,2EAA2E;AAE3E;;EAEE;AAOF,uBAAuB;AACvB,KAAM;EACL,OAAO,EAAE,IAAI;EACb,QAAQ,EAAC,QAAQ;EACjB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,IAAI,EAAC,CAAC;EACN,GAAG,EAAC,CAAC;EACL,QAAQ,EAAE,MAAM;EAChB,gBAAgB,EAAE,IAAI;EACtB,YAAY,EAAE,IAAI;EAClB,OAAO,ECjBa,OAAO;EDkB3B,wBAAwB,EAAE,IAAI;EAC9B,8EAA8E;EAC9E,2BAA2B,EAAE,MAAM;EACnC,OAAO,EAAE,IAAI;EAGZ,OAAE;IACD,UAAU,EAAE,UAAU;EAIxB,SAAI;IACH,SAAS,EAAE,IAAI;;AAIjB,kEAAkE;AAClE,sBAAuB;EACtB,oGAAoG;EACpG,OAAO,EAAE,KAAK;EACd,WAAW,EAAC,OAAO;EACnB,+BAA+B;EAC/B,UAAU,EAAE,2CAAqE;;AAGlF,WAAY;EACX,OAAO,EAAE,KAAK;;AAGf,8BAA+B;EAC9B,uBAAuB;EACvB,MAAM,EAAE,e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AE,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/gutenberg-blocks/blocks/item-gallery/style.scss","../../../node_modules/photoswipe/src/css/default-skin/default-skin.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 2867d94c6..daac2a508 100644 --- a/src/classes/theme-helper/class-tainacan-theme-helper.php +++ b/src/classes/theme-helper/class-tainacan-theme-helper.php @@ -1104,5 +1104,236 @@ class Theme_Helper { $args = wp_parse_args($args, [ 'items_list_layout' => 'carousel' ]); return $this->get_tainacan_related_items_list($args); } + + /** + * Returns an item gallery, containing document, + * attachments and other information in a slider, carousel and lightbox + * + * @param array $args { + * Optional. Array of arguments. + * @type string $item_id The Item ID + * @type string $blockId A unique identifier for the gallery, will be generated automatically if not provided, + * @type array $layoutElements Array of elements present in the gallery. Possible values are 'main' and 'carousel' + * @type array $mediaSources Array of sources for the gallery. Possible values are 'document' and 'attachments' + * @type bool $hideFileNameMain Hides the Main slider file name + * @type bool $hideFileCaptionMain Hides the Main slider file caption + * @type bool $hideFileDescriptionMain Hides the Main slider file description + * @type bool $hideFileNameThumbnails Hides the Thumbnails carousel file name + * @type bool $hideFileCaptionThumbnails Hides the Thumbnails carousel file caption + * @type bool $hideFileDescriptionThumbnails Hides the Thumbnails carousel file description + * @type bool $openLightboxOnClick Enables the behaviour of opening a lightbox with zoom when clicking on the media item + * @type bool $showDownloadButtonMain Displays a download button bellow the Main slider + * @return string The HTML div to be used for rendering the item galery component + */ + public function get_tainacan_item_gallery($args = []) { + + $defaults = array( + 'blockId' => uniqid(), + 'layoutElements' => array( 'main' => true, 'thumbnails' => true ), + 'mediaSources' => array( 'document' => true, 'attachments' => true, 'metadata' => false), + 'hideFileNameMain' => true, + 'hideFileCaptionMain' => false, + 'hideFileDescriptionMain' => true, + 'hideFileNameThumbnails' => true, + 'hideFileCaptionThumbnails' => true, + 'hideFileDescriptionThumbnails' => true, + 'openLightboxOnClick' => true, + 'showDownloadButtonMain' => true + ); + $args = wp_parse_args($args, $defaults); + + // Gets the current Item. This way, the function can be used in the loop without needing to pass it + $item = isset($args['itemId']) ? $this->tainacan_get_item($args['itemId']) : $this->tainacan_get_item(); + if (!$item) + return; + + // Gets options from block attributes + $item_id = $item->get_id(); + $block_id = $args['blockId']; + $layout_elements = $args['layoutElements']; + $media_sources = $args['mediaSources']; + $hide_file_name_main = $args['hideFileNameMain']; + $hide_file_caption_main = $args['hideFileCaptionMain']; + $hide_file_description_main = $args['hideFileDescriptionMain']; + $hide_file_name_thumbnails = $args['hideFileNameThumbnails']; + $hide_file_caption_thumbnails = $args['hideFileCaptionThumbnails']; + $hide_file_description_thumbnails = $args['hideFileDescriptionThumbnails']; + $open_lightbox_on_click = $args['openLightboxOnClick']; + $show_download_button_main = $args['showDownloadButtonMain']; + + // Prefils arrays with proper values to avoid messsy IFs + $layout_elements = array( + 'main' => (isset($layout_elements['main']) && ($layout_elements['main'] === true || $layout_elements['main'] == 'true')) ? true : false, + 'thumbnails' => (isset($layout_elements['thumbnails']) && ($layout_elements['thumbnails'] === true || $layout_elements['thumbnails'] == 'true')) ? true : false + ); + $media_sources = array( + 'document' => (isset($media_sources['document']) && ($media_sources['document'] === true || $media_sources['document'] == 'true')) ? true : false, + 'attachments' => (isset($media_sources['attachments']) && ($media_sources['attachments'] === true || $media_sources['attachments'] == 'true')) ? true : false, + 'metadata' => (isset($media_sources['metadata']) && ($media_sources['metadata'] === true || $media_sources['metadata'] == 'true')) ? true : false + ); + + $media_items_main = array(); + $media_items_thumbnails = array(); + + if ( $media_sources['attachments'] ) + $attachments = tainacan_get_the_attachments(null, $item_id); + + if ( $layout_elements['main'] ) { + + $class_slide_metadata = ''; + if ($hide_file_name_main) + $class_slide_metadata .= ' hide-name'; + if ($hide_file_description_main) + $class_slide_metadata .= ' hide-description'; + if ($hide_file_caption_main) + $class_slide_metadata .= ' hide-caption'; + + if ( $media_sources['document'] && !empty(tainacan_get_the_document($item_id)) ) { + $is_document_type_attachment = tainacan_get_the_document_type($item_id) === 'attachment'; + + // Document description is a bit more tricky + if ($is_document_type_attachment) { + $attachment = get_post(tainacan_get_the_document_raw($item_id)); + $document_description = ($attachment instanceof WP_Post) ? $attachment->post_content : ''; + } + + $media_items_main[] = + tainacan_get_the_media_component_slide(array( + 'after_slide_metadata' => (( $show_download_button_main && tainacan_the_item_document_download_link($item_id) != '' ) ? + 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 ? ( $is_document_type_attachment ? tainacan_get_the_document($item_id, 'full') : sprintf('
%s
', tainacan_get_the_document($item_id, 'full')) ) : '', + 'media_title' => $is_document_type_attachment ? get_the_title(tainacan_get_the_document_raw($item_id)) : '', + 'media_description' => $is_document_type_attachment ? $document_description : '', + 'media_caption' => $is_document_type_attachment ? wp_get_attachment_caption(tainacan_get_the_document_raw($item_id)) : '', + 'media_type' => tainacan_get_the_document_type($item_id), + 'class_slide_metadata' => $class_slide_metadata + )); + } + + if ( $media_sources['attachments'] ) { + foreach ( $attachments as $attachment ) { + $media_items_main[] = + tainacan_get_the_media_component_slide(array( + 'after_slide_metadata' => (( $show_download_button_main && tainacan_the_item_attachment_download_link($attachment->ID) != '' ) ? + 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 ? ( wp_attachment_is('image', $attachment->ID) ? 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, + 'media_type' => $attachment->post_mime_type, + 'class_slide_metadata' => $class_slide_metadata + )); + } + } + } + + if ( $layout_elements['thumbnails'] ) { + + $class_slide_metadata = ''; + if ($hide_file_name_thumbnails) + $class_slide_metadata .= ' hide-name'; + if ($hide_file_description_thumbnails) + $class_slide_metadata .= ' hide-description'; + if ($hide_file_caption_thumbnails) + $class_slide_metadata .= ' hide-caption'; + + if ( $media_sources['document'] && !empty(tainacan_get_the_document($item_id)) ) { + $is_document_type_attachment = tainacan_get_the_document_type($item_id) === 'attachment'; + $media_items_thumbnails[] = + tainacan_get_the_media_component_slide(array( + 'media_content' => get_the_post_thumbnail(null, 'tainacan-medium'), + 'media_content_full' => $open_lightbox_on_click ? ($is_document_type_attachment ? tainacan_get_the_document($item_id, 'full') : sprintf('
%s
', tainacan_get_the_document($item_id, 'full')) ) : '', + 'media_title' => $is_document_type_attachment ? get_the_title(tainacan_get_the_document_raw($item_id)) : '', + 'media_description' => $is_document_type_attachment ? get_the_content(null, false, tainacan_get_the_document_raw($item_id)) : '', + 'media_caption' => $is_document_type_attachment ? wp_get_attachment_caption(tainacan_get_the_document_raw($item_id)) : '', + 'media_type' => tainacan_get_the_document_type($item_id), + 'class_slide_metadata' => $class_slide_metadata + )); + } + + if ( $media_sources['attachments'] ) { + foreach ( $attachments as $attachment ) { + $media_items_thumbnails[] = + tainacan_get_the_media_component_slide(array( + 'media_content' => wp_get_attachment_image( $attachment->ID, 'tainacan-medium', false ), + 'media_content_full' => ( $open_lightbox_on_click && !$layout_elements['main'] ) ? ( wp_attachment_is('image', $attachment->ID) ? 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, + 'media_type' => $attachment->post_mime_type, + 'class_slide_metadata' => $class_slide_metadata + )); + } + } + } + + $block_custom_css = ''; + + // Text color. First we check for custom preset colors, then actual values + $block_custom_css .= isset($args['textColor']) ? sprintf('--tainacan-media-metadata-color: var(--wp--preset--color--%s);', $args['textColor']) : ''; + $block_custom_css .= isset($args['style']['color']['text']) ? sprintf('--tainacan-media-metadata-color: %s;', $args['style']['color']['text']) : ''; + + // Background color. First we check for custom preset colors, then actual values + $block_custom_css .= isset($args['backgroundColor']) ? sprintf('--tainacan-media-background: var(--wp--preset--color--%s);', $args['backgroundColor']) : ''; + $block_custom_css .= isset($args['style']['color']['background']) ? sprintf('--tainacan-media-background: %s;', $args['style']['color']['background']) : ''; + + // Link color, if enabled. Firts we check for custom preset colors, then actual values. + $block_custom_css .= isset($args['linkColor']) ? sprintf('--swiper-theme-color: var(--wp--preset--color--%s);', $args['linkColor']) : ''; + if ( isset($args['style']['elements']['link']['color']['text']) ) { + $link_color = $args['style']['elements']['link']['color']['text']; + if ( strpos( $link_color, 'var:' ) !== false ) { + $link_color = str_replace('|', '--', $link_color); + $link_color = str_replace('var:', 'var(--wp--', $link_color) . ')'; + } + $block_custom_css .= sprintf('--swiper-theme-color: %s;', $link_color); + } + + // Other values are obtained directly from the attributes + $block_custom_css .= (isset($args['arrowsSize']) && is_numeric($args['arrowsSize'])) ? sprintf('--swiper-navigation-size: %spx;', $args['arrowsSize']) : ''; + $block_custom_css .= (isset($args['mainSliderHeight']) && is_numeric($args['mainSliderHeight'])) ? sprintf('--tainacan-media-main-carousel-height: %svh;', $args['mainSliderHeight']) : ''; + $block_custom_css .= (isset($args['mainSliderWidth']) && is_numeric($args['mainSliderWidth'])) ? sprintf('--tainacan-media-main-carousel-width: %s%%;', $args['mainSliderWidth']) : ''; + $block_custom_css .= (isset($args['thumbnailsCarouselWidth']) && is_numeric($args['thumbnailsCarouselWidth'])) ? sprintf('--tainacan-media-thumbs-carousel-width: %s%%;', $args['thumbnailsCarouselWidth']) : ''; + $block_custom_css .= (isset($args['thumbnailsCarouselItemSize']) && is_numeric($args['thumbnailsCarouselItemSize'])) ? sprintf('--tainacan-media-thumbs-carousel-item-size: %spx;', $args['thumbnailsCarouselItemSize']) : ''; + + $wrapper_attributes = get_block_wrapper_attributes( + array( + 'style' => $block_custom_css, + 'class' => 'tainacan-media-component' + ) + ); + + return tainacan_get_the_media_component( + 'tainacan-item-gallery-block_id-' . $block_id, + $layout_elements['thumbnails'] ? $media_items_thumbnails : null, + $layout_elements['main'] ? $media_items_main : null, + array( + 'wrapper_attributes' => $wrapper_attributes, + 'class_main_div' => '', + 'class_thumbs_div' => '', + 'swiper_main_options' => $layout_elements['main'] ? array( + 'navigation' => array( + 'nextEl' => sprintf('.swiper-navigation-next_tainacan-item-gallery-block_id-%s-main', $block_id), + 'prevEl' => sprintf('.swiper-navigation-prev_tainacan-item-gallery-block_id-%s-main', $block_id), + 'preloadImages' => false, + 'lazy' => true + ) + ) : '', + 'swiper_thumbs_options' => ( $layout_elements['thumbnails'] && !$layout_elements['main'] ) ? array( + 'navigation' => array( + 'nextEl' => sprintf('.swiper-navigation-next_tainacan-item-gallery-block_id-%s-thumbs', $block_id), + 'prevEl' => sprintf('.swiper-navigation-prev_tainacan-item-gallery-block_id-%s-thumbs', $block_id), + 'preloadImages' => false, + 'lazy' => true + ) + ) : '', + 'swiper_arrows_as_svg' => true, + 'disable_lightbox' => !$open_lightbox_on_click, + ) + ); + } } diff --git a/src/classes/theme-helper/template-tags.php b/src/classes/theme-helper/template-tags.php index 1308d9995..9e977e7e3 100644 --- a/src/classes/theme-helper/template-tags.php +++ b/src/classes/theme-helper/template-tags.php @@ -278,23 +278,28 @@ function tainacan_the_media_component($media_id, $media_items_thumbs, $media_ite * @param array $media_items_main Array of media items to be rendered inside main, bigger the carousel. Default to empty array * @param array|string $args { * Optional. Array of arguments. - * @type string before_main_div String to be added before the main gallery div - * @type string after_main_div String to be added after the main gallery div - * @type string before_thumbs_div String to be added before the thumbs gallery div - * @type string after_thumbs_div String to be added after the thumbs gallery div - * @type string before_main_ul String to be added before the main gallery ul - * @type string after_main_ul String to be added after the main gallery ul - * @type string before_thumbs_ul String to be added before the thumbs gallery ul - * @type string after_thumbs_ul String to be added after the thumbs gallery ul - * @type string class_main_div Class to be added to the main gallery div - * @type string class_main_ul Class to be added to the main gallery ul - * @type string class_main_li Class to be added to the main gallery li - * @type string class_thumbs_div Class to be added to the thumbs gallery div - * @type string class_thumbs_ul Class to be added to the thumbs gallery ul - * @type string class_thumbs_li Class to be added to the thumbs gallery li - * @type array swiper_main_options Object with SwiperJS options for the main gallery - * @type array swiper_thumbs_options Object with SwiperJS options for the thumb gallery - * @type bool show_share_button Shows share button on lightbox + * @type string wrapper_attributes String containing attrs (style, class) for the wrapper div. If used, remember to pass class="tainacan-media-component" + * @type string before_main_div String to be added before the main gallery div + * @type string after_main_div String to be added after the main gallery div + * @type string before_thumbs_div String to be added before the thumbs gallery div + * @type string after_thumbs_div String to be added after the thumbs gallery div + * @type string before_main_ul String to be added before the main gallery ul + * @type string after_main_ul String to be added after the main gallery ul + * @type string before_thumbs_ul String to be added before the thumbs gallery ul + * @type string after_thumbs_ul String to be added after the thumbs gallery ul + * @type string class_main_div Class to be added to the main gallery div + * @type string class_main_ul Class to be added to the main gallery ul + * @type string class_main_li Class to be added to the main gallery li + * @type string class_thumbs_div Class to be added to the thumbs gallery div + * @type string class_thumbs_ul Class to be added to the thumbs gallery ul + * @type string class_thumbs_li Class to be added to the thumbs gallery li + * @type array swiper_main_options Object with SwiperJS options for the main gallery + * @type array swiper_thumbs_options Object with SwiperJS options for the thumb gallery + * @type bool swiper_arrows_as_svg Uses SVG icons insetead of Tainacan Icon font for navigation arrows + * @type string swiper_arrow_next_custom_svg Custom SVG icon to render next navigation arrow + * @type string swiper_arrow_prev_custom_svg Custom SVG icon to render previous navigation arrow + * @type bool disable_lightbox Do not open Photoswiper layer on click + * @type bool show_share_button Shows share button on lightbox * } * @return string */ @@ -308,6 +313,7 @@ function tainacan_get_the_media_component( global $TAINACAN_BASE_URL; $args = array_merge(array( + 'wrapper_attributes' => 'class="tainacan-media-component"', 'before_main_div' => '', 'after_main_div' => '', 'before_thumbs_div' => '', @@ -324,6 +330,10 @@ function tainacan_get_the_media_component( 'class_thumbs_li' => '', 'swiper_main_options' => [], 'swiper_thumbs_options' => [], + 'swiper_arrows_as_svg' => false, + 'swiper_arrow_next_custom_svg' => '', + 'swiper_arrow_prev_custom_svg' => '', + 'disable_lightbox' => false, 'show_share_button' => false ), $args); @@ -333,11 +343,16 @@ function tainacan_get_the_media_component( $args['media_thumbs_id'] = $media_id . '-thumbs'; $args['media_id'] = $media_id; + ob_start(); + if ( $args['has_media_main'] || $args['has_media_thumbs'] ) : + // Modal lightbox layer for rendering photoswipe - add_action('wp_footer', 'tainacan_get_the_media_modal_layer'); + if (!$args['disable_lightbox']) + add_action('wp_footer', 'tainacan_get_the_media_modal_layer'); wp_enqueue_style( 'tainacan-media-component', $TAINACAN_BASE_URL . '/assets/css/tainacan-gutenberg-block-item-gallery.css', array(), TAINACAN_VERSION); + ?> -
+
data-module='item-gallery'> @@ -376,8 +391,30 @@ function tainacan_get_the_media_component( -
-
+
+ + + + + + + + + + +
+
+ + + + + + + + + + +
@@ -407,8 +444,30 @@ function tainacan_get_the_media_component( -
-
+
+ + + + + + + + + + +
+
+ + + + + + + + + + +
@@ -422,7 +481,12 @@ function tainacan_get_the_media_component( -get_tainacan_item_gallery($args); } \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/carousel-collections-list/edit.js b/src/views/gutenberg-blocks/blocks/carousel-collections-list/edit.js index 9b27923ac..87c59862f 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-collections-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/carousel-collections-list/edit.js @@ -9,7 +9,7 @@ import tainacan from '../../js/axios.js'; import axios from 'axios'; import qs from 'qs'; import { ThumbnailHelperFunctions } from '../../../admin/js/utilities.js'; -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; import 'swiper/css/swiper.min.css'; export default function ({ attributes, setAttributes, className, isSelected, clientId }) { diff --git a/src/views/gutenberg-blocks/blocks/carousel-collections-list/index.js b/src/views/gutenberg-blocks/blocks/carousel-collections-list/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-collections-list/index.js +++ b/src/views/gutenberg-blocks/blocks/carousel-collections-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/carousel-items-list/edit.js b/src/views/gutenberg-blocks/blocks/carousel-items-list/edit.js index 5c95c64c8..30cf59da2 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-items-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/carousel-items-list/edit.js @@ -9,8 +9,8 @@ import tainacan from '../../js/axios.js'; import axios from 'axios'; import qs from 'qs'; import { ThumbnailHelperFunctions } from '../../../admin/js/utilities.js'; -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; -import TainacanBlocksCompatColorPicker from '../../js/tainacan-blocks-compat-colorpicker.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatColorPicker from '../../js/compatibility/tainacan-blocks-compat-colorpicker.js'; import 'swiper/css/swiper.min.css'; export default function({ attributes, setAttributes, className, isSelected, clientId }){ diff --git a/src/views/gutenberg-blocks/blocks/carousel-items-list/index.js b/src/views/gutenberg-blocks/blocks/carousel-items-list/index.js index 39540ea88..a1408e341 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-items-list/index.js +++ b/src/views/gutenberg-blocks/blocks/carousel-items-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js b/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js index fceff0a5f..146d66ba9 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/carousel-terms-list/edit.js @@ -9,7 +9,7 @@ import tainacan from '../../js/axios.js'; import axios from 'axios'; import qs from 'qs'; import { ThumbnailHelperFunctions } from '../../../admin/js/utilities.js'; -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; import 'swiper/css/swiper.min.css'; export default function({ attributes, setAttributes, className, isSelected, clientId }){ diff --git a/src/views/gutenberg-blocks/blocks/carousel-terms-list/index.js b/src/views/gutenberg-blocks/blocks/carousel-terms-list/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/carousel-terms-list/index.js +++ b/src/views/gutenberg-blocks/blocks/carousel-terms-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/collections-list/edit.js b/src/views/gutenberg-blocks/blocks/collections-list/edit.js index e8a1cad68..b2697c69f 100644 --- a/src/views/gutenberg-blocks/blocks/collections-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/collections-list/edit.js @@ -4,7 +4,7 @@ const { RangeControl, IconButton, Button, ToggleControl, Placeholder, PanelBody const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; import CollectionsModal from './collections-modal.js'; export default function({ attributes, setAttributes, className, isSelected }) { diff --git a/src/views/gutenberg-blocks/blocks/collections-list/index.js b/src/views/gutenberg-blocks/blocks/collections-list/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/collections-list/index.js +++ b/src/views/gutenberg-blocks/blocks/collections-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/dynamic-items-list/edit.js b/src/views/gutenberg-blocks/blocks/dynamic-items-list/edit.js index c4d60aa5f..8961581f1 100644 --- a/src/views/gutenberg-blocks/blocks/dynamic-items-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/dynamic-items-list/edit.js @@ -9,8 +9,8 @@ import tainacan from '../../js/axios.js'; import axios from 'axios'; import qs from 'qs'; import { ThumbnailHelperFunctions } from '../../../admin/js/utilities.js'; -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; -import TainacanBlocksCompatColorPicker from '../../js/tainacan-blocks-compat-colorpicker.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatColorPicker from '../../js/compatibility/tainacan-blocks-compat-colorpicker.js'; export default function({ attributes, setAttributes, className, isSelected, clientId }){ let { diff --git a/src/views/gutenberg-blocks/blocks/dynamic-items-list/index.js b/src/views/gutenberg-blocks/blocks/dynamic-items-list/index.js index 39540ea88..a1408e341 100644 --- a/src/views/gutenberg-blocks/blocks/dynamic-items-list/index.js +++ b/src/views/gutenberg-blocks/blocks/dynamic-items-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/faceted-search/edit.js b/src/views/gutenberg-blocks/blocks/faceted-search/edit.js index 9ed285682..2f0d5961a 100644 --- a/src/views/gutenberg-blocks/blocks/faceted-search/edit.js +++ b/src/views/gutenberg-blocks/blocks/faceted-search/edit.js @@ -24,7 +24,7 @@ const { InspectorControls, BlockControls } = (tainacan_blocks.wp_version < '5.2' import CollectionModal from './collection-modal.js'; import TermModal from './term-modal.js'; -import TainacanBlocksCompatColorPicker from '../../js/tainacan-blocks-compat-colorpicker.js'; +import TainacanBlocksCompatColorPicker from '../../js/compatibility/tainacan-blocks-compat-colorpicker.js'; export default function({ attributes, setAttributes, className, isSelected, clientId }) { let { diff --git a/src/views/gutenberg-blocks/blocks/faceted-search/index.js b/src/views/gutenberg-blocks/blocks/faceted-search/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/faceted-search/index.js +++ b/src/views/gutenberg-blocks/blocks/faceted-search/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/facets-list/edit.js b/src/views/gutenberg-blocks/blocks/facets-list/edit.js index 2b4bc7791..8c8384040 100644 --- a/src/views/gutenberg-blocks/blocks/facets-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/facets-list/edit.js @@ -9,7 +9,7 @@ import ParentTermModal from './parent-term-modal.js'; import tainacan from '../../js/axios.js'; import axios from 'axios'; import qs from 'qs'; -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; export default function({ attributes, setAttributes, className, isSelected, clientId }) { let { diff --git a/src/views/gutenberg-blocks/blocks/facets-list/index.js b/src/views/gutenberg-blocks/blocks/facets-list/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/facets-list/index.js +++ b/src/views/gutenberg-blocks/blocks/facets-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/block.json b/src/views/gutenberg-blocks/blocks/item-gallery/block.json new file mode 100644 index 000000000..df6c4e4f8 --- /dev/null +++ b/src/views/gutenberg-blocks/blocks/item-gallery/block.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "name": "tainacan/item-gallery", + "title": "Tainacan Item Media Gallery", + "apiVersion": 2, + "category": "tainacan-blocks", + "keywords": [ "item", "document", "carousel", "attachments", "zoom" ], + "description": "The media gallery of the item, displaying document, attachments and more.", + "textdomain": "tainacan", + "example": { + "attributes": { + "content": "preview" + } + }, + "attributes": { + "blockId": { + "type": "string", + "default": "" + }, + "content": { + "type": "array", + "source": "query", + "selector": "div" + }, + "collectionId": { + "type": "string", + "default": "" + }, + "itemId": { + "type": "string", + "default": "" + }, + "isModalOpen": { + "type": "boolean", + "default": false + }, + "layoutElements": { + "type": "object", + "default": { + "main": true, + "thumbnails": true + } + }, + "mediaSources": { + "type": "object", + "default": { + "document": true, + "attachments": true, + "metadata": false + } + }, + "hideFileNameMain": { + "type": "boolean", + "default": true + }, + "hideFileCaptionMain": { + "type": "boolean", + "default": false + }, + "hideFileDescriptionMain": { + "type": "boolean", + "default": true + }, + "hideFileNameThumbnails": { + "type": "boolean", + "default": true + }, + "hideFileCaptionThumbnails": { + "type": "boolean", + "default": true + }, + "hideFileDescriptionThumbnails": { + "type": "boolean", + "default": true + }, + "openLightboxOnClick": { + "type": "boolean", + "default": true + }, + "arrowsSize": { + "type": "integer", + "default": 44 + }, + "mainSliderHeight": { + "type": "integer", + "default": 60 + }, + "mainSliderWidth": { + "type": "integer", + "default": 100 + }, + "thumbnailsCarouselWidth": { + "type": "integer", + "default": 100 + }, + "thumbnailsCarouselItemSize": { + "type": "integer", + "default": 136 + }, + "showDownloadButtonMain": { + "type": "boolean", + "default": false + } + }, + "supports": { + "align": ["full", "wide"], + "multiple": true, + "color": { + "text": true, + "background": true, + "gradients": true, + "link": true + }, + "spacing": { + "padding": true + } + }, + "editorScript": "item-gallery", + "editorStyle": "item-gallery" +} \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/deprecated.js b/src/views/gutenberg-blocks/blocks/item-gallery/deprecated.js new file mode 100644 index 000000000..109fa8b38 --- /dev/null +++ b/src/views/gutenberg-blocks/blocks/item-gallery/deprecated.js @@ -0,0 +1 @@ +export default []; \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/edit.js b/src/views/gutenberg-blocks/blocks/item-gallery/edit.js new file mode 100644 index 000000000..aa1a574a1 --- /dev/null +++ b/src/views/gutenberg-blocks/blocks/item-gallery/edit.js @@ -0,0 +1,329 @@ +const { __ } = wp.i18n; + +const { Button, Placeholder, RangeControl, ToggleControl, PanelBody } = wp.components; + +const ServerSideRender = wp.serverSideRender; +const { InspectorControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); + +import SingleItemModal from '../../js/selection/single-item-modal.js'; + +export default function ({ attributes, setAttributes, className, isSelected, clientId }) { + + let { + content, + collectionId, + itemId, + isModalOpen, + layoutElements, + mediaSources, + hideFileNameMain, + hideFileCaptionMain, + hideFileDescriptionMain, + hideFileNameThumbnails, + hideFileCaptionThumbnails, + hideFileDescriptionThumbnails, + openLightboxOnClick, + arrowsSize, + mainSliderHeight, + mainSliderWidth, + thumbnailsCarouselWidth, + thumbnailsCarouselItemSize, + showDownloadButtonMain + } = attributes; + + // Gets blocks props from hook + const blockProps = tainacan_blocks.wp_version < '5.6' ? { className: className } : useBlockProps(); + const currentWPVersion = (typeof tainacan_blocks != 'undefined') ? tainacan_blocks.wp_version : tainacan_plugin.wp_version; + + // Obtains block's client id to render it on save function + setAttributes({ blockId: clientId }); + + return content == 'preview' ? +
+ +
+ : ( +
+ + + + + { + let updatedSources = Object.assign({},mediaSources); + updatedSources['document'] = isChecked; + setAttributes({ mediaSources: updatedSources }); + } + } + /> + { + let updatedSources = Object.assign({},mediaSources); + updatedSources['attachments'] = isChecked; + setAttributes({ mediaSources: updatedSources }); + } + } + /> + {/* { + let updatedSources = Object.assign({},mediaSources); + updatedSources['metadata'] = isChecked; + setAttributes({ mediaSources: updatedSources }); + } + } + /> */} + + + { + let updatedElements = Object.assign({},layoutElements); + updatedElements['main'] = isChecked; + setAttributes({ layoutElements: updatedElements }); + } + } + /> + { + let updatedElements = Object.assign({},layoutElements); + updatedElements['thumbnails'] = isChecked; + setAttributes({ layoutElements: updatedElements }); + } + } + /> + { + openLightboxOnClick = isChecked; + setAttributes({ openLightboxOnClick: openLightboxOnClick }); + } + } + /> + + { layoutElements['main'] === true ? + + { + arrowsSize = updatedArrowsSize; + setAttributes({ arrowsSize: updatedArrowsSize }); + }} + min={ 8 } + max={ 64 } + /> + { + mainSliderHeight = updatedMainSliderHeight; + setAttributes({ mainSliderHeight: updatedMainSliderHeight }); + }} + min={ 10 } + max={ 150 } + /> + { + mainSliderWidth = updatedMainSliderWidth; + setAttributes({ mainSliderWidth: updatedMainSliderWidth }); + }} + min={ 10 } + max={ 150 } + /> + { + hideFileNameMain = isChecked; + setAttributes({ hideFileNameMain: hideFileNameMain }); + } + } + /> + { + hideFileCaptionMain = isChecked; + setAttributes({ hideFileCaptionMain: hideFileCaptionMain }); + } + } + /> + { + hideFileDescriptionMain = isChecked; + setAttributes({ hideFileDescriptionMain: hideFileDescriptionMain }); + } + } + /> + { + showDownloadButtonMain = isChecked; + setAttributes({ showDownloadButtonMain: showDownloadButtonMain }); + } + } + /> + + : null } + { layoutElements['thumbnails'] === true ? + + { + thumbnailsCarouselWidth = updatedThumbnailsCarouselWidth; + setAttributes({ thumbnailsCarouselWidth: updatedThumbnailsCarouselWidth }); + }} + min={ 10 } + max={ 150 } + /> + { + thumbnailsCarouselItemSize = updatedThumbnailsCarouselItemSize; + setAttributes({ thumbnailsCarouselItemSize: updatedThumbnailsCarouselItemSize }); + }} + min={ 32 } + max={ 400 } + /> + { + hideFileNameThumbnails = isChecked; + setAttributes({ hideFileNameThumbnails: hideFileNameThumbnails }); + } + } + /> + { + hideFileCaptionThumbnails = isChecked; + setAttributes({ hideFileCaptionThumbnails: hideFileCaptionThumbnails }); + } + } + /> + { + hideFileDescriptionThumbnails = isChecked; + setAttributes({ hideFileDescriptionThumbnails: hideFileDescriptionThumbnails }); + } + } + /> + + : null } + + + { isSelected ? + ( +
+ { isModalOpen ? + { + collectionId = selectedCollectionId; + setAttributes({ + collectionId: collectionId + }); + }} + onApplySelectedItem={ (selectedItemId) => { + itemId = selectedItemId; + setAttributes({ + itemId: itemId, + isModalOpen: false + }); + }} + onCancelSelection={ () => setAttributes({ isModalOpen: false }) }/> + : null + } + +
+ ) : null + } + + { !itemId ? ( + + )}> +

+ + + + {__('Select an item to display its media gallery, including Document and Attachments.', 'tainacan')} +

+ +
+ ) : null + } + + { itemId ? ( +
+
{__('Warning: this is just a demonstration. To see the gallery in action, either preview or publish your post.', 'tainacan') }
+ = '5.5' ? 'POST' : 'GET' } + /> +
+ ) : null + } + +
+ ); +}; \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/icon.js b/src/views/gutenberg-blocks/blocks/item-gallery/icon.js new file mode 100644 index 000000000..05d1e6000 --- /dev/null +++ b/src/views/gutenberg-blocks/blocks/item-gallery/icon.js @@ -0,0 +1,14 @@ + const { SVG, Path } = wp.components; + + export default ( + + + + ); + \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/index.js b/src/views/gutenberg-blocks/blocks/item-gallery/index.js new file mode 100644 index 000000000..f8cd05987 --- /dev/null +++ b/src/views/gutenberg-blocks/blocks/item-gallery/index.js @@ -0,0 +1,15 @@ +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; + +import metadata from './block.json'; +import icon from './icon.js'; +import edit from './edit.js'; +import save from './save.js'; +import deprecated from './deprecated.js'; + +tainacanRegisterBlockType({ + metadata, + icon, + edit, + save, + deprecated +}); diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/save.js b/src/views/gutenberg-blocks/blocks/item-gallery/save.js new file mode 100644 index 000000000..d67f959fb --- /dev/null +++ b/src/views/gutenberg-blocks/blocks/item-gallery/save.js @@ -0,0 +1,3 @@ +export default function() { + return null +}; \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/save.php b/src/views/gutenberg-blocks/blocks/item-gallery/save.php new file mode 100644 index 000000000..a506f7e00 --- /dev/null +++ b/src/views/gutenberg-blocks/blocks/item-gallery/save.php @@ -0,0 +1,11 @@ +get_tainacan_item_gallery($block_attributes); +} \ No newline at end of file diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/style.scss b/src/views/gutenberg-blocks/blocks/item-gallery/style.scss index fb09cf51c..12374c6cd 100644 --- a/src/views/gutenberg-blocks/blocks/item-gallery/style.scss +++ b/src/views/gutenberg-blocks/blocks/item-gallery/style.scss @@ -11,21 +11,43 @@ $pswp__include-minimal-style: true !default; @import '../../../../../node_modules/photoswipe/src/css/main.scss'; @import '../../../../../node_modules/photoswipe/src/css/default-skin/default-skin.scss'; +.item-gallery-edit-container { + .tainacan-media-component { + .swiper-slide, + .swiper-button-prev, + .swiper-button-next { + cursor: not-allowed !important; + } + } + .preview-warning { + width: 100%; + font-size: 0.875rem; + font-style: italic; + color: inherit; + text-align: center; + margin: 0 auto; + padding: 8px 2px 2px 2px; + } +} .tainacan-media-component { --swiper-theme-color: var(--tainacan-secondary, #298596); --swiper-navigation-size: 44px; + --tainacan-media-metadata-color: var(--tainacan-label-color, #454647); --tainacan-media-background: var(--tainacan-background-color, transparent); --tainacan-media-main-carousel-height: 60vh; --tainacan-media-main-carousel-width: 100%; --tainacan-media-thumbs-carousel-width: 100%; --tainacan-media-thumbs-carousel-item-size: 136px; - width: 100%; height: auto; display: block; background-color: var(--tainacan-media-background, transparent); box-sizing: border-box; + &:not(.alignfull):not(.alignwide) { + width: 100%; + } + .swiper-slide, .swiper-slide::after, .swiper-slide::before { @@ -36,13 +58,12 @@ $pswp__include-minimal-style: true !default; /* Style valid for both cases of carousel, main and thumbs */ .tainacan-media-component__swiper-main, .tainacan-media-component__swiper-thumbs { - .swiper-button-prev::after, - .swiper-container-rtl .swiper-button-next::after { + .swiper-button-prev:not(.swiper-button-has-svg)::after, + .swiper-container-rtl .swiper-button-next:not(.swiper-button-has-svg)::after { content: 'previous'; } - - .swiper-button-next::after, - .swiper-button-prev::after { + .swiper-button-next:not(.swiper-button-has-svg)::after, + .swiper-button-prev:not(.swiper-button-has-svg)::after { font-family: "TainacanIcons"; opacity: 0.7; transition: opacity ease 0.2s; @@ -53,6 +74,16 @@ $pswp__include-minimal-style: true !default; opacity: 1; } } + .swiper-button-next.swiper-button-has-svg::after, + .swiper-button-prev.swiper-button-has-svg::after { + display: none; + } + .swiper-button-next.swiper-button-has-svg svg, + .swiper-button-prev.swiper-button-has-svg svg { + min-width: calc(var(--swiper-navigation-size) * 1.35); + min-height: calc(var(--swiper-navigation-size) * 1.35); + fill: currentColor; + } ul.swiper-wrapper { list-style: none; padding: 0; @@ -113,20 +144,26 @@ $pswp__include-minimal-style: true !default; display: none; visibility: hidden; } + &.hide-name.hide-description.hide-caption { + display: none; + visibility: hidden; + } } .swiper-slide-metadata__name { font-size: 1em; font-weight: bold; - color: var(--tainacan-label-color, #454647); + color: var(--tainacan-media-metadata-color, #454647); + opacity: 0.75; } .swiper-slide-metadata__caption { font-size: 0.9375em; - color: var(--tainacan-input-color, #1d1d1d); + color: var(--tainacan-media-metadata-color, #454647); } .swiper-slide-metadata__caption { font-size: 0.875em; - color: var(--tainacan-info-color, #555758); + color: var(--tainacan-media-metadata-color, #454647); + opacity: 0.85; } } @@ -207,6 +244,8 @@ $pswp__include-minimal-style: true !default; img { width: auto; max-height: var(--tainacan-media-main-carousel-height, 60vh); + max-width: 100%; + height: auto; } .twitter-tweet { margin-left: auto; @@ -270,15 +309,17 @@ $pswp__include-minimal-style: true !default; } .swiper-slide-metadata__name { font-size: 1em; - color: var(--tainacan-label-color, #454647); + color: var(--tainacan-media-metadata-color, #454647); + opacity: 0.75; } .swiper-slide-metadata__caption { font-size: 0.9375em; - color: var(--tainacan-input-color, #1d1d1d); + color: var(--tainacan-media-metadata-color, #454647); } .swiper-slide-metadata__caption { font-size: 0.875em; - color: var(--tainacan-info-color, #555758); + color: var(---tainacan-media-metadata-color, #454647); + opacity: 0.85; } .swiper-slide-metadata { text-align: center; @@ -301,6 +342,10 @@ $pswp__include-minimal-style: true !default; display: none; visibility: hidden; } + &.hide-name.hide-description.hide-caption { + display: none; + visibility: hidden; + } } a { width: 100%; diff --git a/src/views/gutenberg-blocks/blocks/item-gallery/theme.js b/src/views/gutenberg-blocks/blocks/item-gallery/theme.js index 1b7d40168..52d36c7db 100644 --- a/src/views/gutenberg-blocks/blocks/item-gallery/theme.js +++ b/src/views/gutenberg-blocks/blocks/item-gallery/theme.js @@ -114,7 +114,7 @@ tainacan_plugin.classes.TainacanMediaGallery = class TainacanMediaGallery { // Parse URL and open gallery if it contains #&pid=3&gid=1 let hashData = this.photoswipeParseHash(); - + if (hashData.pid && hashData.gid) this.openPhotoSwipe(hashData.pid, galleryElement, true, true); } diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js b/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js index d6cf3f505..a0aff0688 100644 --- a/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js +++ b/src/views/gutenberg-blocks/blocks/item-submission-form/edit.js @@ -18,8 +18,8 @@ const { InspectorControls, BlockControls, RichText, useBlockProps } = (tainacan_ import tainacan from '../../js/axios.js'; import CollectionModal from '../faceted-search/collection-modal.js'; -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; -import TainacanBlocksCompatColorPicker from '../../js/tainacan-blocks-compat-colorpicker.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatColorPicker from '../../js/compatibility/tainacan-blocks-compat-colorpicker.js'; export default function ({ attributes, setAttributes, className }) { let { diff --git a/src/views/gutenberg-blocks/blocks/item-submission-form/index.js b/src/views/gutenberg-blocks/blocks/item-submission-form/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/item-submission-form/index.js +++ b/src/views/gutenberg-blocks/blocks/item-submission-form/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/items-list/edit.js b/src/views/gutenberg-blocks/blocks/items-list/edit.js index 717ea569a..afba9898b 100644 --- a/src/views/gutenberg-blocks/blocks/items-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/items-list/edit.js @@ -4,7 +4,7 @@ const { RangeControl, IconButton, Button, ToggleControl, Placeholder, PanelBody const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; import ItemsModal from './items-modal.js'; export default function({ attributes, setAttributes, className, isSelected }) { diff --git a/src/views/gutenberg-blocks/blocks/items-list/index.js b/src/views/gutenberg-blocks/blocks/items-list/index.js index 39540ea88..a1408e341 100644 --- a/src/views/gutenberg-blocks/blocks/items-list/index.js +++ b/src/views/gutenberg-blocks/blocks/items-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/related-items-list/edit.js b/src/views/gutenberg-blocks/blocks/related-items-list/edit.js index d90952130..d69e2e692 100644 --- a/src/views/gutenberg-blocks/blocks/related-items-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/related-items-list/edit.js @@ -4,7 +4,7 @@ const { Spinner, Button, Placeholder } = wp.components; const { InnerBlocks } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); -import RelatedItemsModal from './related-items-modal.js'; +import SingleItemModal from '../../js/selection/single-item-modal.js'; import tainacan from '../../js/axios.js'; import axios from 'axios'; @@ -50,7 +50,7 @@ export default function ({ attributes, setAttributes, className, isSelected }) { }); } - function openRelatedItemsModal() { + function openSingleItemModal() { isModalOpen = true; setAttributes( { isModalOpen: isModalOpen @@ -144,7 +144,9 @@ export default function ({ attributes, setAttributes, className, isSelected }) { (
{ isModalOpen ? - { @@ -157,7 +159,7 @@ export default function ({ attributes, setAttributes, className, isSelected }) { relatedItems: relatedItems }); }} - onApplyRelatedItem={ (selectedItemId) => { + onApplySelectedItem={ (selectedItemId) => { if (itemId != selectedItemId) { relatedItems = []; relatedItemsTemplate = []; @@ -202,7 +204,7 @@ export default function ({ attributes, setAttributes, className, isSelected }) { diff --git a/src/views/gutenberg-blocks/blocks/related-items-list/index.js b/src/views/gutenberg-blocks/blocks/related-items-list/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/related-items-list/index.js +++ b/src/views/gutenberg-blocks/blocks/related-items-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/search-bar/edit.js b/src/views/gutenberg-blocks/blocks/search-bar/edit.js index b0fbbc5de..5ef63a362 100644 --- a/src/views/gutenberg-blocks/blocks/search-bar/edit.js +++ b/src/views/gutenberg-blocks/blocks/search-bar/edit.js @@ -4,8 +4,8 @@ const { RangeControl, TextControl, SelectControl, Button, ToggleControl, Placeho const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; -import TainacanBlocksCompatColorPicker from '../../js/tainacan-blocks-compat-colorpicker.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatColorPicker from '../../js/compatibility/tainacan-blocks-compat-colorpicker.js'; import SearchBarModal from './search-bar-modal.js'; export default function({ attributes, setAttributes, className, isSelected }) { diff --git a/src/views/gutenberg-blocks/blocks/search-bar/index.js b/src/views/gutenberg-blocks/blocks/search-bar/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/search-bar/index.js +++ b/src/views/gutenberg-blocks/blocks/search-bar/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/blocks/terms-list/edit.js b/src/views/gutenberg-blocks/blocks/terms-list/edit.js index d15f9e57d..796cb1e1f 100644 --- a/src/views/gutenberg-blocks/blocks/terms-list/edit.js +++ b/src/views/gutenberg-blocks/blocks/terms-list/edit.js @@ -4,7 +4,7 @@ const { IconButton, Button, ToggleControl, Placeholder, PanelBody } = wp.compone const { InspectorControls, BlockControls, useBlockProps } = (tainacan_blocks.wp_version < '5.2' ? wp.editor : wp.blockEditor ); -import TainacanBlocksCompatToolbar from '../../js/tainacan-blocks-compat-toolbar.js'; +import TainacanBlocksCompatToolbar from '../../js/compatibility/tainacan-blocks-compat-toolbar.js'; import TermsModal from './terms-modal.js'; export default function({ attributes, setAttributes, className, isSelected }){ diff --git a/src/views/gutenberg-blocks/blocks/terms-list/index.js b/src/views/gutenberg-blocks/blocks/terms-list/index.js index 956c07742..f8cd05987 100644 --- a/src/views/gutenberg-blocks/blocks/terms-list/index.js +++ b/src/views/gutenberg-blocks/blocks/terms-list/index.js @@ -1,4 +1,4 @@ -import tainacanRegisterBlockType from '../../js/tainacan-blocks-compat-register.js'; +import tainacanRegisterBlockType from '../../js/compatibility/tainacan-blocks-compat-register.js'; import metadata from './block.json'; import icon from './icon.js'; diff --git a/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php b/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php index d20414c4b..53ebd5ff3 100644 --- a/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php +++ b/src/views/gutenberg-blocks/class-tainacan-gutenberg-block.php @@ -15,7 +15,8 @@ const TAINACAN_BLOCKS = [ 'related-items-list' => [], 'terms-list' => [], 'faceted-search' => [], - 'item-submission-form' => [] + 'item-submission-form' => [], + 'item-gallery' => ['render_callback' => 'tainacan_blocks_render_items_gallery'] ]; // Lets do this! @@ -41,9 +42,12 @@ function tainacan_blocks_initialize() { if ( !is_admin() ) { add_action( 'init', 'tainacan_blocks_add_common_theme_scripts', 90 ); add_action( 'init', 'tainacan_blocks_get_common_theme_styles', 90 ); - // On the admin side, we need the blocks registered and their assets (editor-side) } - add_action('admin_init', 'tainacan_blocks_register_and_enqueue_all_blocks'); + + // On the admin side, we need the blocks registered and their assets (editor-side) + // The reason why we don't use admin_init here is because server side blocks + // need to be registered whithin the init + add_action('init', 'tainacan_blocks_register_and_enqueue_all_blocks'); } } @@ -67,9 +71,12 @@ function tainacan_blocks_register_categories($categories, $editor_context) { * both 'generic' and 'special' blocks */ function tainacan_blocks_register_and_enqueue_all_blocks() { - tainacan_blocks_get_category_icon_script(); - tainacan_blocks_get_common_editor_styles(); - + // Only needed inside the editor + if ( is_admin() ) { + tainacan_blocks_get_category_icon_script(); + tainacan_blocks_get_common_editor_styles(); + } + // May be needed outside the editor, if server side render is used foreach(TAINACAN_BLOCKS as $block_slug => $block_options) { tainacan_blocks_register_block($block_slug, $block_options); } @@ -91,8 +98,21 @@ function tainacan_blocks_register_block($block_slug, $options = []) { // Creates Register params based on registered scripts and styles $register_params = []; + // If there is a server side render callback, we add its render function + if ( isset($options['render_callback']) ) { + require_once( __DIR__ . '/blocks/' . $block_slug . '/save.php' ); + $register_params['render_callback'] = $options['render_callback']; + $register_params['skip_inner_blocks'] = true; + + // Also, none of the rest is necessary regarding + // blocks that are non server side, their content + // is independent of editor side scripts and styles. + } else if ( !is_admin() ) { + return; + } + // Defines dependencies for editor script - $editor_script_deps = array('wp-blocks', 'wp-i18n', 'wp-element', 'wp-components'); + $editor_script_deps = array('wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-server-side-render'); if ( version_compare( $wp_version, '5.2', '<') ) $editor_script_deps[] = 'wp-editor'; else @@ -128,7 +148,7 @@ function tainacan_blocks_register_block($block_slug, $options = []) { // Registers the new block if (function_exists('register_block_type')) { if ( version_compare( $wp_version, '5.8-RC', '>=') ) - register_block_type( __DIR__ . '/blocks/' . $block_slug ); + register_block_type( __DIR__ . '/blocks/' . $block_slug, $register_params ); else register_block_type( 'tainacan/' . $block_slug, $register_params ); } diff --git a/src/views/gutenberg-blocks/js/tainacan-blocks-compat-colorpicker.js b/src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-colorpicker.js similarity index 100% rename from src/views/gutenberg-blocks/js/tainacan-blocks-compat-colorpicker.js rename to src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-colorpicker.js diff --git a/src/views/gutenberg-blocks/js/tainacan-blocks-compat-register.js b/src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-register.js similarity index 76% rename from src/views/gutenberg-blocks/js/tainacan-blocks-compat-register.js rename to src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-register.js index b69bed666..16ea760da 100644 --- a/src/views/gutenberg-blocks/js/tainacan-blocks-compat-register.js +++ b/src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-register.js @@ -24,33 +24,29 @@ function tainacanBlocksLocalizeMetadata(metadata) { export default function({ metadata, icon, edit, save, deprecated, transforms }) { const currentWPVersion = (typeof tainacan_blocks != 'undefined') ? tainacan_blocks.wp_version : tainacan_plugin.wp_version; + let attributes = { + icon: { + src: icon, + foreground: '#298596', + }, + edit, + deprecated, + transforms + } + if (save) + attributes['save'] = save; + if (currentWPVersion >= '5.8-RC') { // Registers block type using new strategy from WP 5.8 - registerBlockType( metadata, { - icon: { - src: icon, - foreground: '#298596', - }, - edit, - save, - deprecated, - transforms - }); + registerBlockType( metadata, attributes); } else { - + // Converts this array to a valid array previous to WP 5.8 registerBlockType( metadata.name, { ...tainacanBlocksLocalizeMetadata(metadata), - icon: { - src: icon, - foreground: '#298596', - }, - edit, - save, - deprecated, - transforms + ...attributes }); } }; \ No newline at end of file diff --git a/src/views/gutenberg-blocks/js/tainacan-blocks-compat-toolbar.js b/src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-toolbar.js similarity index 100% rename from src/views/gutenberg-blocks/js/tainacan-blocks-compat-toolbar.js rename to src/views/gutenberg-blocks/js/compatibility/tainacan-blocks-compat-toolbar.js diff --git a/src/views/gutenberg-blocks/blocks/related-items-list/related-items-modal.js b/src/views/gutenberg-blocks/js/selection/single-item-modal.js similarity index 95% rename from src/views/gutenberg-blocks/blocks/related-items-list/related-items-modal.js rename to src/views/gutenberg-blocks/js/selection/single-item-modal.js index 81118188d..b0220c618 100644 --- a/src/views/gutenberg-blocks/blocks/related-items-list/related-items-modal.js +++ b/src/views/gutenberg-blocks/js/selection/single-item-modal.js @@ -1,4 +1,4 @@ -import tainacan from '../../js/axios.js'; +import tainacan from '../axios.js'; import axios from 'axios'; const { __ } = wp.i18n; @@ -6,7 +6,7 @@ const { __ } = wp.i18n; const { TextControl, Button, Modal, RadioControl, SelectControl, Spinner } = wp.components; const currentWPVersion = (typeof tainacan_blocks != 'undefined') ? tainacan_blocks.wp_version : tainacan_plugin.wp_version; -export default class RelatedItemsModal extends React.Component { +export default class SingleItemModal extends React.Component { constructor(props) { super(props); @@ -36,7 +36,7 @@ export default class RelatedItemsModal extends React.Component { this.fetchCollections = this.fetchCollections.bind(this); this.fetchModalCollections = this.fetchModalCollections.bind(this); this.fetchCollection = this.fetchCollection.bind(this); - this.applyRelatedItem = this.applyRelatedItem.bind(this); + this.applySelectedItem = this.applySelectedItem.bind(this); } componentWillMount() { @@ -167,13 +167,13 @@ export default class RelatedItemsModal extends React.Component { }); } - applyRelatedItem() { + applySelectedItem() { let iframe = document.getElementById("itemsFrame"); if (iframe) { let params = new URLSearchParams(iframe.contentWindow.location.search); let selectedItems = params.getAll('selecteditems'); params.delete('selecteditems') - this.props.onApplyRelatedItem(selectedItems[0]); + this.props.onApplySelectedItem(selectedItems[0]); } } @@ -201,10 +201,10 @@ export default class RelatedItemsModal extends React.Component { // Items modal this.cancelSelection() } shouldCloseOnClickOutside={ false } - contentLabel={ __('Select one item that has relations', 'tainacan') }> + contentLabel={ this.props.modalTitle ? this.props.modalTitle : __('Select one item for the block', 'tainacan') }>