[openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)
Emin Kocan
notifications at github.com
Thu Aug 15 01:39:15 UTC 2024
@kcne 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
Makes sense, so I added it.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4985#discussion_r1717769512
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4985/review/2239484219 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240814/55d9367d/attachment.htm>
More information about the rails-dev
mailing list