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.
This commit is contained in:
parent
025ee0d06a
commit
ddc10e9679
@ -1,12 +1,14 @@
|
|||||||
<% if city.wiki_data_id.present? %>
|
<% if city.wiki_data_id.present? %>
|
||||||
<%= link_to "https://www.wikidata.org/wiki/#{city.wiki_data_id}",
|
<div class="badge badge-lg badge-ghost">
|
||||||
target: "_blank",
|
<%= link_to "https://www.wikidata.org/wiki/#{city.wiki_data_id}",
|
||||||
rel: "noopener noreferrer",
|
target: "_blank",
|
||||||
class: "badge badge-lg badge-outline badge-info gap-2",
|
rel: "noopener noreferrer",
|
||||||
data: { controller: "tooltip", tooltip_target: "tooltip", tooltip_content: "View on WikiData" } do %>
|
class: "badge badge-lg badge-outline badge-info gap-2",
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
data: { controller: "tooltip", tooltip_target: "tooltip", tooltip_content: "View on WikiData" } do %>
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||||
</svg>
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
<%= t("text.wiki_data") %>
|
</svg>
|
||||||
<% end %>
|
<%= t("text.wiki_data") %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
Loading…
Reference in New Issue
Block a user