changed font size
This commit is contained in:
parent
0e1123396b
commit
3203b35722
|
@ -191,12 +191,11 @@ class AnnouncementsController < ApplicationController
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
max = temp.max_by{|t| t["count"]}["count"]
|
max = temp.max_by{|t| t["count"]}["count"]
|
||||||
min = temp.min_by{|t| t["count"]}["count"]
|
|
||||||
tags = []
|
tags = []
|
||||||
temp.each do |tag|
|
temp.each do |tag|
|
||||||
if tag["count"] > 0
|
if tag["count"] > 0
|
||||||
percent = (tag["count"] * 100) / max
|
percent = (tag["count"] * 100) / max
|
||||||
font_size = ((percent / 10).ceil) + 11
|
font_size = ((percent / 10).round) + 16
|
||||||
tag["font-size"] = font_size
|
tag["font-size"] = font_size
|
||||||
tags << tag
|
tags << tag
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue