Adds copy URL link #9. Adds WhatsApp and Telegram sharing options. Adjusts to collection item header.

This commit is contained in:
mateuswetah 2020-06-16 13:00:07 -03:00
parent 5122da8054
commit 73f98d8f30
16 changed files with 233 additions and 43 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -0,0 +1,39 @@
function fallbackCopyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.value = text;
textArea.style.setProperty('display', 'none');
textArea.style.setProperty('visibility', 'hidden');
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
try {
var successful = document.execCommand('copy');
var msg = successful ? 'successful' : 'unsuccessful';
console.log('Fallback: Copying text command was ' + msg);
if (msg == 'successful') {
alert(tainacan_copyLinkVars.linkCopied);
}
} catch (err) {
console.error('Fallback: Oops, unable to copy', err);
}
document.body.removeChild(textArea);
}
function copyTextToClipboard(text) {
if (!navigator.clipboard) {
fallbackCopyTextToClipboard(text);
return;
}
navigator.clipboard.writeText(text)
.then(() => {
console.log('Async: Copying to clipboard was successful!');
alert(tainacan_copyLinkVars.linkCopied);
},
(err) => {
console.error('Async: Could not copy text: ', err);
});
}

View File

@ -297,12 +297,12 @@ $numOfElems: 8;
@for $i from 1 through $numOfElems {
$deg: 360deg / $numOfElems;
.rotater:nth-child(#{$i}) {
transform: rotate($deg/-2 + $deg * ($i - 1));
transform: rotate($deg/-2 + $deg * ($i - 2));
}
.collection-header--share.active {
.rotater:nth-child(#{$i}) .btn-icon {
transform: translateX(-4em) rotate($deg/2 - $deg * ($i - 1));
transform: translateX(-4em) rotate($deg/2 - $deg * ($i - 2));
}
}
}

View File

