Begins support to start slideshow from grid view mode.

This commit is contained in:
mateuswetah 2020-08-07 18:08:01 -03:00
parent cd9c3390eb
commit 24a70a4208
3 changed files with 39 additions and 14 deletions

View File

@ -56,21 +56,43 @@
&:hover { &:hover {
background-color: #dbdbdb; background-color: #dbdbdb;
p.metadata-title { text-decoration: none !important; } .metadata-title { text-decoration: none !important; }
} }
p.metadata-title { .metadata-title {
flex-shrink: 0; flex-shrink: 0;
font-size: 0.875rem;
margin-bottom: 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding: 0.6rem 1.5rem; padding: 0.6rem 1.5rem;
text-align: left; text-align: left;
color: #1d1d1d; color: #1d1d1d;
text-decoration: none !important; text-decoration: none !important;
} position: relative;
p {
font-size: 0.875rem;
margin-bottom: 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
button.slideshow-icon {
border: none;
background: none;
box-shadow: none;
color: var(--tainacan-info-color);
position: absolute;
right: 7px;
top: 9px;
transform: scale(0.0);
transition: transform 0.2s ease;
}
}
&:hover,
&:focus {
button.slideshow-icon {
transform: scale(1.0);
}
}
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -2,12 +2,15 @@
<div class="tainacan-grid-container"> <div class="tainacan-grid-container">
<?php while ( have_posts() ) : the_post(); ?> <?php $item_index = 0; while ( have_posts() ) : the_post(); ?>
<a class="tainacan-grid-item" href="<?php the_permalink(); ?>"> <a class="tainacan-grid-item" href="<?php the_permalink(); ?>">
<p class="metadata-title"> <div class="metadata-title">
<?php the_title(); ?> <p><?php the_title(); ?></p>
</p> <a href="?<?php echo $_SERVER['QUERY_STRING'] ?>&slideshow-from=<?php echo $item_index ?>" class="icon slideshow-icon">
<i class="tainacan-icon tainacan-icon-viewgallery tainacan-icon-1-125em"></i>
</a>
</div>
<?php if ( has_post_thumbnail() ) : ?> <?php if ( has_post_thumbnail() ) : ?>
<div <div
style="background-image: url(<?php the_post_thumbnail_url( 'tainacan-medium' ) ?>)" style="background-image: url(<?php the_post_thumbnail_url( 'tainacan-medium' ) ?>)"
@ -25,7 +28,7 @@
<?php endif; ?> <?php endif; ?>
</a> </a>
<?php endwhile; ?> <?php $item_index++; endwhile; ?>
</div> </div>