Browse Source

fix(): Cleaning up the shared link

main
Elia el Lazkani 3 months ago
parent
commit
0700288e80
  1. 34
      layouts/partials/share.html

34
layouts/partials/share.html

@ -0,0 +1,34 @@
<ul>
{{ $icon_class_name := .Scratch.Get "icon_class_name"}}
{{ if .Description }}
{{ .Scratch.Set "description" .Description }}
{{ else }}
{{ .Scratch.Set "description" .Summary }}
{{ end }}
{{ $description := .Scratch.Get "description" }}
<li>
<a class="icon" href="https://getpocket.com/save?url={{ .Permalink }}&title={{ .Title }}" aria-label="Pocket">
<i class="fab fa-get-pocket {{ $icon_class_name }}" aria-hidden="true"></i>
</a>
</li>
<li>
<a class="icon" href="mailto:?subject={{ .Title }}&body=Check out this article: {{ .Permalink }}" aria-label="Email">
<i class="fas fa-envelope {{ $icon_class_name }}" aria-hidden="true"></i>
</a>
</li>
<li>
<a class="icon" href="https://twitter.com/share?url={{ .Permalink }}&text={{ .Title }}" aria-label="Twitter">
<i class="fab fa-twitter {{ $icon_class_name }}" aria-hidden="true"></i>
</a>
</li>
<li>
<a class="icon" href="http://reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" aria-label="reddit">
<i class="fab fa-reddit {{ $icon_class_name }}" aria-hidden="true"></i>
</a>
</li>
<li>
<a class="icon" href="http://www.linkedin.com/shareArticle?url={{ .Permalink }}&title={{ .Title }}" aria-label="Linkedin">
<i class="fab fa-linkedin {{ $icon_class_name }}" aria-hidden="true"></i>
</a>
</li>
</ul>
Loading…
Cancel
Save