summaryrefslogtreecommitdiff
path: root/app/views/tutorials
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2013-01-25 21:28:19 -0700
committermo k <mo@mokhan.ca>2013-01-25 21:28:19 -0700
commit2c1290465d8ffae95df3887b633c3b75d050db98 (patch)
treee7d4e4383fb1bc1975053b1803ca4d6ead77d8ae /app/views/tutorials
parented7b321283324bfc58ea2a43dfadf795d51938bb (diff)
add tag cloud
Diffstat (limited to 'app/views/tutorials')
-rw-r--r--app/views/tutorials/index.html.erb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/tutorials/index.html.erb b/app/views/tutorials/index.html.erb
index f31926bd..a952e30b 100644
--- a/app/views/tutorials/index.html.erb
+++ b/app/views/tutorials/index.html.erb
@@ -12,10 +12,16 @@
});
</script>
<% end -%>
+<style>
+.css1 { font-size: 1.0em; }
+.css2 { font-size: 1.2em; }
+.css3 { font-size: 1.4em; }
+.css4 { font-size: 1.6em; }
+</style>
<% content_for :page_header do -%>
<%= link_to 'Add Tutorial', new_tutorial_path, :class => "btn btn-primary pull-right" %>
- <% Tutorial.tag_counts.each do |tag| %>
- <a href="?tags=<%= tag.name %>"><span class="label"><%= tag.name %></span></a>
+ <% tag_cloud(Tutorial.tag_counts_on(:tags), %w(css1 css2 css3 css4)) do |tag, css_class| %>
+ <a href="?tags=<%= tag.name %>"><span class="label <%= css_class %>"><%= tag.name %></span></a>
<% end %>
<% end -%>
<div id="tutorials-div" class="row">