This commit is contained in:
Toks
2014-01-12 20:03:35 -05:00
parent f00964b559
commit 3748f50b6d

View File

@@ -1,7 +1,7 @@
module TagsHelper
def tag_post_count_style(tag)
@highest_post_count ||= Tag.highest_post_count
width_percent = Math.log(tag.post_count, @highest_post_count) * 100
width_percent = Math.log([tag.post_count, 1].max, @highest_post_count) * 100
"background: linear-gradient(to left, #DDD #{width_percent}%, white #{width_percent}%)"
end
end