Links to collection on items single page collection banner. #16.

This commit is contained in:
mateuswetah 2020-04-09 17:11:05 -03:00
parent 140cc349ef
commit bf72df3d06
3 changed files with 22 additions and 15 deletions

View File

@ -44,6 +44,9 @@
color: white;
margin-bottom: -2px;
margin-top: 38px;
a {
color: white;
}
}
.item-title {
display: flex;

File diff suppressed because one or more lines are too long

View File

@ -42,24 +42,28 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
<div class="collection-name aside-thumbnail">
<div class="title-page">
<p><?php echo __('Collection', 'tainacan-interface') ?></p>
<h1><?php tainacan_the_collection_name(); ?></h1>
<h1><a href="<?php tainacan_the_collection_url(); ?>">
<?php tainacan_the_collection_name(); ?>
</a></h1>
</div>
</div>
</div>
<div class="collection-thumbnail">
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :
$thumbnail_id = get_post_thumbnail_id( $post->ID );
$alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?>
<img src="<?php echo get_the_post_thumbnail_url( tainacan_get_collection_id() ); ?>" class="t-collection--info-img rounded-circle img-fluid border border-white position-absolute text-left" alt="<?php echo esc_attr($alt); ?>">
<?php else : ?>
<div class="image-placeholder rounded-circle border border-white position-absolute">
<h4 class="text-center">search=ful
<?php
echo esc_html( tainacan_get_initials( tainacan_get_the_collection_name() ) );
?>
</h4>
</div>
<?php endif; ?>
<a href="<?php tainacan_the_collection_url(); ?>">
<?php if ( has_post_thumbnail( tainacan_get_collection_id() ) ) :
$thumbnail_id = get_post_thumbnail_id( $post->ID );
$alt = get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true); ?>
<img src="<?php echo get_the_post_thumbnail_url( tainacan_get_collection_id() ); ?>" class="t-collection--info-img rounded-circle img-fluid border border-white position-absolute text-left" alt="<?php echo esc_attr($alt); ?>">
<?php else : ?>
<div class="image-placeholder rounded-circle border border-white position-absolute">
<h4 class="text-center">
<?php
echo esc_html( tainacan_get_initials( tainacan_get_the_collection_name() ) );
?>
</h4>
</div>
<?php endif; ?>
</a>
</div>
<?php
global $wp;