mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 00:31:59 +02:00
use one query to get tag names for sites in browse
This commit is contained in:
parent
2b69e9cb8a
commit
f9c885c23b
2 changed files with 11 additions and 3 deletions
|
@ -116,10 +116,10 @@
|
|||
</a>
|
||||
</div>
|
||||
<div class="site-tags">
|
||||
<% if site.tags.count > 0 %>
|
||||
<% if @site_tags[site.id].length > 0 %>
|
||||
<i class="fa fa-tag"></i>
|
||||
<% site.tags.each_with_index do |tag, index| %>
|
||||
<a class="" href="/browse?tag=<%= Rack::Utils.escape tag.name %>"><%= tag.name %></a><% if index != site.tags.length - 1 %>,<% end %>
|
||||
<% @site_tags[site.id].each_with_index do |tag, index| %>
|
||||
<a class="" href="/browse?tag=<%= Rack::Utils.escape tag %>"><%= tag %></a><% if index != @site_tags[site.id].length - 1 %>,<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue