Commit 5fcac162 authored by Kaushal Modi's avatar Kaushal Modi

Support Mastodon syndication links

parent 9508850e
......@@ -1423,8 +1423,15 @@ a.pagination-item {
}
/* Twitter Syndication */
/* https://www.lockedownseo.com/social-media-colors/#twitter */
.u-syndication.twitter:hover {
color: #00aced;
color: #1da1f2;
}
/* Mastodon Syndication */
/* https://www.lockedownseo.com/social-media-colors/#mastodon */
.u-syndication.mastodon:hover {
/* color: #282c37; */
color: #2b90d9;
}
/* * Code Blocks: pre,.. */
......
......@@ -24,6 +24,14 @@
{{ $.Scratch.Set "__syndication_link" (printf "%sstatus/%d" .link $val) }}
{{ $.Scratch.Set "__syndication_class" (.name | lower) }}
{{ end }}
{{ else if (eq $key "mastodon") }}
{{ if (and $val_is_string (not (eq $val "")) (not (eq $val "0"))) }}
{{ $.Scratch.Set "__syndication_link" (printf "%s/%s" .link $val) }}
{{ $.Scratch.Set "__syndication_class" (.name | lower) }}
{{ else if (gt $val 0) }}
{{ $.Scratch.Set "__syndication_link" (printf "%s/%d" .link $val) }}
{{ $.Scratch.Set "__syndication_class" (.name | lower) }}
{{ end }}
{{ end }}
{{ if ($.Scratch.Get "__syndication_class") }}
<a rel="syndication"
......@@ -31,7 +39,7 @@
href="{{ $.Scratch.Get "__syndication_link" }}"
title="This post was syndicated to {{ .name }}">
<i class="fab fa-{{ if .icon }}{{ .icon }}{{ else }}{{ lower .name }}{{ end }}"></i>
</a>
</a>&nbsp;
{{ end }}
{{ end }}
{{ end }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment