-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
36 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<% | ||
id ||= "" | ||
color ||= "secondary" | ||
icon ||= "" | ||
classes ||= "" | ||
data ||= {} | ||
%> | ||
<%= tag.span class: "badge bg-#{color} #{classes} mb-1 mb-sm-0" do %> | ||
<%= tag.span id: id, class: "badge bg-#{color} #{classes} mb-1 mb-sm-0", data: data do %> | ||
<%= tag.i "", class: icon if icon.present? %> | ||
<%= capture(&block) %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<%= button_to like_gem_path(gem), method: :post, class: "invisible float-end btn btn-block btn-sm btn-primary", data: { controller: "like", like_gem_value: gem.slug } do %> | ||
<%= button_to like_gem_path(gem), method: :post, class: "invisible btn btn-block btn-sm btn-primary", | ||
form: { id: dom_id(gem, :like), class: "float-end animate__animated animate__fadeIn" }, data: { controller: "like", like_gem_value: gem.slug } do %> | ||
<%= tag.i "", class: "far fa-heart", data: { like_target: "icon" } %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<% suffix ||= "" %> | ||
<% classes ||= "" %> | ||
<%= render_badge(id: dom_id(gem, :likes), icon: "fas fa-heart", classes: classes) do %> | ||
<%= human_pluralize(gem.likes_count, suffix) %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<% pluralize ||= false %> | ||
<%= tag.span class: "badge bg-secondary invisible", title: "Mutually liked gems", data: { controller: "match", match_user_value: user.slug, match_gems_value: user.gem_list.to_a, match_pluralize_value: pluralize } do %> | ||
<%= tag.span id: dom_id(user, :match), class: "badge bg-secondary invisible", title: "Mutually liked gems", data: { controller: "match", match_user_value: user.slug, match_gems_value: user.gem_list.to_a, match_pluralize_value: pluralize } do %> | ||
<%= tag.i "", class: "fas fa-gem" %> | ||
<%= tag.span "", data: { match_target: "matches" } %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters