get all crazy with tags

This commit is contained in:
Kyle Drake 2016-04-19 00:40:26 -07:00
parent b53d87e51e
commit 79a62d445b
2 changed files with 17 additions and 4 deletions

View file

@ -2149,3 +2149,15 @@ pre, code {
background: #1d1f21;
color: #FFFFFF;
}
.tagcloud .tag10 { font-size: 0.6em; font-weight: 90; }
.tagcloud .tag9 { font-size: 0.7em; font-weight: 100; }
.tagcloud .tag8 { font-size: 0.8em; font-weight: 200; }
.tagcloud .tag7 { font-size: 0.9em; font-weight: 300; }
.tagcloud .tag6 { font-size: 1.0em; font-weight: 400; }
.tagcloud .tag5 { font-size: 1.2em; font-weight: 500; }
.tagcloud .tag4 { font-size: 1.4em; font-weight: 600; }
.tagcloud .tag3 { font-size: 1.6em; font-weight: 700; }
.tagcloud .tag2 { font-size: 1.8em; font-weight: 800; }
.tagcloud .tag1 { font-size: 2.2em; font-weight: 900; }
.tagcloud .tag0 { font-size: 2.5em; font-weight: 900; }

View file

@ -153,10 +153,11 @@
<% unless is_education? %>
<div class="row content misc">
<h3>Popular Tags</h3>
<p>
<% Tag.popular_names(100).each do |tag| %>
<a href="/browse?tag=<%= Rack::Utils.escape tag[:name] %>"><%= tag[:name] %></a>&nbsp;&nbsp;
<% end %>
<p class="tagcloud">
<% Tag.popular_names(100).each_with_index do |tag,i| %>
<% i = (((i+1).to_f/100) * 10).to_i %>
<a class="tag<%= i %>" href="/browse?tag=<%= Rack::Utils.escape tag[:name] %>"><%= tag[:name] %></a>&nbsp;&nbsp;
<% end %>
</p>
</div>
<div class="row content misc">