forked from tildeverse/tilde.news
18 lines
616 B
Plaintext
18 lines
616 B
Plaintext
<div class="box wide">
|
|
<div class="legend">
|
|
Tags
|
|
</div>
|
|
|
|
<% is_admin = @user.try(:is_admin?) %>
|
|
<div>
|
|
<%= link_to 'Create New Tag', new_tag_path %>
|
|
</div>
|
|
<% max_size = @tags.map{|t| t.stories_count }.max %>
|
|
<% @tags.each do |tag| %>
|
|
<% mod = (max_size.to_f / ((tag.stories_count.to_f == 0) ? 1 : tag.stories_count.to_f )) %>
|
|
<%= link_to tag.tag, is_admin ? edit_tag_path(tag.id) : 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>
|