Adds sharing buttons to collection banner inside item single page.
This commit is contained in:
parent
5140cf9b1c
commit
29e7a8b1a2
|
@ -5,9 +5,11 @@
|
|||
overflow: inherit;
|
||||
}
|
||||
}
|
||||
.t-bg-collection{
|
||||
.t-bg-collection {
|
||||
background-color: #2c2d2d;
|
||||
min-height: 150px;
|
||||
z-index: 1;
|
||||
|
||||
@media only screen and (max-width: 768px){
|
||||
min-height: 130px;
|
||||
}
|
||||
|
@ -113,8 +115,9 @@
|
|||
min-height: 65px;
|
||||
margin-bottom: 1.25rem;
|
||||
.tainacan-interface-more, .tainacan-interface-less {
|
||||
color: rgba(255, 255, 255, 0.60);
|
||||
color: #cbcbcb;
|
||||
white-space: nowrap;
|
||||
opacity: 0.75;
|
||||
}
|
||||
&.full-story {
|
||||
height: auto;
|
||||
|
@ -238,6 +241,7 @@
|
|||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 1.0rem;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
h1 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
margin: 0 60px 0 0px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
|
@ -41,6 +41,7 @@
|
|||
}
|
||||
|
||||
.collection-name {
|
||||
color: white;
|
||||
margin-bottom: -2px;
|
||||
margin-top: 38px;
|
||||
}
|
||||
|
@ -71,6 +72,50 @@
|
|||
top: calc(-1 * (8.3333vw + 12px));
|
||||
}
|
||||
}
|
||||
.image-placeholder {
|
||||
height: calc(12.5% - 12px);
|
||||
width: calc(12.5% - 12px);
|
||||
max-width: calc(12.5% - 12px);
|
||||
top: calc(-1 * (4.166667% + 12px));
|
||||
height: calc(12.5vw - 12px);
|
||||
width: calc(12.5vw - 12px);
|
||||
max-width: calc(12.5vw - 12px);
|
||||
top: calc(-1 * (4.166667vw + 12px));
|
||||
border-width: 3px !important;
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
height: calc(20.83333% - 12px);
|
||||
width: calc(20.83333% - 12px);
|
||||
max-width: calc(20.83333% - 12px);
|
||||
top: calc(-1 * (8.3333% + 12px));
|
||||
height: calc(20.83333vw - 12px);
|
||||
width: calc(20.83333vw - 12px);
|
||||
max-width: calc(20.83333vw - 12px);
|
||||
top: calc(-1 * (8.3333vw + 12px));
|
||||
|
||||
h4 {
|
||||
font-size: 2.0rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.collection-header--share {
|
||||
position: relative;
|
||||
float: left;
|
||||
.btn {
|
||||
max-width: 35px;
|
||||
border: 2px solid white;
|
||||
background: #2c2d2d;
|
||||
|
||||
.tainacan-icon {
|
||||
color: white;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
article{
|
||||
|
|
|
@ -290,7 +290,7 @@ function tainacan_customize_register( $wp_customize ) {
|
|||
'priority' => 3, // Within the section.
|
||||
'section' => 'tainacan_single_item_page',
|
||||
'label' => __( 'Display share buttons', 'tainacan-interface' ),
|
||||
'description' => __( 'Toggle to show or not the social icon share buttons, within the metadata list section.', 'tainacan-interface' )
|
||||
'description' => __( 'Toggle to show or not the social icon share buttons, within the metadata list section or collection banner.', 'tainacan-interface' )
|
||||
) );
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -61,14 +61,48 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
global $wp;
|
||||
if (get_theme_mod( 'tainacan_single_item_display_share_buttons', true )) : ?>
|
||||
<div class="collection-header--share">
|
||||
<div class="btn trigger">
|
||||
<span class="tainacan-icon tainacan-icon-share"></span>
|
||||
</div>
|
||||
|
||||
<div class="icons">
|
||||
<?php if ( true == get_theme_mod( 'tainacan_facebook_share', true ) ) : ?>
|
||||
<div class="rotater">
|
||||
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" target="_blank">
|
||||
<div class="btn btn-icon">
|
||||
<i class="tainacan-icon tainacan-icon-facebook"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( true == get_theme_mod( 'tainacan_twitter_share', true ) && get_theme_mod( 'tainacan_twitter_user' ) ) : ?>
|
||||
<div class="rotater">
|
||||
<?php
|
||||
$twitter_option = get_theme_mod( 'tainacan_twitter_user' );
|
||||
$via = ! empty( $twitter_option ) ? '&via=' . esc_attr( get_theme_mod( 'tainacan_twitter_user' ) ) : '';
|
||||
?>
|
||||
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank">
|
||||
<div class="btn btn-icon">
|
||||
<i class="tainacan-icon tainacan-icon-twitter"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="item-title aside-thumbnail">
|
||||
<div class="title-page">
|
||||
<p><?php echo __('Item', 'tainacan-interface') ?></p>
|
||||
<h1><?php the_title(); ?></h1>
|
||||
</div>
|
||||
<div class="title-back">
|
||||
<!--<div class="title-back">
|
||||
<a href="javascript:history.go(-1)"><?php _e( 'Back', 'tainacan-interface' ); ?></a>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
@ -91,7 +125,7 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
|
|||
<?php do_action( 'tainacan-interface-single-item-after-title' ); ?>
|
||||
|
||||
<?php if ( get_theme_mod('tainacan_single_item_collection_header', false) ): ?>
|
||||
<div class="mt-3 tainacan-single-post collection-single-item aside-thumbnail">
|
||||
<div class="mt-2 tainacan-single-post collection-single-item aside-thumbnail">
|
||||
<?php else : ?>
|
||||
<div class="mt-3 tainacan-single-post collection-single-item">
|
||||
<?php endif; ?>
|
||||
|
@ -122,6 +156,10 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
|
|||
</article>
|
||||
</div>
|
||||
|
||||
<?php if ( get_theme_mod('tainacan_single_item_collection_header', false) ): ?>
|
||||
<br>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'tainacan-interface-single-item-after-document' ); ?>
|
||||
|
||||
<?php if ( tainacan_has_document() && !get_theme_mod( 'tainacan_single_item_gallery_mode', false )) : ?>
|
||||
|
@ -263,7 +301,7 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
|
|||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (get_theme_mod( 'tainacan_single_item_display_share_buttons', true )): ?>
|
||||
<?php if (!get_theme_mod('tainacan_single_item_collection_header', false) && get_theme_mod( 'tainacan_single_item_display_share_buttons', true )): ?>
|
||||
<div class="card border-0 mb-3">
|
||||
<div class="card-body bg-white border-0 pl-0 pt-0 pb-1">
|
||||
<h3><?php _e( 'Share', 'tainacan-interface' ); ?></h3>
|
||||
|
|
Loading…
Reference in New Issue