mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
Fix two issues with the Mastodon share link. Mastodon was not given a new line unlike all the other share links, so it was showing up right next to Tumblr. Second, the code that generated query params seems to have been copied from Tumblr or Facebook without properly testing it and does not fill in the textbox correctly. Fix this so the prefilled "Toot" matches what Twitter share would post.
16 lines
847 B
Text
16 lines
847 B
Text
<%
|
|
if !defined?(page_uri)
|
|
page_uri = site.uri
|
|
end
|
|
%>
|
|
<a href="/site/<%= site.username %>.rss" target="_blank"><span>RSS/Atom Feed</span></a>
|
|
<br>
|
|
<a href="https://facebook.com/sharer.php?u=<%= Rack::Utils.build_query(u: "#{page_uri}") %>" target="_blank">Facebook</a>
|
|
<br>
|
|
<a href="https://twitter.com/intent/tweet?<%= Rack::Utils.build_query(text: "#{site.title}: #{page_uri}") %>" target="_blank">Twitter</a>
|
|
<br>
|
|
<a href="https://www.reddit.com/submit?<%= Rack::Utils.build_query(title: "#{site.title}", url: "#{page_uri}" )%>" target="_blank">Reddit</a>
|
|
<br>
|
|
<a href="https://www.tumblr.com/share?<%= Rack::Utils.build_query(v: 3, u: "#{page_uri}", t: "#{site.title}") %>" target="_blank">Tumblr</a>
|
|
<br>
|
|
<a href="https://toot.kytta.dev/?<%= Rack::Utils.build_query(text: "#{site.title}: #{page_uri}") %>" target="_blank">Mastodon</a>
|