mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-14 03:18:02 +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">
|
<div id="content">
|
||||||
<h1>Archives</h1>
|
<h1>Archives</h1>
|
||||||
|
|
||||||
|
<%
|
||||||
|
menu = [
|
||||||
|
['All', sorted_articles.size],
|
||||||
|
['Technical', technical_articles.size],
|
||||||
|
['Personal', personal_articles.size],
|
||||||
|
]
|
||||||
|
%>
|
||||||
<ul class="inline">
|
<ul class="inline">
|
||||||
<li><a href="/articles/">All</a> (<%= sorted_articles.size %>)</li>
|
<% menu.each do |menu_item|
|
||||||
<li><a href="/technical/articles/">Technical</a> (<%= technical_articles.size %>)</li>
|
label, count = menu_item
|
||||||
<li><a href="/personal/articles/">Personal</a> (<%= personal_articles.size %>)</li>
|
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
|
||||||
|
%>
|
||||||
|
<li><a href="<%= path %>"<%= %Q{class="active"} if @item.identifier == path %>><%= label %></a> (<%= count %>)</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="articles">
|
<ul class="articles">
|
||||||
|
|
|
@ -192,6 +192,9 @@ ul.articles strong {
|
||||||
a.more {
|
a.more {
|
||||||
/* float: right;*/
|
/* float: right;*/
|
||||||
}
|
}
|
||||||
|
a.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
/* Inline flat list style */
|
/* Inline flat list style */
|
||||||
ul.inline {
|
ul.inline {
|
||||||
|
|
Loading…
Reference in a new issue