Version 0.3.2

This commit is contained in:
mateuswetah 2024-05-29 15:00:18 -03:00
parent a63f7b0909
commit e8460fc85b
13 changed files with 36 additions and 20 deletions

View File

@ -5,7 +5,7 @@ Tags: museums, archives, collections, tainacan, blocksy
Requires at least: 5.9 Requires at least: 5.9
Tested up to: 6.5 Tested up to: 6.5
Requires PHP: 7.0 Requires PHP: 7.0
Stable tag: 0.3.1 Stable tag: 0.3.2
Requires Plugins: tainacan Requires Plugins: tainacan
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -59,6 +59,10 @@ License details: https://github.com/tainacan/blocksy-tainacan/blob/master/LICENS
== Changelog == == Changelog ==
= 0.3.2 =
* Adds Tainacan View Modes as a layout option for "Items related to this" section (requires Tainacan 0.21.5)
* Adds media gallery thumbnails height and image size option (requires Tainacan 0.21.5)
= 0.3.1 = = 0.3.1 =
* Fixes customizer errors due to Blocksy changes in version 2.0.27 * Fixes customizer errors due to Blocksy changes in version 2.0.27

View File

@ -4,7 +4,7 @@ Plugin Name: Tainacan Support for Blocksy
Plugin URI: https://tainacan.org/ Plugin URI: https://tainacan.org/
Description: Tainacan plugin support for Blocksy theme Description: Tainacan plugin support for Blocksy theme
Author: tainacan Author: tainacan
Version: 0.3.1 Version: 0.3.2
Text Domain: tainacan-blocksy Text Domain: tainacan-blocksy
License: GPLv2 or later License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -15,7 +15,7 @@ if (! defined('WP_DEBUG') ) {
} }
/** Theme/plugin version */ /** Theme/plugin version */
const TAINACAN_BLOCKSY_VERSION = '0.3.1'; const TAINACAN_BLOCKSY_VERSION = '0.3.2';
const TAINACAN_BLOCKSY_IS_CHILD_THEME = false; const TAINACAN_BLOCKSY_IS_CHILD_THEME = false;
/* Tools to define our next constants */ /* Tools to define our next constants */

View File

@ -35,5 +35,15 @@ $options = [
'sync' => blocksy_sync_single_post_container([ 'sync' => blocksy_sync_single_post_container([
'prefix' => $prefix 'prefix' => $prefix
]) ])
] ],
$prefix . 'thumbs_have_fixed_height' => [
'label' => __( 'Thumbnails have fixed height', 'tainacan-blocksy' ),
'type' => 'ct-switch',
'value' => 'no',
'desc' => __( 'If checked, the thumbnails will have fixed the attachment size height, otherwise they will have fixed the attachment size width.', 'tainacan-blocksy' ),
'sync' => blocksy_sync_single_post_container([
'prefix' => $prefix
])
],
]; ];

View File

@ -29,7 +29,7 @@ $layout_choices = [
] ]
]; ];
if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.3' ) > 0 ) { if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.5' ) >= 0 ) {
$layout_choices['tainacan-view-modes'] = [ $layout_choices['tainacan-view-modes'] = [
'src' => tainacan_blocksy_image_picker_url( 'items-records.svg' ), 'src' => tainacan_blocksy_image_picker_url( 'items-records.svg' ),
'title' => __( 'Tainacan View Modes', 'tainacan-blocksy' ) 'title' => __( 'Tainacan View Modes', 'tainacan-blocksy' )
@ -44,9 +44,7 @@ $inner_options = [
'design' => 'block', 'design' => 'block',
'setting' => [ 'transport' => 'postMessage' ], 'setting' => [ 'transport' => 'postMessage' ],
'choices' => $layout_choices, 'choices' => $layout_choices,
'sync' => blocksy_sync_single_post_container([ 'sync' => '',
'prefix' => $prefix
])
], ],
blocksy_rand_md5() => [ blocksy_rand_md5() => [
'type' => 'ct-condition', 'type' => 'ct-condition',
@ -142,7 +140,7 @@ $inner_options = [
] ]
]; ];
if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.3' ) > 0 ) { if ( null !== TAINACAN_VERSION && version_compare( TAINACAN_VERSION, '0.21.5' ) >= 0 ) {
$inner_options[ $prefix . 'items_related_to_this_hide_collection_heading' ] = [ $inner_options[ $prefix . 'items_related_to_this_hide_collection_heading' ] = [
'label' => __( 'Hide collection heading', 'tainacan-blocksy' ), 'label' => __( 'Hide collection heading', 'tainacan-blocksy' ),
'type' => 'ct-switch', 'type' => 'ct-switch',

View File

@ -1,12 +1,12 @@
{ {
"name": "tainacan-blocksy", "name": "tainacan-blocksy",
"version": "0.3.1", "version": "0.3.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "tainacan-blocksy", "name": "tainacan-blocksy",
"version": "0.3.1", "version": "0.3.2",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"clean-css-cli": "^4.3.0", "clean-css-cli": "^4.3.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "tainacan-blocksy", "name": "tainacan-blocksy",
"version": "0.3.1", "version": "0.3.2",
"description": "A Blocksy plugin/child theme compatible with Tainacan", "description": "A Blocksy plugin/child theme compatible with Tainacan",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -664,7 +664,7 @@
max-width: 100%; max-width: 100%;
margin: 0; margin: 0;
} }
li.swiper-slide { li.swiper-slide:not(.has-fixed-height) {
max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px); max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px);
} }
} }

