71 lines
2.2 KiB
HTML
71 lines
2.2 KiB
HTML
<!-- Social Share Button HTML -->
|
|
{{ $title := .Title }}
|
|
{{ $url := printf "%s" .Permalink }}
|
|
{{ $body := print $title ", by " .Site.Title "\n" .Params.description "\n\n" $url "\n" }}
|
|
|
|
🚀 Condividi questo contenuto:
|
|
|
|
<div class="social-share">
|
|
<ul class="share-icons">
|
|
<!-- Mastodon -->
|
|
{{ if .Site.Params.socialshare.mastodon }}
|
|
<li>
|
|
<a href="https://mastodon.uno/share?text={{ .Title }}, {{ .Permalink }}" target="_blank" class="share-btn mastodon">
|
|
<i class="fa fa-mastodon"></i>
|
|
<p>Mastodon</p>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
|
|
<!-- Twitter -->
|
|
{{ if .Site.Params.socialshare.twitter }}
|
|
<li>
|
|
<a href="https://twitter.com/intent/tweet?url={{ .Permalink }}&text={{ .Title }}, " target="_blank" rel="noopener" aria-label="Share on Twitter" class="share-btn twitter">
|
|
<i class="fa fa-twitter"></i>
|
|
<p>Twitter</p>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
|
|
<!-- Facebook -->
|
|
{{ if .Site.Params.socialshare.facebook }}
|
|
<li>
|
|
<a href="https://www.facebook.com/sharer.php?u={{ $url }}" target="_blank" rel="noopener" aria-label="Share on Facebook" class="share-btn facebook">
|
|
<i class="fa fa-facebook"></i>
|
|
<p>Facebook</p>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
|
|
<!-- LinkedIn -->
|
|
{{ if .Site.Params.socialshare.linkedin }}
|
|
<li>
|
|
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ $url }}&source={{ $url }}&title={{ $title }}&summary={{ $title }}" target="_blank" rel="noopener" aria-label="Share on LinkedIn" class="share-btn linkedin">
|
|
<i class="fa fa-linkedin"></i>
|
|
<p>LinkedIn</p>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
|
|
<!-- WhatsApp -->
|
|
{{ if .Site.Params.socialshare.whatsapp }}
|
|
<li>
|
|
<a href="whatsapp://send?text={{ $body }}" target="_blank" class="share-btn whatsapp">
|
|
<i class="fa fa-whatsapp"></i>
|
|
<p>Email</p>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
|
|
<!-- Email -->
|
|
{{ if .Site.Params.socialshare.email }}
|
|
<li>
|
|
<a href="mailto:?subject={{ .Site.Title }} - {{ $title }}.&body={{ $body }}" target="_blank" class="share-btn email">
|
|
<i class="fa fa-envelope"></i>
|
|
<p>Email</p>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|