Move tag cloud on top of archives as there are less tags
Archives will probably grow faster (in vertical spacing) than tags, so have tags first.
This commit is contained in:
parent
4f0efc8fb7
commit
afabb7fb6d
2 changed files with 21 additions and 15 deletions
|
@ -11,6 +11,7 @@ nav.archives {
|
|||
list-style-position: inside;
|
||||
|
||||
&.archives-year-list {
|
||||
clear: both;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
|
@ -29,4 +30,8 @@ nav.archives {
|
|||
margin: 0 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.archives-tags + ul.archives-year-list {
|
||||
padding-top: 20px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
<nav class="archives" aria-labelledby="archives-heading">
|
||||
<h3 id="archives-heading">Archives</h3>
|
||||
|
||||
<%= raw(with {max, tags} <- get_tags() do %>
|
||||
<div class="archives-tags">
|
||||
<%= raw(for {tag, amount} <- tags do %>
|
||||
<a
|
||||
href="<%= Mebe2.get_conf(:absolute_url) %><%= Mebe2.Web.Views.Utils.get_tag_path(tag) %>"
|
||||
class="archives-tag"
|
||||
style="font-size: <%= Float.round((amount / max * 100) / 1.25 + 25) |> trunc() %>%;"
|
||||
>
|
||||
<%= tag %>
|
||||
</a>
|
||||
<% end) %>
|
||||
</div>
|
||||
<% end) %>
|
||||
|
||||
<%= raw(with [_|_] = years <- get_month_archives() do %>
|
||||
<h3 id="archives-heading">Archives</h3>
|
||||
<ul class="archives-year-list">
|
||||
<%= raw(for {year, months} <- years do %>
|
||||
<li>
|
||||
|
@ -21,18 +36,4 @@
|
|||
<% end) %>
|
||||
</ul>
|
||||
<% end) %>
|
||||
|
||||
<%= raw(with {max, tags} <- get_tags() do %>
|
||||
<div class="archives-tags">
|
||||
<%= raw(for {tag, amount} <- tags do %>
|
||||
<a
|
||||
href="<%= Mebe2.get_conf(:absolute_url) %><%= Mebe2.Web.Views.Utils.get_tag_path(tag) %>"
|
||||
class="archives-tag"
|
||||
style="font-size: <%= Float.round((amount / max * 100) / 1.25 + 25) |> trunc() %>%;"
|
||||
>
|
||||
<%= tag %>
|
||||
</a>
|
||||
<% end) %>
|
||||
</div>
|
||||
<% end) %>
|
||||
</nav>
|
||||
|
|
Reference in a new issue