View File

@ -1188,7 +1188,7 @@ body[data-prefix="tainacan-terms-items_archive"] .collection-thumbnail img {
margin: 0; margin: 0;
} }
.tainacan-media-component-wrapper-spacing--minimum .tainacan-media-component .tainacan-media-component__swiper-thumbs li.swiper-slide { .tainacan-media-component-wrapper-spacing--minimum .tainacan-media-component .tainacan-media-component__swiper-thumbs li.swiper-slide:not(.has-fixed-height) {
max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px); max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px);
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -18,6 +18,7 @@
$hide_file_description_lightbox = get_theme_mod( $prefix . '_hide_files_description_lightbox', 'no') == 'yes'; $hide_file_description_lightbox = get_theme_mod( $prefix . '_hide_files_description_lightbox', 'no') == 'yes';
$has_light_dark_color_scheme = get_theme_mod( $prefix . '_gallery_color_scheme', 'dark' ) == 'light'; $has_light_dark_color_scheme = get_theme_mod( $prefix . '_gallery_color_scheme', 'dark' ) == 'light';
$thumbnails_image_size = get_theme_mod( $prefix . '_thumbnails_image_size', 'tainacan-medium' ); $thumbnails_image_size = get_theme_mod( $prefix . '_thumbnails_image_size', 'tainacan-medium' );
$thumbs_have_fixed_height = get_theme_mod( $prefix . '_thumbs_have_fixed_height', 'no' ) == 'yes';
if ( $is_gallery_mode && $gallery_position !== 'below' ) { if ( $is_gallery_mode && $gallery_position !== 'below' ) {
add_filter( 'tainacan-swiper-thumbs-options', function($options) { add_filter( 'tainacan-swiper-thumbs-options', function($options) {
@ -80,7 +81,8 @@
'hideFileDescriptionLightbox' => $hide_file_description_lightbox, 'hideFileDescriptionLightbox' => $hide_file_description_lightbox,
'openLightboxOnClick' => $is_gallery_mode ? !$disable_gallery_lightbox : true, 'openLightboxOnClick' => $is_gallery_mode ? !$disable_gallery_lightbox : true,
'lightboxHasLightBackground' => $has_light_dark_color_scheme, 'lightboxHasLightBackground' => $has_light_dark_color_scheme,
'thumbnailsSize' => $thumbnails_image_size 'thumbnailsSize' => $thumbnails_image_size,
'thumbsHaveFixedHeight' => $thumbs_have_fixed_height
]); ]);
?> ?>
</section> </section>

View File

@ -16,6 +16,7 @@
$hide_file_description_lightbox = get_theme_mod( $prefix . '_hide_files_description_lightbox', 'no') == 'yes'; $hide_file_description_lightbox = get_theme_mod( $prefix . '_hide_files_description_lightbox', 'no') == 'yes';
$has_light_dark_color_scheme = get_theme_mod( $prefix . '_gallery_color_scheme', 'dark' ) == 'light'; $has_light_dark_color_scheme = get_theme_mod( $prefix . '_gallery_color_scheme', 'dark' ) == 'light';
$thumbnails_image_size = get_theme_mod( $prefix . '_thumbnails_image_size', 'tainacan-medium' ); $thumbnails_image_size = get_theme_mod( $prefix . '_thumbnails_image_size', 'tainacan-medium' );
$thumbs_have_fixed_height = get_theme_mod( $prefix . '_thumbs_have_fixed_height', 'no' ) == 'yes';
if ( $gallery_spacing === 'minimum' ) { if ( $gallery_spacing === 'minimum' ) {
add_filter( 'tainacan-swiper-thumbs-options', function($options) { add_filter( 'tainacan-swiper-thumbs-options', function($options) {
@ -56,7 +57,8 @@
'hideFileDescriptionLightbox' => $hide_file_description_lightbox, 'hideFileDescriptionLightbox' => $hide_file_description_lightbox,
'openLightboxOnClick' => $is_gallery_mode ? !$disable_gallery_lightbox : true, 'openLightboxOnClick' => $is_gallery_mode ? !$disable_gallery_lightbox : true,
'lightboxHasLightBackground' => $has_light_dark_color_scheme , 'lightboxHasLightBackground' => $has_light_dark_color_scheme ,
'thumbnailsSize' => $thumbnails_image_size 'thumbnailsSize' => $thumbnails_image_size,
'thumbsHaveFixedHeight' => $thumbs_have_fixed_height
]); ]);
?> ?>
</section> </section>