mirror of
https://github.com/wezm/wezm.net.git
synced 2024-12-18 18:29:54 +00:00
Link archive pages together with a simple menu
This commit is contained in:
parent
db6fe5638c
commit
0aea6dae4b
2 changed files with 16 additions and 3 deletions
|
@ -10,10 +10,20 @@
|
|||
<div id="content">
|
||||
<h1>Archives</h1>
|
||||
|
||||
<%
|
||||
menu = [
|
||||
['All', sorted_articles.size],
|
||||
['Technical', technical_articles.size],
|
||||
['Personal', personal_articles.size],
|
||||
]
|
||||
%>
|
||||
<ul class="inline">
|
||||
<li><a href="/articles/">All</a> (<%= sorted_articles.size %>)</li>
|
||||
<li><a href="/technical/articles/">Technical</a> (<%= technical_articles.size %>)</li>
|
||||
<li><a href="/personal/articles/">Personal</a> (<%= personal_articles.size %>)</li>
|
||||
<% menu.each do |menu_item|
|
||||
label, count = menu_item
|
||||
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
|
||||
%>
|
||||
<li><a href="<%= path %>"<%= %Q{class="active"} if @item.identifier == path %>><%= label %></a> (<%= count %>)</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<ul class="articles">
|
||||
|
|
|
@ -192,6 +192,9 @@ ul.articles strong {
|
|||
a.more {
|
||||
/* float: right;*/
|
||||
}
|
||||
a.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Inline flat list style */
|
||||
ul.inline {
|
||||
|
|
Loading…
Reference in a new issue