Skip to content

Commit

Permalink
fix share links
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed May 2, 2024
1 parent 93c54e6 commit 5d6ca9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions themes/hugo-coder/layouts/partials/share.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<hr style="margin-top: 5rem;">
{{ $title := .Title }}
{{ $url := printf "%s" .Permalink | absLangURL }}
{{ $body := print $title ", by " .Site.Title "\n" .Params.description "\n\n" $url "\n" }}
<div id="sharing" style="font-style: italic; display: flex; gap: 5px; align-items: center;">
<p>Share on: </p>
<a href="https://twitter.com/intent/post?{{ $title }}, by @zansara_dev=test&url={{ $url }}" aria-label="share on Twitter">
Expand All @@ -10,10 +9,10 @@
<a href="https://mastodonshare.com/?text={{ $title }}, by @[email protected]&url={{ $url }}" aria-label="share on Mastodon">
<div style="height:40px;width:40px;background:#ffffff;padding:5px;border-radius: 3px;">{{ partial "assets/mastodon.svg" }}</div>
</a>
<a href="https://www.linkedin.com/shareArticle?url={{ $url }}&title={{ $title }}, by " aria-label="share on LinkedIn">
<a href="https://www.linkedin.com/shareArticle?url={{ $url }}" aria-label="share on LinkedIn">
<div style="height:40px;width:40px;background:#ffffff;padding:5px;border-radius: 3px;">{{ partial "assets/linkedin.svg" }}</div>
</a>
<a href="mailto:?subject={{ $title }}, by Sara Zan.&body={{ $body }}"aria-label="share by email">
<a href="mailto:?subject={{ $title }}, by Sara Zan.&body={{ $url }}"aria-label="share by email">
<div style="height:40px;width:40px;background:#ffffff;padding:5px;border-radius: 3px;">{{ partial "assets/email.svg" }}</div>
</a>
</div>
2 changes: 1 addition & 1 deletion themes/hugo-coder/layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="title">
{{ .Content }}
</div>

{{ partial "partials/share.html" }}
{{ partial "partials/share.html" . }}
</article>

{{ partial "posts/math.html" . }}
Expand Down

0 comments on commit 5d6ca9c

Please sign in to comment.