shorter post counts
This commit is contained in:
@@ -54,7 +54,13 @@ private
|
|||||||
html << %{<a class="search-tag" href="#{path}?tags=#{u(tag)}">#{h(humanized_tag)}</a> }
|
html << %{<a class="search-tag" href="#{path}?tags=#{u(tag)}">#{h(humanized_tag)}</a> }
|
||||||
|
|
||||||
unless options[:name_only]
|
unless options[:name_only]
|
||||||
html << %{<span class="post-count">} + counts[tag].to_s + %{</span>}
|
if counts[tag].to_i > 1_000
|
||||||
|
post_count = "#{counts[tag].to_i / 1_000}k"
|
||||||
|
else
|
||||||
|
post_count = counts[tag].to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
html << %{<span class="post-count">#{post_count}</span>}
|
||||||
end
|
end
|
||||||
|
|
||||||
html << "</li>"
|
html << "</li>"
|
||||||
|
|||||||
Reference in New Issue
Block a user