[openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)
Anton Khorev
notifications at github.com
Thu Aug 15 13:13:19 UTC 2024
@AntonKhorev commented on this pull request.
> + sites = opts.fetch(:allow_sites, [])
+ valid_sites, invalid_sites = SocialShareButtonHelper.filter_allowed_sites(sites)
+
+ # Log invalid sites
+ invalid_sites.each do |invalid_site|
+ Rails.logger.error("Invalid site or icon not configured: #{invalid_site}")
+ end
+
+ tag.div(
+ :class => "social-share-button d-flex gap-1 align-items-end flex-wrap"
+ ) do
+ valid_sites.map do |site|
+ link_to SocialShareButtonHelper.generate_share_url(site, opts), {
+ :rel => ["nofollow", opts[:rel]].compact,
+ :class => "ssb-icon",
+ :title => "Share on #{site.capitalize}"
This needs to be translated.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4985#pullrequestreview-2240365935
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4985/review/2240365935 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240815/e84667d5/attachment.htm>
More information about the rails-dev
mailing list