[openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

Anton Khorev notifications at github.com
Wed Dec 18 14:09:51 UTC 2024


@AntonKhorev commented on this pull request.



> @@ -75,4 +76,32 @@ def render_flash(flash)
   rescue StandardError
     flash.inspect if Rails.env.development?
   end
+
+  # Generates a set of social share buttons based on the specified options.
+  def render_social_share_buttons(opts = {})
+    sites = opts.fetch(:allow_sites, [])

We can probably use it if sharing on some site requires some setting, to filter out that site if it's not set, like if we add Mastodon host preference.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4985#discussion_r1890302583
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4985/review/2511952351 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241218/4eaa7bcc/attachment-0001.htm>


More information about the rails-dev mailing list