@ -1,8 +1,7 @@
.tainacan-single-post {
.aside-thumbnail,
&.aside-thumbnail {
margin-left: calc(12.5% + 12px);
margin-left: calc(12.5vw + 12px);
margin-left: 200px;
p {
font-size: 0.875rem;
font-weight: normal;
@ -14,9 +13,12 @@
margin: 0 60px 0 0px;
}
@media screen and (max-width: 1526px) {
margin-left: calc(4.166667% + 165px);
}
@media screen and (max-width: 768px) {
margin-left: calc(20.833333% + 12px);
margin-left: calc(20.833333vw + 12px);
margin-left: calc(4.166667% + 115px);
}
}
&.single-item-collection-banner {
@ -51,7 +53,6 @@
display: flex;
justify-content: space-between;
align-items: baseline;
width: calc(100% - (12.5vw + 12px));
p, h1 {
display: inline-block;
@ -64,22 +65,21 @@
z-index: 9;
img {
max-height: 185px;
max-width: calc(12.5% - 12px);
max-width: calc(12.5vw - 12px);
width: 185px;
height: 185px;
top: -88px;
border-width: 3px !important;
@media screen and (max-width: 1400px) {
top: -56px;
top: -6vw;
margin-left: 12px;
@media screen and (max-width: 1526px) {
left: 4.1666667vw;
top: -68px;
height: 150px;
width: 150px;
}
@media screen and (max-width: 768px) {
max-width: calc(20.83333% - 12px);
top: calc(-1 * (8.3333% + 12px));
max-width: calc(20.83333vw - 12px);
top: calc(-1 * (8.3333vw + 12px));
top: -45px;
height: 110px;
width: 110px;
}
}
.image-placeholder {
@ -118,6 +118,7 @@
float: left;
padding-top: 0;
padding-bottom: 0;
padding-left: 0;
top: initial;
.btn {
@ -130,16 +131,9 @@
font-size: 1.25rem;
}
}
.rotater:nth-child(1) .btn-icon {
transform: translateX(-4em) translateY(1em) rotate(22.5deg);
}
.rotater:nth-child(2) .btn-icon {
transform: translateX(-3em) translateY(-1em) rotate(-22.5deg);
}
.icons {
position: absolute;
top: 0;
left: 0;
position: relative;
top: 50%;
}
}
}

View File

@ -852,6 +852,15 @@ nav{
.page-link {
margin: 12px auto;
}
.tainacan-copy-link-button,
.tainacan-copy-link-button:hover,
.tainacan-copy-link-button:focus {
border: none;
box-shadow: none;
padding: 0;
margin: 0;
background: none;
}
// Item appear animation, used in some view modes.
@keyframes item-appear {

View File

@ -142,6 +142,36 @@ function tainacan_customize_register( $wp_customize ) {
'section' => 'tainacan_social_share',
) );
// WhatsApp
$wp_customize->add_setting( 'tainacan_whatsapp_share', array(
'type' => 'theme_mod',
'default' => false,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'tainacan_callback_sanitize_checkbox',
) );
$wp_customize->add_control( 'tainacan_whatsapp_share', array(
'type' => 'checkbox',
'settings' => 'tainacan_whatsapp_share',
'section' => 'tainacan_social_share',
'label' => __( 'Display WhatsApp button', 'tainacan-interface' ),
) );
// Telegram
$wp_customize->add_setting( 'tainacan_telegram_share', array(
'type' => 'theme_mod',
'default' => false,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'tainacan_callback_sanitize_checkbox',
) );
$wp_customize->add_control( 'tainacan_telegram_share', array(
'type' => 'checkbox',
'settings' => 'tainacan_telegram_share',
'section' => 'tainacan_social_share',
'label' => __( 'Display Telegram button', 'tainacan-interface' ),
) );
/**
* Add color scheme setting and control.
*/

View File

@ -58,6 +58,12 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
wp_register_script( 'tainacan_tainacanJS', get_template_directory_uri() . '/assets/js/js.js', '', TAINACAN_INTERFACE_VERSION, true );
wp_enqueue_script( 'tainacan_tainacanJS' );
wp_enqueue_script( 'tainacan_copyLink', get_template_directory_uri() . '/assets/js/copy-link.js', [] , TAINACAN_INTERFACE_VERSION, false );
wp_localize_script( 'tainacan_copyLink', 'tainacan_copyLinkVars', array(
'linkCopied' => __( 'Copied! Link sent to the transfer area.', 'tainacan-interface' )
));
// Tainacan Icons
wp_register_style( 'TainacanIconsFont', get_template_directory_uri() . '/assets/fonts/tainacan-icons-font/css/tainacanicons.min.css', '', '1.0.3', '' );
wp_enqueue_style( 'TainacanIconsFont' );
@ -68,6 +74,7 @@ if ( ! function_exists( 'tainacan_enqueues' ) ) {
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
} // End if().
add_action( 'wp_enqueue_scripts', 'tainacan_enqueues' );

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
<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 echo esc_url( home_url( $wp->request ) ); ?>" target="_blank">
<a href="http://www.facebook.com/sharer.php?u=<?php echo esc_url( home_url( $wp->request ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-facebook"></i>
</div>
@ -15,12 +15,37 @@
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_twitter_share', true ) && get_theme_mod( 'tainacan_twitter_user' ) ) : ?>
<div class="rotater">
<a href="http://twitter.com/share?url=<?php echo esc_url( home_url( $wp->request ) ); ?>&amp;text=<?php the_title_attribute(); ?>&amp;via=<?php echo esc_attr( get_theme_mod( 'tainacan_twitter_user', '' ) ); ?>" target="_blank">
<a href="http://twitter.com/share?url=<?php echo esc_url( home_url( $wp->request ) ); ?>&amp;text=<?php the_title_attribute(); ?>&amp;via=<?php echo esc_attr( get_theme_mod( 'tainacan_twitter_user', '' ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-twitter"></i>
</div>
</a>
</div>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_whatsapp_share', false ) ) : ?>
<div class="rotater">
<a href="https://api.whatsapp.com/send?1=pt_BR&text=<?php echo esc_url( home_url( $wp->request ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-whatsapp"></i>
</div>
</a>
</div>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_telegram_share', false ) ) : ?>
<div class="rotater">
<a href="https://t.me/share/url?url=<?php echo esc_url( home_url( $wp->request ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-telegram"></i>
</div>
</a>
</div>
<?php endif; ?>
<div class="rotater">
<button onclick="copyTextToClipboard('<?php echo esc_url( home_url( $wp->request ) ); ?>')" title="<?php esc_attr_e('Copy link', 'tainacan-interface') ?>" class="tainacan-copy-link-button">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-url"></i>
</div>
</button>
</div>
</div>
</div>

View File

@ -54,7 +54,7 @@ echo '</style>';
<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 echo esc_url( home_url( $wp->request ) ); ?>" target="_blank">
<a href="http://www.facebook.com/sharer.php?u=<?php echo esc_url( home_url( $wp->request ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-facebook"></i>
</div>
@ -63,13 +63,38 @@ echo '</style>';
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_twitter_share', true ) && get_theme_mod( 'tainacan_twitter_user' ) ) : ?>
<div class="rotater">
<a href="http://twitter.com/share?url=<?php echo esc_url( home_url( $wp->request ) ); ?>&amp;text=<?php tainacan_the_collection_name(); ?>&amp;via=<?php echo esc_attr( get_theme_mod( 'tainacan_twitter_user', '' ) ); ?>" target="_blank">
<a href="http://twitter.com/share?url=<?php echo esc_url( home_url( $wp->request ) ); ?>&amp;text=<?php tainacan_the_collection_name(); ?>&amp;via=<?php echo esc_attr( get_theme_mod( 'tainacan_twitter_user', '' ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-twitter"></i>
</div>
</a>
</div>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_whatsapp_share', false ) ) : ?>
<div class="rotater">
<a href="https://api.whatsapp.com/send?1=pt_BR&text=<?php echo esc_url( home_url( $wp->request ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-whatsapp"></i>
</div>
</a>
</div>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_telegram_share', false ) ) : ?>
<div class="rotater">
<a href="https://t.me/share/url?url=<?php echo esc_url( home_url( $wp->request ) ); ?>" target="_blank" title="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-telegram"></i>
</div>
</a>
</div>
<?php endif; ?>
<div class="rotater">
<button onclick="copyTextToClipboard('<?php echo esc_url( home_url( $wp->request ) ); ?>')" title="<?php esc_attr_e('Copy link', 'tainacan-interface') ?>" class="tainacan-copy-link-button">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-url"></i>
</div>
</button>
</div>
</div>
</div>
</div>

View File

@ -42,17 +42,30 @@ $src = wp_get_attachment_image_src($image, 'full');
<div class="page-header-icons">
<p class="share-title"><?php _e('Share', 'tainacan-interface'); ?></p>
<?php if ( true == get_theme_mod( 'tainacan_facebook_share', true ) ) : ?>
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_term_link((int) $current_term->get_id()); ?>" class="share-link" target="_blank">
<a href="http://www.facebook.com/sharer.php?u=<?php echo get_term_link((int) $current_term->get_id()); ?>" title="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>" class="share-link" target="_blank">
<img src="<?php echo get_template_directory_uri() . '/assets/images/facebook-circle.png'; ?>" alt="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>" class="share-images">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_twitter_share', true ) ) : ?>
<?php $twitter_option = get_option( 'tainacan_twitter_user' ); ?>
<?php $via = ! empty( $twitter_option ) ? '&amp;via=' . esc_attr( get_option( 'tainacan_twitter_user' ) ) : ''; ?>
<a href="http://twitter.com/share?url=<?php echo get_term_link((int) $current_term->get_id()); ?>&amp;text=<?php echo $current_taxonomy->labels->name . ':' . $current_term->get_name(); ?><?php echo $via; ?>" target="_blank" class="share-link">
<a href="http://twitter.com/share?url=<?php echo get_term_link((int) $current_term->get_id()); ?>&amp;text=<?php echo $current_taxonomy->labels->name . ':' . $current_term->get_name(); ?><?php echo $via; ?>" target="_blank" title="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>" class="share-link">
<img src="<?php echo get_template_directory_uri() . '/assets/images/twitter-circle.png'; ?>" alt="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>" class="share-images">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_whatsapp_share', false ) ) : ?>
<a href="https://api.whatsapp.com/send?1=pt_BR&text=<?php echo get_term_link((int) $current_term->get_id()); ?>" class="share-link" target="_blank" title="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>">
<img src="<?php echo get_template_directory_uri() . '/assets/images/whatsapp-circle.png'; ?>" alt="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>" class="share-images">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_telegram_share', false ) ) : ?>
<a href="https://t.me/share/url?url=<?php echo get_term_link((int) $current_term->get_id()); ?>" class="share-link" target="_blank" title="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>">
<img src="<?php echo get_template_directory_uri() . '/assets/images/telegram-circle.png'; ?>" alt="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>" class="share-images">
</a>
<?php endif; ?>
<button onclick="copyTextToClipboard('<?php echo get_term_link((int) $current_term->get_id()); ?>')" title="<?php esc_attr_e('Copy link', 'tainacan-interface') ?>" class="share-link tainacan-copy-link-button">
<img src="<?php echo get_template_directory_uri() . '/assets/images/url-circle.png'; ?>" alt="<?php esc_attr_e('Copy link', 'tainacan-interface') ?>" class="share-images">
</button>
</div>
</div>
</div>

View File

@ -89,7 +89,7 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
<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">
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" target="_blank" title="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-facebook"></i>
</div>
@ -102,18 +102,43 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
$twitter_option = get_theme_mod( 'tainacan_twitter_user' );
$via = ! empty( $twitter_option ) ? '&amp;via=' . esc_attr( get_theme_mod( 'tainacan_twitter_user' ) ) : '';
?>
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank">
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" title="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-twitter"></i>
</div>
</a>
</div>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_whatsapp_share', false ) ) : ?>
<div class="rotater">
<a href="https://api.whatsapp.com/send?1=pt_BR&text=<?php the_permalink(); ?>" target="_blank" title="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-whatsapp"></i>
</div>
</a>
</div>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_telegram_share', false ) ) : ?>
<div class="rotater">
<a href="https://t.me/share/url?url=<?php the_permalink(); ?>" target="_blank" title="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-telegram"></i>
</div>
</a>
</div>
<?php endif; ?>
<div class="rotater">
<button onclick="copyTextToClipboard('<?php the_permalink(); ?>')" title="<?php esc_attr_e('Copy link', 'tainacan-interface') ?>" class="tainacan-copy-link-button">
<div class="btn btn-icon">
<i class="tainacan-icon tainacan-icon-url"></i>
</div>
</button>
</div>
</div>
</div>
<?php endif; ?>
<div class="tainacan-single-item-heading item-title aside-thumbnail">
<div class="title-page">
<div class="tainacan-single-item-heading item-title">
<div class="title-page aside-thumbnail">
<p><?php echo __('Item', 'tainacan-interface') ?></p>
<h1><?php the_title(); ?></h1>
</div>
@ -145,7 +170,7 @@ if (get_theme_mod('tainacan_single_item_collection_header', false)) {
<div class="mt-3 tainacan-single-post collection-single-item">
<?php endif; ?>
<header class="mb-4 tainacan-content">
<div class="header-meta text-muted mb-5">
<div class="header-meta text-muted mb-2">
<?php
if ( !get_theme_mod('tainacan_single_item_hide_item_meta', false) ) {
echo '<span class="time">';

View File

@ -23,7 +23,7 @@
<h3><?php _e( 'Share', 'tainacan-interface' ); ?></h3>
<div class="btn-group" role="group">
<?php if ( true == get_theme_mod( 'tainacan_facebook_share', true ) ) : ?>
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" class="item-card-link--sharing" target="_blank">
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" class="item-card-link--sharing" target="_blank" title="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>">
<img src="<?php echo esc_url( get_template_directory_uri() ) . '/assets/images/facebook-circle.png'; ?>" alt="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>">
</a>
<?php endif; ?>
@ -32,10 +32,20 @@
$twitter_option = get_theme_mod( 'tainacan_twitter_user' );
$via = ! empty( $twitter_option ) ? '&amp;via=' . esc_attr( get_theme_mod( 'tainacan_twitter_user' ) ) : '';
?>
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" class="item-card-link--sharing">
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" class="item-card-link--sharing" title="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>">
<img src="<?php echo esc_url( get_template_directory_uri() ) . '/assets/images/twitter-circle.png'; ?>" alt="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_whatsapp_share', false ) ) : ?>
<a href="https://api.whatsapp.com/send?1=pt_BR&text=<?php the_permalink(); ?>" target="_blank" class="item-card-link--sharing" title="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>">
<img src="<?php echo get_template_directory_uri() . '/assets/images/whatsapp-circle.png'; ?>" alt="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_telegram_share', false ) ) : ?>
<a href="https://t.me/share/url?url=<?php the_permalink(); ?>" target="_blank" class="item-card-link--sharing" title="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>">
<img src="<?php echo get_template_directory_uri() . '/assets/images/telegram-circle.png'; ?>" alt="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>">
</a>
<?php endif; ?>
</div>
</div>
</div>

View File

@ -7,17 +7,30 @@
<?php } ?>
<div class="btn-group ml-auto" role="group">
<?php if ( true == get_theme_mod( 'tainacan_facebook_share', true ) ) : ?>
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" class="" target="_blank">
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" target="_blank" title="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>">
<img src="<?php echo esc_url( get_template_directory_uri() ) . '/assets/images/facebook-circle.png'; ?>" alt="<?php esc_attr_e('Share this on facebook', 'tainacan-interface') ?>">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_twitter_share', true ) ) : ?>
<?php $twitter_option = get_theme_mod( 'tainacan_twitter_user' ); ?>
<?php $via = ! empty( $twitter_option ) ? '&amp;via=' . esc_attr( get_theme_mod( 'tainacan_twitter_user' ) ) : ''; ?>
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" class="">
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" title="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>">
<img src="<?php echo esc_url( get_template_directory_uri() ) . '/assets/images/twitter-circle.png'; ?>" alt="<?php esc_attr_e('Share this on twitter', 'tainacan-interface') ?>">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_whatsapp_share', false ) ) : ?>
<a href="https://api.whatsapp.com/send?1=pt_BR&text=<?php the_permalink(); ?>" target="_blank" title="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>">
<img src="<?php echo get_template_directory_uri() . '/assets/images/whatsapp-circle.png'; ?>" alt="<?php esc_attr_e('Share this on WhatsApp', 'tainacan-interface') ?>" class="share-images">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'tainacan_telegram_share', false ) ) : ?>
<a href="https://t.me/share/url?url=<?php the_permalink(); ?>" target="_blank" title="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>">
<img src="<?php echo get_template_directory_uri() . '/assets/images/telegram-circle.png'; ?>" alt="<?php esc_attr_e('Share this on Telegram', 'tainacan-interface') ?>" class="share-images">
</a>
<?php endif; ?>
<button onclick="copyTextToClipboard('<?php the_permalink(); ?>')" title="<?php esc_attr_e('Copy link', 'tainacan-interface') ?>" class="tainacan-copy-link-button">
<img src="<?php echo get_template_directory_uri() . '/assets/images/url-circle.png'; ?>" alt="<?php esc_attr_e('Copy link', 'tainacan-interface') ?>" class="share-images">
</button>
</div>
</div>
<?php the_post_thumbnail(); ?>