[openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)
Anton Khorev
notifications at github.com
Wed Aug 14 05:03:24 UTC 2024
@AntonKhorev commented on this pull request.
> + :desc => opts[:desc],
+ :via => opts[:via]
+ }
+ ) do
+ social_buttons = valid_sites.filter_map do |site|
+ if SocialShareButtonHelper.icon_path(site).empty?
+ Rails.logger.error("Invalid site: #{site}")
+ next
+ end
+
+ link_to "", {
+ :rel => ["nofollow", opts[:rel]].compact,
+ :data => { :site => site, :title => opts[:title], :desc => opts[:desc], :url => opts[:url] },
+ :class => "social-share-button ssb-icon",
+ :onclick => "return SocialShareButton.share(this);"
+ } do
There probably should also be a `title` attribute with "Share on (platform)" value.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4985#pullrequestreview-2237175096
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4985/review/2237175096 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240813/11c8dee6/attachment-0001.htm>
More information about the rails-dev
mailing list