Adds styles for tag clod

This commit is contained in:
Alberto Garcia Cabeza
2015-08-12 17:08:39 +02:00
parent e49567c953
commit 8bee3abb7b
3 changed files with 14 additions and 2 deletions

View File

@@ -310,7 +310,7 @@ footer {
&:hover { &:hover {
color: $link; color: $link;
cursor: pointer; cursor: pointer;
background: #e5f1f8; background: $tags-bg-hover;
border: 1px solid $brand; border: 1px solid $brand;
} }
} }
@@ -328,6 +328,17 @@ footer {
a { a {
padding: $line-height/4 $line-height/3; padding: $line-height/4 $line-height/3;
.label {
color: white;
}
&:hover {
.label {
background: $brand;
}
}
} }
} }

View File

@@ -30,6 +30,7 @@ $link: #2895F1;
$link-hover: #2178BF; $link-hover: #2178BF;
$tags-bg: #FAFAFA; $tags-bg: #FAFAFA;
$tags-bg-hover: #E5F1F8;
$tags-border: #F0F0F0; $tags-border: #F0F0F0;
$tags-color: #8F8F8F; $tags-color: #8F8F8F;

View File

@@ -1,6 +1,6 @@
<div id="tag-cloud" class="tag-cloud"> <div id="tag-cloud" class="tag-cloud">
<h3><%= t("shared.tags_cloud.tags") %></h3> <h3><%= t("shared.tags_cloud.tags") %></h3>
<% tag_cloud Debate.tag_counts, %w[s m l] do |tag, css_class| %> <% tag_cloud Debate.tag_counts, %w[s m l] do |tag, css_class| %>
<%= link_to sanitize("#{tag.name}(#{tag.taggings_count})"), debates_path(tag: tag.name), class: css_class %> <%= link_to sanitize("#{tag.name} <span class='label round info'>#{tag.taggings_count}</span>"), debates_path(tag: tag.name), class: css_class %>
<% end %> <% end %>
</div> </div>