Drop cloudify method for tag cloud

This commit is contained in:
Alexander Meindl 2019-01-17 17:10:18 +01:00
parent 136784184c
commit 222f1e8a01
2 changed files with 2 additions and 23 deletions

View File

@ -19,10 +19,8 @@ module AdditionalsTagHelper
tags = tags.all if tags.respond_to?(:all)
s = []
tag_cloud(cloudify(tags), (1..8).to_a) do |tag, weight|
s << content_tag(:span,
additionals_tag_link(tag, options),
class: "tag-pass-#{weight}")
tags.each do |tag|
s << additionals_tag_link(tag, options)
end
sep = if options[:tags_without_color]
@ -104,14 +102,4 @@ module AdditionalsTagHelper
def additionals_tag_color(tag_name)
"##{format('%06x', tag_name.unpack('H*').first.hex % 0xffffff)}"
end
def cloudify(tags)
new_tags = []
trigger = true
tags.each do |tag|
new_tags.send((trigger ? 'push' : 'unshift'), tag)
trigger = !trigger
end
new_tags
end
end

View File

@ -194,15 +194,6 @@ td.tags span.additionals-tag-label-color {
ul.tags li { margin: 0.25em 0; }
div.tags .tag-pass-1 { font-size: 0.8em; }
div.tags .tag-pass-2 { font-size: 0.9em; }
div.tags .tag-pass-3 { font-size: 1em; }
div.tags .tag-pass-4 { font-size: 1.1em; }
div.tags .tag-pass-5 { font-size: 1.2em; }
div.tags .tag-pass-6 { font-size: 1.3em; }
div.tags .tag-pass-7 { font-size: 1.4em; }
div.tags .tag-pass-8 { font-size: 1.5em; }
.tag-count { font-size: 0.75em; }
.additionals-tag-label-color a {