wezm.net/layouts/articles.html

63 lines
1.9 KiB
HTML
Raw Normal View History

<!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>
2010-02-03 10:53:58 +00:00
<script src="/js/common.js" type="text/javascript" charset="utf-8"></script>
<% if @item.identifier =~ %r{/page/$} %>
2010-02-01 10:37:15 +00:00
<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() {
2010-02-03 10:53:58 +00:00
show_javascript_widgets();
webkit_search_tweak();
});
</script>
<% end %>
</head>
<body class="articles">
<%= render 'header' %>
2010-02-03 10:53:58 +00:00
<h1>Archives</h1>
<div id="content">
2010-01-30 06:09:05 +00:00
<%
menu = [
['All', sorted_articles.size],
['Technical', technical_articles.size],
['Personal', personal_articles.size],
]
%>
2010-02-01 01:58:10 +00:00
<ul class="inline menu">
<% menu.each do |menu_item|
label, count = menu_item
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
2010-02-03 10:53:58 +00:00
active = (@item.identifier.sub(%r{page/$}, '') == path)
%>
2010-02-03 10:53:58 +00:00
<li><a href="<%= path %>"<%= %Q{class="active"} if active %>><%= label %></a> (<%= count %>)</li>
<% end %>
2010-02-02 10:08:33 +00:00
<li id="search">
<fieldset>
<label for="query">Search</label>
<input type="text" name="q" id="query" value="" />
<span class="sbox_r"></span>
</fieldset>
</li>
2010-01-30 06:09:05 +00:00
</ul>
<ul class="articles">
<%= yield %>
</ul>
2010-01-30 06:09:05 +00:00
<div class="pagination">
<% pagepath = @item.identifier; pagepath += 'page/' if pagepath !~ %r{/page/$} %>
2010-02-03 10:53:58 +00:00
<a href="<%= pagepath %>#2" class="newer">&laquo; Newer</a>
|
2010-02-03 10:53:58 +00:00
<a href="<%= pagepath %>" class="older">Older &raquo;</a>
</div>
</div>
<%= render 'footer' %>
</body>
</html>