Adds option to adjust documents columns size.
This commit is contained in:
parent
4b95c60a96
commit
c71b9e48f9
|
@ -12,13 +12,9 @@ $options = [
|
||||||
[
|
[
|
||||||
blocksy_rand_md5() => [
|
blocksy_rand_md5() => [
|
||||||
'type' => 'ct-title',
|
'type' => 'ct-title',
|
||||||
'label' => __( 'Tainacan Item Elements', 'blocksy' ),
|
'label' => __( 'Tainacan Item Elements', 'blocksy-tainacan' ),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/gallery-mode.php', [
|
|
||||||
'prefix' => $post_type->name . '_single',
|
|
||||||
'enabled' => 'no'
|
|
||||||
], false),
|
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/tainacan-single-structure.php', [
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/tainacan-single-structure.php', [
|
||||||
'prefix' => $post_type->name . '_single'
|
'prefix' => $post_type->name . '_single'
|
||||||
], false),
|
], false),
|
||||||
|
@ -26,12 +22,10 @@ $options = [
|
||||||
'prefix' => $post_type->name . '_single',
|
'prefix' => $post_type->name . '_single',
|
||||||
'enabled' => 'yes'
|
'enabled' => 'yes'
|
||||||
], false),
|
], false),
|
||||||
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/document-attachments.php', [
|
||||||
|
'prefix' => $post_type->name . '_single',
|
||||||
|
], false),
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/metadata-list.php', [
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/metadata-list.php', [
|
||||||
'prefix' => $post_type->name . '_single',
|
'prefix' => $post_type->name . '_single',
|
||||||
], false),
|
], false)
|
||||||
|
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-download-button.php', [
|
|
||||||
'prefix' => $post_type->name . '_single',
|
|
||||||
'enabled' => 'no'
|
|
||||||
], false),
|
|
||||||
];
|
];
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (! isset($prefix)) {
|
||||||
|
$prefix = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
blocksy_rand_md5() => [
|
||||||
|
'type' => 'ct-condition',
|
||||||
|
'condition' => [
|
||||||
|
$prefix . 'page_structure_type' => 'type-gm|type-mg'
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
$prefix . 'document_attachments_columns' => [
|
||||||
|
'label' => __( 'Document and Attachments columns width', 'blocksy-tainacan' ),
|
||||||
|
'desc' => __( 'This option is only available when using two columns layout', 'blocksy-tainacan'),
|
||||||
|
'type' => 'ct-slider',
|
||||||
|
'value' => '60%',
|
||||||
|
'units' => blocksy_units_config([
|
||||||
|
[
|
||||||
|
'unit' => '%',
|
||||||
|
'min' => 20,
|
||||||
|
'max' => 80,
|
||||||
|
]
|
||||||
|
]),
|
||||||
|
'responsive' => false,
|
||||||
|
'divider' => 'top',
|
||||||
|
'sync' => blocksy_sync_single_post_container([
|
||||||
|
'prefix' => $prefix
|
||||||
|
])
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
];
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (! isset($prefix)) {
|
||||||
|
$prefix = '';
|
||||||
|
} else {
|
||||||
|
$prefix = $prefix . '_';
|
||||||
|
}
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
$prefix . 'document-attachments' => [
|
||||||
|
'label' => __( 'Document & Attachments', 'blocksy-tainacan' ),
|
||||||
|
'type' => 'ct-panel',
|
||||||
|
'sync' => blocksy_sync_whole_page([
|
||||||
|
'prefix' => $prefix,
|
||||||
|
]),
|
||||||
|
'inner-options' => [
|
||||||
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/gallery-mode.php', [
|
||||||
|
'prefix' => $prefix,
|
||||||
|
'enabled' => 'no'
|
||||||
|
], false),
|
||||||
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-download-button.php', [
|
||||||
|
'prefix' => $prefix,
|
||||||
|
'enabled' => 'no'
|
||||||
|
], false),
|
||||||
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/hide-files-name.php', [
|
||||||
|
'prefix' => $prefix,
|
||||||
|
'enabled' => 'no'
|
||||||
|
], false),
|
||||||
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/document-attachments-columns.php', [
|
||||||
|
'prefix' => $prefix
|
||||||
|
], false)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
|
@ -2,10 +2,7 @@
|
||||||
|
|
||||||
if (! isset($prefix)) {
|
if (! isset($prefix)) {
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
} else {
|
|
||||||
$prefix = $prefix . '_';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($enabled)) {
|
if (! isset($enabled)) {
|
||||||
$enabled = 'no';
|
$enabled = 'no';
|
||||||
}
|
}
|
||||||
|
@ -18,7 +15,7 @@ $options = [
|
||||||
'setting' => [ 'transport' => 'postMessage' ],
|
'setting' => [ 'transport' => 'postMessage' ],
|
||||||
'desc' => __( 'Merges Document and Attachments section in a single carousel.', 'blocksy-tainacan' ),
|
'desc' => __( 'Merges Document and Attachments section in a single carousel.', 'blocksy-tainacan' ),
|
||||||
'sync' => blocksy_sync_single_post_container([
|
'sync' => blocksy_sync_single_post_container([
|
||||||
'prefix' => $prefix
|
'prefix' => $prefix,
|
||||||
])
|
]),
|
||||||
]
|
]
|
||||||
];
|
];
|
|
@ -2,10 +2,7 @@
|
||||||
|
|
||||||
if (! isset($prefix)) {
|
if (! isset($prefix)) {
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
} else {
|
|
||||||
$prefix = $prefix . '_';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($enabled)) {
|
if (! isset($enabled)) {
|
||||||
$enabled = 'no';
|
$enabled = 'no';
|
||||||
}
|
}
|
||||||
|
@ -18,7 +15,7 @@ $options = [
|
||||||
'setting' => [ 'transport' => 'postMessage' ],
|
'setting' => [ 'transport' => 'postMessage' ],
|
||||||
'desc' => __( 'Toggle to never display a "Download" button when hovering the document.', 'blocksy-tainacan' ),
|
'desc' => __( 'Toggle to never display a "Download" button when hovering the document.', 'blocksy-tainacan' ),
|
||||||
'sync' => blocksy_sync_single_post_container([
|
'sync' => blocksy_sync_single_post_container([
|
||||||
'prefix' => $prefix
|
'prefix' => $prefix,
|
||||||
])
|
]),
|
||||||
]
|
]
|
||||||
];
|
];
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (! isset($prefix)) {
|
||||||
|
$prefix = '';
|
||||||
|
}
|
||||||
|
if (! isset($enabled)) {
|
||||||
|
$enabled = 'no';
|
||||||
|
}
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
$prefix . 'hide_files_name' => [
|
||||||
|
'label' => __( 'Hide files name', 'blocksy-tainacan' ),
|
||||||
|
'type' => 'ct-switch',
|
||||||
|
'value' => $enabled,
|
||||||
|
'setting' => [ 'transport' => 'postMessage' ],
|
||||||
|
'desc' => __( 'Toggle to hide the attachments and document name on the carousel.', 'blocksy-tainacan' ),
|
||||||
|
'sync' => blocksy_sync_single_post_container([
|
||||||
|
'prefix' => $prefix,
|
||||||
|
]),
|
||||||
|
]
|
||||||
|
];
|
|
@ -2,13 +2,11 @@
|
||||||
|
|
||||||
if (! isset($prefix)) {
|
if (! isset($prefix)) {
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
} else {
|
|
||||||
$prefix = $prefix . '_';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
$prefix . 'metadata_columns' => [
|
$prefix . 'metadata_columns' => [
|
||||||
'label' => __( 'Metadata columns width', 'blocksy' ),
|
'label' => __( 'Metadata columns width', 'blocksy-tainacan' ),
|
||||||
'type' => 'ct-slider',
|
'type' => 'ct-slider',
|
||||||
'value' => [
|
'value' => [
|
||||||
'mobile' => '200px',
|
'mobile' => '200px',
|
||||||
|
|
|
@ -8,22 +8,22 @@ if (! isset($prefix)) {
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
$prefix . 'metadata-list' => [
|
$prefix . 'metadata-list' => [
|
||||||
'label' => __( 'Metadata List', 'blocksy-tainacan' ),
|
'label' => __( 'Metadata list', 'blocksy-tainacan' ),
|
||||||
'type' => 'ct-panel',
|
'type' => 'ct-panel',
|
||||||
'sync' => blocksy_sync_whole_page([
|
'sync' => blocksy_sync_whole_page([
|
||||||
'prefix' => $prefix,
|
'prefix' => $prefix,
|
||||||
]),
|
]),
|
||||||
'inner-options' => [
|
'inner-options' => [
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/show-title-metadata.php', [
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/show-title-metadata.php', [
|
||||||
'prefix' => $post_type->name . '_single',
|
'prefix' => $prefix,
|
||||||
'enabled' => 'yes'
|
'enabled' => 'yes'
|
||||||
], false),
|
], false),
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/show-thumbnail.php', [
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/show-thumbnail.php', [
|
||||||
'prefix' => $post_type->name . '_single',
|
'prefix' => $prefix,
|
||||||
'enabled' => 'no'
|
'enabled' => 'no'
|
||||||
], false),
|
], false),
|
||||||
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/metadata-columns.php', [
|
blocksy_get_options(get_stylesheet_directory() . '/inc/options/single-elements/metadata-columns.php', [
|
||||||
'prefix' => $post_type->name . '_single'
|
'prefix' => $prefix
|
||||||
], false)
|
], false)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
|
|
||||||
if (! isset($prefix)) {
|
if (! isset($prefix)) {
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
} else {
|
|
||||||
$prefix = $prefix . '_';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($enabled)) {
|
if (! isset($enabled)) {
|
||||||
$enabled = 'no';
|
$enabled = 'no';
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
if (! isset($prefix)) {
|
if (! isset($prefix)) {
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
} else {
|
|
||||||
$prefix = $prefix . '_';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($enabled)) {
|
if (! isset($enabled)) {
|
||||||
|
@ -16,7 +14,7 @@ $options = [
|
||||||
'type' => 'ct-switch',
|
'type' => 'ct-switch',
|
||||||
'value' => $enabled,
|
'value' => $enabled,
|
||||||
'setting' => [ 'transport' => 'postMessage' ],
|
'setting' => [ 'transport' => 'postMessage' ],
|
||||||
'desc' => __( 'Toggle to hide or not the core title from the metadada list, as it already appears on the page title.', 'blocksy' ),
|
'desc' => __( 'Toggle to hide or not the core title from the metadada list, as it already appears on the page title.', 'blocksy-tainacan' ),
|
||||||
'sync' => blocksy_sync_single_post_container([
|
'sync' => blocksy_sync_single_post_container([
|
||||||
'prefix' => $prefix
|
'prefix' => $prefix
|
||||||
])
|
])
|
||||||
|
|
|
@ -16,27 +16,27 @@ $options = [
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'type-dam' => [
|
'type-dam' => [
|
||||||
'src' => blocksy_tainacan_image_picker_url( 'type-dam.svg' ),
|
'src' => blocksy_tainacan_image_picker_url( 'type-dam.svg' ),
|
||||||
'title' => __( 'Document, Attachments, Metadata', 'blocksy' ),
|
'title' => __( 'Document, Attachments, Metadata', 'blocksy-tainacan' ),
|
||||||
],
|
],
|
||||||
|
|
||||||
'type-dma' => [
|
'type-dma' => [
|
||||||
'src' => blocksy_tainacan_image_picker_url( 'type-dma.svg' ),
|
'src' => blocksy_tainacan_image_picker_url( 'type-dma.svg' ),
|
||||||
'title' => __( 'Document, Metadata, Attachments', 'blocksy' ),
|
'title' => __( 'Document, Metadata, Attachments', 'blocksy-tainacan' ),
|
||||||
],
|
],
|
||||||
|
|
||||||
'type-mda' => [
|
'type-mda' => [
|
||||||
'src' => blocksy_tainacan_image_picker_url( 'type-mda.svg' ),
|
'src' => blocksy_tainacan_image_picker_url( 'type-mda.svg' ),
|
||||||
'title' => __( 'Metadata, Document, Attachments', 'blocksy' ),
|
'title' => __( 'Metadata, Document, Attachments', 'blocksy-tainacan' ),
|
||||||
],
|
],
|
||||||
|
|
||||||
'type-gm' => [
|
'type-gm' => [
|
||||||
'src' => blocksy_tainacan_image_picker_url( 'type-gm.svg' ),
|
'src' => blocksy_tainacan_image_picker_url( 'type-gm.svg' ),
|
||||||
'title' => __( 'Metadata to the right', 'blocksy' ),
|
'title' => __( 'Metadata to the right', 'blocksy-tainacan' ),
|
||||||
],
|
],
|
||||||
|
|
||||||
'type-mg' => [
|
'type-mg' => [
|
||||||
'src' => blocksy_tainacan_image_picker_url( 'type-mg.svg' ),
|
'src' => blocksy_tainacan_image_picker_url( 'type-mg.svg' ),
|
||||||
'title' => __( 'Metadata to the left', 'blocksy' ),
|
'title' => __( 'Metadata to the left', 'blocksy-tainacan' ),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sync' => blocksy_sync_single_post_container([
|
'sync' => blocksy_sync_single_post_container([
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
const attachmentsThumbsSwiper = new Swiper('.swiper-container-thumbs', {
|
const attachmentsThumbsSwiper = new Swiper('.swiper-container-thumbs', {
|
||||||
spaceBetween: 12,
|
spaceBetween: 16,
|
||||||
slidesPerView: 8,
|
slidesPerView: 'auto',
|
||||||
// Responsive breakpoints
|
// Responsive breakpoints
|
||||||
breakpoints: {
|
// breakpoints: {
|
||||||
// when window width is >= 320px
|
// // when window width is >= 320px
|
||||||
320: {
|
// 320: {
|
||||||
slidesPerView: 1
|
// slidesPerView: 1
|
||||||
},
|
// },
|
||||||
// when window width is >= 480px
|
// // when window width is >= 480px
|
||||||
480: {
|
// 480: {
|
||||||
slidesPerView: 2
|
// slidesPerView: 2
|
||||||
},
|
// },
|
||||||
// when window width is >= 640px
|
// // when window width is >= 640px
|
||||||
768: {
|
// 768: {
|
||||||
slidesPerView: 3
|
// slidesPerView: 3
|
||||||
},
|
// },
|
||||||
// when window width is >= 640px
|
// // when window width is >= 640px
|
||||||
960: {
|
// 960: {
|
||||||
slidesPerView: 4
|
// slidesPerView: 4
|
||||||
},
|
// },
|
||||||
// when window width is >= 640px
|
// // when window width is >= 640px
|
||||||
1024: {
|
// 1024: {
|
||||||
slidesPerView: 5
|
// slidesPerView: 5
|
||||||
},
|
// },
|
||||||
// when window width is >= 640px
|
// // when window width is >= 640px
|
||||||
1280: {
|
// 1280: {
|
||||||
slidesPerView: 6
|
// slidesPerView: 6
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
navigation: {
|
navigation: {
|
||||||
nextEl: '.swiper-button-next',
|
nextEl: '.swiper-button-next',
|
||||||
prevEl: '.swiper-button-prev',
|
prevEl: '.swiper-button-prev',
|
||||||
|
|
|
@ -7,48 +7,68 @@
|
||||||
align-items: start;
|
align-items: start;
|
||||||
grid-column-gap: 32px;
|
grid-column-gap: 32px;
|
||||||
column-gap: 32px;
|
column-gap: 32px;
|
||||||
grid-row-gap: 2.25rem;
|
|
||||||
row-gap: 2.25rem;
|
|
||||||
|
|
||||||
.tainacan-item-section {
|
.tainacan-item-section {
|
||||||
max-width: var(--block-max-width);;
|
max-width: var(--block-max-width);;
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
align-self: start;
|
align-self: start;
|
||||||
|
margin-bottom: 2.25rem;
|
||||||
}
|
}
|
||||||
.tainacan-item-section--document { grid-area: document }
|
.tainacan-item-section--document,
|
||||||
|
.tainacan-item-section--gallery { grid-area: document }
|
||||||
.tainacan-item-section--attachments { grid-area: attachments }
|
.tainacan-item-section--attachments { grid-area: attachments }
|
||||||
.tainacan-item-section--gallery { grid-area: gallery }
|
|
||||||
.tainacan-item-section--metadata { grid-area: metadata }
|
.tainacan-item-section--metadata { grid-area: metadata }
|
||||||
|
|
||||||
&.tainacan-item-single--layout-type-dam {
|
&.tainacan-item-single--layout-type-dam {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'document'
|
'document'
|
||||||
'attachments'
|
'attachments'
|
||||||
'metadata';
|
'metadata';
|
||||||
|
grid-template-columns: 100%;
|
||||||
}
|
}
|
||||||
&.tainacan-item-single--layout-type-dma {
|
&.tainacan-item-single--layout-type-dma {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'document'
|
'document'
|
||||||
'metadata'
|
'metadata'
|
||||||
'attachments';
|
'attachments';
|
||||||
|
grid-template-columns: 100%;
|
||||||
}
|
}
|
||||||
&.tainacan-item-single--layout-type-mda {
|
&.tainacan-item-single--layout-type-mda {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'metadata'
|
'metadata'
|
||||||
'document'
|
'document'
|
||||||
'attachments';
|
'attachments';
|
||||||
|
grid-template-columns: 100%;
|
||||||
}
|
}
|
||||||
&.tainacan-item-single--layout-type-mg {
|
&.tainacan-item-single--layout-type-mg {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'metadata gallery document'
|
'metadata document'
|
||||||
'metadata gallery attachments'
|
'metadata attachments'
|
||||||
'metadata . .'
|
'metadata .';
|
||||||
|
grid-template-columns: 60% 40%;
|
||||||
|
|
||||||
|
@media only screen and (max-width: 960px) {
|
||||||
|
grid-template-areas:
|
||||||
|
'metadata'
|
||||||
|
'document'
|
||||||
|
'attachments';
|
||||||
|
grid-template-columns: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.tainacan-item-single--layout-type-gm {
|
&.tainacan-item-single--layout-type-gm {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'gallery document metadata'
|
'document metadata'
|
||||||
'gallery attachments metadata'
|
'attachments metadata'
|
||||||
'. . metadata'
|
'. metadata';
|
||||||
|
grid-template-columns: 60% 40%;
|
||||||
|
|
||||||
|
@media only screen and (max-width: 960px) {
|
||||||
|
grid-template-areas:
|
||||||
|
'document'
|
||||||
|
'attachments'
|
||||||
|
'metadata';
|
||||||
|
grid-template-columns: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Headings and spacing ----------------------------
|
// Headings and spacing ----------------------------
|
||||||
|
@ -159,7 +179,7 @@
|
||||||
.tainacan-item-section__gallery-items,
|
.tainacan-item-section__gallery-items,
|
||||||
.tainacan-item-section__attachments {
|
.tainacan-item-section__attachments {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 60px;
|
padding: 0px;
|
||||||
|
|
||||||
.swiper-button-disabled {
|
.swiper-button-disabled {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -167,7 +187,17 @@
|
||||||
.swiper-button-next,
|
.swiper-button-next,
|
||||||
.swiper-button-prev {
|
.swiper-button-prev {
|
||||||
top: 65px;
|
top: 65px;
|
||||||
}
|
padding: 20px;
|
||||||
|
border-radius: 30px;
|
||||||
|
background-color: var(--background-color, #f8f9fb);
|
||||||
|
border: 1px solid var(--paletteColor1, #3eaf7c);
|
||||||
|
}
|
||||||
|
.swiper-button-prev, .swiper-container-rtl .swiper-button-next {
|
||||||
|
left: -20px;
|
||||||
|
}
|
||||||
|
.swiper-button-next, .swiper-container-rtl .swiper-button-prev {
|
||||||
|
right: -20px;
|
||||||
|
}
|
||||||
.swiper-slide-thumb-active {
|
.swiper-slide-thumb-active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
img {
|
img {
|
||||||
|
@ -185,7 +215,7 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
//padding: 0 6px;
|
max-width: 157px;
|
||||||
|
|
||||||
@media only screen and (max-width: 380px) {
|
@media only screen and (max-width: 380px) {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
|
@ -196,6 +226,7 @@
|
||||||
width: 140px;
|
width: 140px;
|
||||||
height: 140px;
|
height: 140px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
transition: border-bottom 0.3s ease;
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
@ -225,6 +256,7 @@
|
||||||
}
|
}
|
||||||
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
||||||
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
--swiper-navigation-size: 1.1rem;
|
||||||
|
|
||||||
// Photoswip zoom ---------------------------------
|
// Photoswip zoom ---------------------------------
|
||||||
.pswp__zoom-wrap .attachment-without-image {
|
.pswp__zoom-wrap .attachment-without-image {
|
||||||
|
|
56
style.css
56
style.css
|
@ -316,19 +316,20 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
align-items: start;
|
align-items: start;
|
||||||
grid-column-gap: 32px;
|
grid-column-gap: 32px;
|
||||||
column-gap: 32px;
|
column-gap: 32px;
|
||||||
grid-row-gap: 2.25rem;
|
|
||||||
row-gap: 2.25rem;
|
|
||||||
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
--swiper-theme-color: var(--paletteColor1, #3eaf7c);
|
||||||
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
--swiper-navigation-color: var(--paletteColor1, #3eaf7c);
|
||||||
|
--swiper-navigation-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single .tainacan-item-section {
|
.tainacan-item-single .tainacan-item-section {
|
||||||
max-width: var(--block-max-width);
|
max-width: var(--block-max-width);
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
align-self: start;
|
align-self: start;
|
||||||
|
margin-bottom: 2.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single .tainacan-item-section--document {
|
.tainacan-item-single .tainacan-item-section--document,
|
||||||
|
.tainacan-item-single .tainacan-item-section--gallery {
|
||||||
grid-area: document;
|
grid-area: document;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,32 +337,47 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
grid-area: attachments;
|
grid-area: attachments;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single .tainacan-item-section--gallery {
|
|
||||||
grid-area: gallery;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tainacan-item-single .tainacan-item-section--metadata {
|
.tainacan-item-single .tainacan-item-section--metadata {
|
||||||
grid-area: metadata;
|
grid-area: metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single.tainacan-item-single--layout-type-dam {
|
.tainacan-item-single.tainacan-item-single--layout-type-dam {
|
||||||
grid-template-areas: 'document' 'attachments' 'metadata';
|
grid-template-areas: 'document' 'attachments' 'metadata';
|
||||||
|
grid-template-columns: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single.tainacan-item-single--layout-type-dma {
|
.tainacan-item-single.tainacan-item-single--layout-type-dma {
|
||||||
grid-template-areas: 'document' 'metadata' 'attachments';
|
grid-template-areas: 'document' 'metadata' 'attachments';
|
||||||
|
grid-template-columns: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single.tainacan-item-single--layout-type-mda {
|
.tainacan-item-single.tainacan-item-single--layout-type-mda {
|
||||||
grid-template-areas: 'metadata' 'document' 'attachments';
|
grid-template-areas: 'metadata' 'document' 'attachments';
|
||||||
|
grid-template-columns: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single.tainacan-item-single--layout-type-mg {
|
.tainacan-item-single.tainacan-item-single--layout-type-mg {
|
||||||
grid-template-areas: 'metadata gallery document' 'metadata gallery attachments' 'metadata . .';
|
grid-template-areas: 'metadata document' 'metadata attachments' 'metadata .';
|
||||||
|
grid-template-columns: 60% 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 960px) {
|
||||||
|
.tainacan-item-single.tainacan-item-single--layout-type-mg {
|
||||||
|
grid-template-areas: 'metadata' 'document' 'attachments';
|
||||||
|
grid-template-columns: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single.tainacan-item-single--layout-type-gm {
|
.tainacan-item-single.tainacan-item-single--layout-type-gm {
|
||||||
grid-template-areas: 'gallery document metadata' 'gallery attachments metadata' '. . metadata';
|
grid-template-areas: 'document metadata' 'attachments metadata' '. metadata';
|
||||||
|
grid-template-columns: 60% 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 960px) {
|
||||||
|
.tainacan-item-single.tainacan-item-single--layout-type-gm {
|
||||||
|
grid-template-areas: 'document' 'attachments' 'metadata';
|
||||||
|
grid-template-columns: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single h1 {
|
.tainacan-item-single h1 {
|
||||||
|
@ -483,7 +499,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
.tainacan-item-single .tainacan-item-section__gallery-items,
|
.tainacan-item-single .tainacan-item-section__gallery-items,
|
||||||
.tainacan-item-single .tainacan-item-section__attachments {
|
.tainacan-item-single .tainacan-item-section__attachments {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 60px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single .tainacan-item-section__gallery-items .swiper-button-disabled,
|
.tainacan-item-single .tainacan-item-section__gallery-items .swiper-button-disabled,
|
||||||
|
@ -496,6 +512,22 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
.tainacan-item-single .tainacan-item-section__attachments .swiper-button-next,
|
.tainacan-item-single .tainacan-item-section__attachments .swiper-button-next,
|
||||||
.tainacan-item-single .tainacan-item-section__attachments .swiper-button-prev {
|
.tainacan-item-single .tainacan-item-section__attachments .swiper-button-prev {
|
||||||
top: 65px;
|
top: 65px;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 30px;
|
||||||
|
background-color: var(--background-color, #f8f9fb);
|
||||||
|
border: 1px solid var(--paletteColor1, #3eaf7c);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single .tainacan-item-section__gallery-items .swiper-button-prev, .tainacan-item-single .tainacan-item-section__gallery-items .swiper-container-rtl .swiper-button-next,
|
||||||
|
.tainacan-item-single .tainacan-item-section__attachments .swiper-button-prev,
|
||||||
|
.tainacan-item-single .tainacan-item-section__attachments .swiper-container-rtl .swiper-button-next {
|
||||||
|
left: -20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tainacan-item-single .tainacan-item-section__gallery-items .swiper-button-next, .tainacan-item-single .tainacan-item-section__gallery-items .swiper-container-rtl .swiper-button-prev,
|
||||||
|
.tainacan-item-single .tainacan-item-section__attachments .swiper-button-next,
|
||||||
|
.tainacan-item-single .tainacan-item-section__attachments .swiper-container-rtl .swiper-button-prev {
|
||||||
|
right: -20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single .tainacan-item-section__gallery-items .swiper-slide-thumb-active,
|
.tainacan-item-single .tainacan-item-section__gallery-items .swiper-slide-thumb-active,
|
||||||
|
@ -521,6 +553,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
|
max-width: 160px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 380px) {
|
@media only screen and (max-width: 380px) {
|
||||||
|
@ -536,6 +569,7 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
height: 140px;
|
height: 140px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
transition: border-bottom 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file img:focus,
|
.tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file img:focus,
|
||||||
|
|
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
|
@ -13,7 +13,24 @@ do_action( 'blocksy-tainacan-single-item-top' );
|
||||||
|
|
||||||
do_action( 'blocksy-tainacan-single-item-after-title' );
|
do_action( 'blocksy-tainacan-single-item-after-title' );
|
||||||
|
|
||||||
echo '<div class="tainacan-item-single tainacan-item-single--layout-'. get_theme_mod( $prefix . '_page_structure_type', 'type-dam') . '">';
|
$page_structure_type = get_theme_mod( $prefix . '_page_structure_type', 'type-dam');
|
||||||
|
$template_columns_style = '';
|
||||||
|
|
||||||
|
if ($page_structure_type == 'type-gm' || $page_structure_type == 'type-mg') {
|
||||||
|
$column_documents_attachments_width = 60;
|
||||||
|
$column_metadata_width = 40;
|
||||||
|
|
||||||
|
$column_documents_attachments_width = intval(substr(get_theme_mod( $prefix . '_document_attachments_columns', '60%'), 0, -1));
|
||||||
|
$column_metadata_width = 100 - $column_documents_attachments_width;
|
||||||
|
|
||||||
|
if ($page_structure_type == 'type-gm') {
|
||||||
|
$template_columns_style = 'grid-template-columns: ' . $column_documents_attachments_width . '% calc(' . $column_metadata_width . '% - 32px)';
|
||||||
|
} else {
|
||||||
|
$template_columns_style = 'grid-template-columns: ' . $column_metadata_width . '% calc(' . $column_documents_attachments_width . '% - 32px)';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<div class="tainacan-item-single tainacan-item-single--layout-'. $page_structure_type . '" style="' . $template_columns_style .'">';
|
||||||
|
|
||||||
get_template_part( 'template-parts/tainacan-item-single-document' );
|
get_template_part( 'template-parts/tainacan-item-single-document' );
|
||||||
do_action( 'blocksy-tainacan-single-item-after-document' );
|
do_action( 'blocksy-tainacan-single-item-after-document' );
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
|
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
?>
|
?>
|
||||||
<span class="swiper-slide-name <?php if (get_theme_mod('tainacan_single_item_hide_files_name', false)) echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
|
<span class="swiper-slide-name <?php if (get_theme_mod( $prefix . '_hide_files_name', 'no') == 'yes') echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
|
echo wp_get_attachment_image( $attachment->ID, 'blocksy-tainacan-item-attachments', true );
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
?>
|
?>
|
||||||
<span class="swiper-slide-name <?php if (get_theme_mod('tainacan_single_item_hide_files_name', false)) echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
|
<span class="swiper-slide-name <?php if (get_theme_mod( $prefix . '_hide_files_name', 'no') == 'yes') echo 'sr-only' ?>"><?php echo get_the_title( $attachment->ID ); ?></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif;
|
<?php endif;
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
the_post_thumbnail('tainacan-medium');
|
the_post_thumbnail('tainacan-medium');
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
?>
|
?>
|
||||||
<span class="swiper-slide-name <?php if (get_theme_mod('tainacan_single_item_hide_files_name', false)) echo 'sr-only' ?>"><?php echo __( 'Document', 'blocksy-tainacan' ); ?></span>
|
<span class="swiper-slide-name <?php if (get_theme_mod( $prefix . '_hide_files_name', 'no') == 'yes') echo 'sr-only' ?>"><?php echo __( 'Document', 'blocksy-tainacan' ); ?></span>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php foreach ( $attachments as $attachment ) {
|
<?php foreach ( $attachments as $attachment ) {
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
<?php echo esc_html( get_theme_mod($prefix . '_section_metadata_label', __( 'Metadata', 'blocksy-tainacan' ) ) ); ?>
|
<?php echo esc_html( get_theme_mod($prefix . '_section_metadata_label', __( 'Metadata', 'blocksy-tainacan' ) ) ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="tainacan-item-section__metadata" style="column-width: <?php echo get_theme_mod( $prefix . '_metadata_columns', ['mobile' => '200px', 'tablet' => '300px', 'desktop' => '400px' ] )['desktop'] ?>">
|
<div
|
||||||
|
class="tainacan-item-section__metadata"
|
||||||
|
style="column-width: <?php echo get_theme_mod( $prefix . '_metadata_columns', ['mobile' => '200px', 'tablet' => '300px', 'desktop' => '400px' ] )['desktop'] ?>">
|
||||||
<?php if (has_post_thumbnail() && (get_theme_mod($prefix . '_show_thumbnail', 'no') === 'yes') ): ?>
|
<?php if (has_post_thumbnail() && (get_theme_mod($prefix . '_show_thumbnail', 'no') === 'yes') ): ?>
|
||||||
<div class="tainacan-item-section__metadata-thumbnail">
|
<div class="tainacan-item-section__metadata-thumbnail">
|
||||||
<h3><?php _e( 'Thumbnail', 'blocksy-tainacan' ); ?></h3>
|
<h3><?php _e( 'Thumbnail', 'blocksy-tainacan' ); ?></h3>
|
||||||
|
|
Loading…
Reference in New Issue