2015-11-09 16:52:32 +01:00
|
|
|
<div class="box wide">
|
|
|
|
<div class="legend">
|
2016-11-24 15:14:36 +01:00
|
|
|
<%= t '.tagstitle' %>
|
2015-11-09 16:52:32 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% max_size = @tags.map{|t| t.stories_count }.max %>
|
|
|
|
<% @tags.each do |tag| %>
|
2016-08-16 19:07:57 +02:00
|
|
|
<% mod = (max_size.to_f / ((tag.stories_count.to_f == 0) ? 1 : tag.stories_count.to_f )) %>
|
2015-11-09 16:52:32 +01:00
|
|
|
<%= link_to tag.tag, tag_path(tag), :class => tag.css_class,
|
|
|
|
:style => "text-decoration: none; vertical-align: middle; " <<
|
|
|
|
"font-size: #{((52 / (mod + 1)) + 8).ceil}pt; line-height: 1.5em;" %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|