From ddc10e9679fe02a3ff291093ea18e01a104054c3 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Wed, 2 Apr 2025 15:25:46 +0800 Subject: [PATCH] style: update wiki data badge layout - Wrap badge content in a div for better layout. - Maintain existing functionality and styling while improving structure. This change enhances the HTML structure of the wiki data badge by encapsulating the link in a div element, which aids in layout management without altering the way the component functions or displays. --- app/views/shared/_wiki_data_badge.html.erb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/views/shared/_wiki_data_badge.html.erb b/app/views/shared/_wiki_data_badge.html.erb index d6b5de7..89ff4d3 100644 --- a/app/views/shared/_wiki_data_badge.html.erb +++ b/app/views/shared/_wiki_data_badge.html.erb @@ -1,12 +1,14 @@ <% 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