Center attachments carousel with insufficient slides and adds edit link to item page.

This commit is contained in:
mateuswetah 2021-02-27 13:15:47 -03:00
parent aa49315478
commit 26482f9f5b
7 changed files with 19 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# Blocksy Tainacan
## What's this about?
## What is this about?
This project contains the source code necessary for integrating Tainacan pages to Blocksy theme. It allows you to choose betweent two strategies: either having a child theme or a plugin that does the job.
@ -44,6 +44,6 @@ const BLOCKSY_TAINACAN_IS_PLUGIN = true;
Then move all files to a folder inside WordPress plugins folder (`wp-content/plugins`);
Donwload and activate the theme Blocksy;
Download and activate the theme Blocksy;
Go ahead, enable Blocksy theme and have fun ;)
Then you just have to enable Blocksy theme and have fun ;)

View File

@ -6,7 +6,8 @@ const attachmentsThumbsSwiper = new Swiper('.swiper-container-thumbs', {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
autoplay: false
autoplay: false,
centerInsufficientSlides: true
});
const attachmentsMainSwiper = new Swiper('.swiper-container-main', {
slidesPerView: 1,

View File

@ -223,7 +223,7 @@
@media only screen and (max-width: 380px) {
margin: 10px 0;
}
img {
border-radius: var(--borderRadius, 3px);
width: var(--attachments-size, 140px);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 449 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -44,4 +44,15 @@ if ($page_structure_type == 'type-gm' || $page_structure_type == 'type-mg') {
?>
</div>
<div class="tainacan-item-single">
<?php
// Edit item button
if ( function_exists('tainacan_the_item_edit_link') ) {
echo '<span class="tainacan-edit-item-collection">';
tainacan_the_item_edit_link();
echo '</span>';
}
?>
</div>
<?php do_action( 'blocksy-tainacan-single-item-bottom' ); ?>