Applies photo zoom on main gallery instead of thumbnails when using gallery mode of attachments.

This commit is contained in:
mateuswetah 2021-02-28 00:26:12 -03:00
parent 7423a06668
commit bb71302a2d
6 changed files with 28 additions and 11 deletions

View File

@ -243,5 +243,6 @@ var initPhotoSwipeFromDOM = function(gallerySelector) {
}; };
// execute above function // execute above function
initPhotoSwipeFromDOM(".swiper-wrapper"); initPhotoSwipeFromDOM(".tainacan-item-section__gallery .swiper-wrapper");
initPhotoSwipeFromDOM(".tainacan-item-section__attachments .swiper-wrapper");

View File

@ -163,6 +163,9 @@
list-style: none; list-style: none;
padding: 0; padding: 0;
} }
li {
cursor: zoom-in;
}
.tainacan-item-section__document { .tainacan-item-section__document {
margin: 0; margin: 0;
img { img {
@ -212,10 +215,15 @@
list-style: none; list-style: none;
padding: 0; padding: 0;
} }
&:not(.tainacan-item-section__gallery-items) {
.tainacan-item-section__attachments-file,
.tainacan-item-section__attachments-file>a {
cursor: zoom-in;
}
}
.tainacan-item-section__attachments-file { .tainacan-item-section__attachments-file {
text-align: center; text-align: center;
vertical-align: top; vertical-align: top;
cursor: zoom-in;
word-break: break-all; word-break: break-all;
font-size: 0.875em; font-size: 0.875em;
max-width: calc(var(--attachments-size, 157px) + 17px); max-width: calc(var(--attachments-size, 157px) + 17px);
@ -252,7 +260,6 @@
max-width: var(--attachments-size, 140px); max-width: var(--attachments-size, 140px);
text-align: center; text-align: center;
word-break: break-all; word-break: break-all;
cursor: zoom-in;
} }
a, a,
a:focus, a:focus,

View File

@ -354,8 +354,8 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
display: -ms-grid; display: -ms-grid;
display: grid; display: grid;
align-items: start; align-items: start;
grid-column-gap: 32px; grid-column-gap: 48px;
column-gap: 32px; column-gap: 48px;
--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; --swiper-navigation-size: 1.1rem;
@ -522,6 +522,10 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
padding: 0; padding: 0;
} }
.tainacan-item-single .tainacan-item-section__gallery li {
cursor: zoom-in;
}
.tainacan-item-single .tainacan-item-section__gallery .tainacan-item-section__document { .tainacan-item-single .tainacan-item-section__gallery .tainacan-item-section__document {
margin: 0; margin: 0;
} }
@ -591,11 +595,17 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
padding: 0; padding: 0;
} }
.tainacan-item-single .tainacan-item-section__gallery-items:not(.tainacan-item-section__gallery-items) .tainacan-item-section__attachments-file,
.tainacan-item-single .tainacan-item-section__gallery-items:not(.tainacan-item-section__gallery-items) .tainacan-item-section__attachments-file > a,
.tainacan-item-single .tainacan-item-section__attachments:not(.tainacan-item-section__gallery-items) .tainacan-item-section__attachments-file,
.tainacan-item-single .tainacan-item-section__attachments:not(.tainacan-item-section__gallery-items) .tainacan-item-section__attachments-file > a {
cursor: zoom-in;
}
.tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file, .tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file,
.tainacan-item-single .tainacan-item-section__attachments .tainacan-item-section__attachments-file { .tainacan-item-single .tainacan-item-section__attachments .tainacan-item-section__attachments-file {
text-align: center; text-align: center;
vertical-align: top; vertical-align: top;
cursor: zoom-in;
word-break: break-all; word-break: break-all;
font-size: 0.875em; font-size: 0.875em;
max-width: calc(var(--attachments-size, 157px) + 17px); max-width: calc(var(--attachments-size, 157px) + 17px);
@ -643,7 +653,6 @@ body:not(.tainacan-admin-page) .tainacan-modal-content .modal-card-body {
max-width: var(--attachments-size, 140px); max-width: var(--attachments-size, 140px);
text-align: center; text-align: center;
word-break: break-all; word-break: break-all;
cursor: zoom-in;
} }
.tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file a, .tainacan-item-single .tainacan-item-section__gallery-items .tainacan-item-section__attachments-file a,

File diff suppressed because one or more lines are too long

2
style.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long