<div class="c-share u-flex">
<a href="#" class="u-mr-xsmall">
<div class="c-share__item c-share__item--facebook u-flex u-items-center u-justify-center">
<svg class="o-icon--md o-icon--fill-inverse ">
<use xlink:href="#icon-facebook" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
</div>
</a>
<a href="#" class="u-mr-xsmall">
<div class="c-share__item c-share__item--twitter u-flex u-items-center u-justify-center">
<svg class="o-icon--md o-icon--fill-inverse ">
<use xlink:href="#icon-twitter" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
</div>
</a>
<a href="#" class="u-mr-xsmall">
<div class="c-share__item c-share__item--whatsapp u-flex u-items-center u-justify-center">
<svg class="o-icon--md o-icon--fill-inverse ">
<use xlink:href="#icon-whatsapp" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
</div>
</a>
<a href="#" class="u-mr-xsmall">
<div class="c-share__item c-share__item--email u-flex u-items-center u-justify-center">
<svg class="o-icon--md o-icon o-icon--inverse ">
<use xlink:href="#icon-email" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
</div>
</a>
</div>
<div class="c-share u-flex">
{% if native %}
{% render "@button--default", {label: 'Condividi', icon:'share', size: 'small'}, true %}
{% else %}
{% for social in share %}
<a href="#" class="u-mr-xsmall">
<div class="c-share__item c-share__item--{{social}} u-flex u-items-center u-justify-center">
<svg class="o-icon--md {% if social=="email"%} o-icon o-icon--inverse {% else %} o-icon--fill-inverse {% endif %}">
<use xlink:href="#icon-{{social}}" xmlns:xlink="http://www.w3.org/1999/xlink"></use>
</svg>
</div>
</a>
{% endfor %}
{% endif %}
</div>
{
"share": [
"facebook",
"twitter",
"whatsapp",
"email"
]
}
// Name: Social share
// Description: Social share widget for items
//
// Component: `c-share`
//
// Dependencies: `settings/v7/colors.tokens`
//
// ========================================================================
// Variables
// ========================================================================
$share-item-rounded: 50%;
$share-item-size: 2.5rem;
$shares: ( //
facebook: #3b5998,
twitter: #1da1f2,
whatsapp: #25d366,
email: $ui-06
);
// Styles
// ========================================================================
.c-share {
&__item {
width: $share-item-size;
height: $share-item-size;
border-radius: $share-item-rounded;
@each $social, $color in $shares {
&--#{$social} {
background-color: $color;
&:hover {
background-color: lighten($color, 5%);
}
}
}
}
}
No notes defined.