7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-12-24 12:55:44 +00:00
web-ansol.org/themes/academic/layouts/partials/share.html

21 lines
737 B
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
{{ if and site.Params.sharing (ne .Params.share false) }}
<div class="share-box" aria-hidden="true">
<ul class="share">
{{ range where site.Data.page_sharer.buttons "enable" true }}
{{ $pack := or .icon_pack "fas" }}
{{ $pack_prefix := $pack }}
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
{{ $pack_prefix = "fa" }}
{{ end }}
{{ $link := replace .url "{url}" ($.Permalink | htmlEscape) }}
{{ $link = replace $link "{title}" ($.Title | htmlEscape) }}
<li>
<a href="{{$link|safeURL}}" target="_blank" rel="noopener" class="share-btn-{{.id}}">
<i class="{{$pack}} {{$pack_prefix}}-{{.icon}}"></i>
</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}