[openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)
Anton Khorev
notifications at github.com
Wed Aug 14 04:26:34 UTC 2024
@AntonKhorev commented on this pull request.
> + :url => opts[:url],
+ :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);"
`onclick` is probably some leftover because it refers to `SocialShareButton` which doesn't exist
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4985#pullrequestreview-2237145449
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4985/review/2237145449 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240813/051b6a4d/attachment.htm>
More information about the rails-dev
mailing list