From 435244777c44eb030890dbcdfbbab399893b5e73 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Wed, 2 Apr 2025 15:37:51 +0800 Subject: [PATCH] style: simplify wiki data badge display - Removed unnecessary div wrappers from the wiki data badge - Cleaned up the code for better readability This change enhances the markup simplicity without affecting the functionality, ensuring the badge displays correctly while maintaining the same styling. --- app/views/shared/_wiki_data_badge.html.erb | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/app/views/shared/_wiki_data_badge.html.erb b/app/views/shared/_wiki_data_badge.html.erb index a7574cb..d6b5de7 100644 --- a/app/views/shared/_wiki_data_badge.html.erb +++ b/app/views/shared/_wiki_data_badge.html.erb @@ -1,14 +1,12 @@ <% if city.wiki_data_id.present? %> -
- <%= link_to "https://www.wikidata.org/wiki/#{city.wiki_data_id}", - target: "_blank", - rel: "noopener noreferrer", - class: "badge badge-lg badge-outline badge-info gap-2", - data: { controller: "tooltip", tooltip_target: "tooltip", tooltip_content: "View on WikiData" } do %> - - - - <%= t("text.wiki_data") %> - <% end %> -
+ <%= link_to "https://www.wikidata.org/wiki/#{city.wiki_data_id}", + target: "_blank", + rel: "noopener noreferrer", + class: "badge badge-lg badge-outline badge-info gap-2", + data: { controller: "tooltip", tooltip_target: "tooltip", tooltip_content: "View on WikiData" } do %> + + + + <%= t("text.wiki_data") %> + <% end %> <% end %> \ No newline at end of file