Skip to content

Commit

Permalink
Version 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuswetah committed May 29, 2024
1 parent a63f7b0 commit e8460fc
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 20 deletions.
6 changes: 5 additions & 1 deletion tainacan-blocksy/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: museums, archives, collections, tainacan, blocksy
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.0
Stable tag: 0.3.1
Stable tag: 0.3.2
Requires Plugins: tainacan
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -59,6 +59,10 @@ License details: https://github.com/tainacan/blocksy-tainacan/blob/master/LICENS

== 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 =
* Fixes customizer errors due to Blocksy changes in version 2.0.27

Expand Down
4 changes: 2 additions & 2 deletions tainacan-blocksy/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://tainacan.org/
Description: Tainacan plugin support for Blocksy theme
Author: tainacan
Version: 0.3.1
Version: 0.3.2
Text Domain: tainacan-blocksy
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand All @@ -15,7 +15,7 @@
}

/** Theme/plugin version */
const TAINACAN_BLOCKSY_VERSION = '0.3.1';
const TAINACAN_BLOCKSY_VERSION = '0.3.2';
const TAINACAN_BLOCKSY_IS_CHILD_THEME = false;

/* Tools to define our next constants */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,15 @@
'sync' => blocksy_sync_single_post_container([
'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
])
],

];
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
]
];

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'] = [
'src' => tainacan_blocksy_image_picker_url( 'items-records.svg' ),
'title' => __( 'Tainacan View Modes', 'tainacan-blocksy' )
Expand All @@ -44,9 +44,7 @@
'design' => 'block',
'setting' => [ 'transport' => 'postMessage' ],
'choices' => $layout_choices,
'sync' => blocksy_sync_single_post_container([
'prefix' => $prefix
])
'sync' => '',
],
blocksy_rand_md5() => [
'type' => 'ct-condition',
Expand Down Expand Up @@ -142,7 +140,7 @@
]
];

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' ] = [
'label' => __( 'Hide collection heading', 'tainacan-blocksy' ),
'type' => 'ct-switch',
Expand Down
4 changes: 2 additions & 2 deletions tainacan-blocksy/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tainacan-blocksy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tainacan-blocksy",
"version": "0.3.1",
"version": "0.3.2",
"description": "A Blocksy plugin/child theme compatible with Tainacan",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tainacan-blocksy/sass/tainacan-item-single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@
max-width: 100%;
margin: 0;
}
li.swiper-slide {
li.swiper-slide:not(.has-fixed-height) {
max-width: var(--tainacan-media-thumbs-carousel-item-size, 136px);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tainacan-blocksy/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tainacan-blocksy/style.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tainacan-blocksy/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tainacan-blocksy/style.min.css.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
$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';
$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' ) {
add_filter( 'tainacan-swiper-thumbs-options', function($options) {
Expand Down Expand Up @@ -80,7 +81,8 @@
'hideFileDescriptionLightbox' => $hide_file_description_lightbox,
'openLightboxOnClick' => $is_gallery_mode ? !$disable_gallery_lightbox : true,
'lightboxHasLightBackground' => $has_light_dark_color_scheme,
'thumbnailsSize' => $thumbnails_image_size
'thumbnailsSize' => $thumbnails_image_size,
'thumbsHaveFixedHeight' => $thumbs_have_fixed_height
]);
?>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
$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';
$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' ) {
add_filter( 'tainacan-swiper-thumbs-options', function($options) {
Expand Down Expand Up @@ -56,7 +57,8 @@
'hideFileDescriptionLightbox' => $hide_file_description_lightbox,
'openLightboxOnClick' => $is_gallery_mode ? !$disable_gallery_lightbox : true,
'lightboxHasLightBackground' => $has_light_dark_color_scheme ,
'thumbnailsSize' => $thumbnails_image_size
'thumbnailsSize' => $thumbnails_image_size,
'thumbsHaveFixedHeight' => $thumbs_have_fixed_height
]);
?>
</section>
Expand Down

0 comments on commit e8460fc

Please sign in to comment.