forked from wezm/wezm.net
62 lines
1.9 KiB
HTML
62 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<%= render 'head_common' %>
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script>
|
|
<script src="/js/common.js" type="text/javascript" charset="utf-8"></script>
|
|
<% if @item.identifier =~ %r{/page/$} %>
|
|
<script src="/js/jquery.ba-bbq.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="/js/mojo.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="/js/articles.js" type="text/javascript" charset="utf-8"></script>
|
|
<% else %>
|
|
<script type="text/javascript" charset="utf-8">
|
|
jQuery(function() {
|
|
show_javascript_widgets();
|
|
webkit_search_tweak();
|
|
});
|
|
</script>
|
|
<% end %>
|
|
</head>
|
|
<body class="articles">
|
|
<%= render 'header' %>
|
|
<h1>Archives</h1>
|
|
<div id="content">
|
|
|
|
<%
|
|
menu = [
|
|
['All', sorted_articles.size],
|
|
['Technical', technical_articles.size],
|
|
['Personal', personal_articles.size],
|
|
]
|
|
%>
|
|
<ul class="inline menu">
|
|
<% menu.each do |menu_item|
|
|
label, count = menu_item
|
|
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
|
|
active = (@item.identifier.sub(%r{page/$}, '') == path)
|
|
%>
|
|
<li><a href="<%= path %>"<%= %Q{class="active"} if active %>><%= label %></a> (<%= count %>)</li>
|
|
<% end %>
|
|
<li id="search">
|
|
<fieldset>
|
|
<label for="query">Search</label>
|
|
<input type="text" name="q" id="query" value="" />
|
|
<span class="sbox_r"></span>
|
|
</fieldset>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="articles">
|
|
<%= yield %>
|
|
</ul>
|
|
|
|
<div class="pagination">
|
|
<% pagepath = @item.identifier; pagepath += 'page/' if pagepath !~ %r{/page/$} %>
|
|
<a href="<%= pagepath %>#2" class="newer">« Newer</a>
|
|
|
|
|
<a href="<%= pagepath %>" class="older">Older »</a>
|
|
</div>
|
|
</div>
|
|
<%= render 'footer' %>
|
|
</body>
|
|
</html>
|