Use social-share-button whatsapp icon

We were using a custom icon because in the past social-share-button
didn't have support for whatsapp. But now that it does, we can remove
our custom icon.

Note we're using the `_app` suffix because that's the name of the icon
meant for mobile devices.
This commit is contained in:
Javi Martín
2020-08-23 21:40:54 +02:00
parent ae8afc9b75
commit 0d8119a1e3
12 changed files with 96 additions and 36 deletions

View File

@@ -1,7 +1,5 @@
<% description = local_assigns.fetch(:description, "") %>
<% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %>
<% mobile = local_assigns[:mobile] %>
<% mobile_url = mobile.present? ? "#{mobile.gsub(/\s+/, "%20")}%20" : "" %>
<% if local_assigns[:share_title].present? %>
<div id="social-share" class="sidebar-divider"></div>
@@ -13,10 +11,6 @@
image: local_assigns.fetch(:image_url, ""),
desc: description,
"data-twitter-title": local_assigns[:mobile],
"data-telegram-title": local_assigns[:mobile]) %>
<a href="whatsapp://send?text=<%= mobile_url %><%= url %>"
class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span>
<span class="show-for-sr"><%= t("social.whatsapp") %></span>
</a>
"data-telegram-title": local_assigns[:mobile],
"data-whatsapp_app-title": local_assigns[:mobile]) %>
</div>