views: factor out FontAwesome icons.
Factor out FontAwesome icons into a set of helpers. This is so that it's easier to keep track of which icons we're using and easier to change icons globally.
This commit is contained in:
@@ -52,11 +52,11 @@
|
||||
<% if policy(Favorite).create? %>
|
||||
<%= content_tag(:div, class: "fav-buttons fav-buttons-#{@post.favorited_by?(CurrentUser.user)}") do %>
|
||||
<%= form_tag(favorites_path(post_id: @post.id), method: "post", id: "add-fav-button", "data-remote": true) do %>
|
||||
<%= button_tag tag.i(class: "far fa-heart"), class: "ui-button ui-widget ui-corner-all", "data-disable-with": tag.i(class: "fas fa-spinner fa-spin") %>
|
||||
<%= button_tag favorite_icon, class: "ui-button ui-widget ui-corner-all", "data-disable-with": spinner_icon %>
|
||||
<% end %>
|
||||
|
||||
<%= form_tag(favorite_path(@post.id), method: "delete", id: "remove-fav-button", "data-remote": true) do %>
|
||||
<%= button_tag tag.i(class: "fas fa-heart"), class: "ui-button ui-widget ui-corner-all", "data-disable-with": tag.i(class: "fas fa-spinner fa-spin") %>
|
||||
<%= button_tag favorite_icon, class: "ui-button ui-widget ui-corner-all", "data-disable-with": spinner_icon %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user