2010-01-30 04:33:54 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2009-11-23 02:34:17 +00:00
|
|
|
<head>
|
2010-02-04 02:38:35 +00:00
|
|
|
<%= render '_head' %>
|
2010-03-03 06:14:03 +00:00
|
|
|
<script src="/js/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
|
2010-02-01 10:37:15 +00:00
|
|
|
<script src="/js/jquery.ba-bbq.min.js" type="text/javascript" charset="utf-8"></script>
|
2010-06-16 10:23:22 +00:00
|
|
|
<script src="/js/jquery.quicksand.min.js" type="text/javascript" charset="utf-8"></script>
|
2010-02-01 10:37:15 +00:00
|
|
|
<script src="/js/mojo.js" type="text/javascript" charset="utf-8"></script>
|
2010-06-16 10:23:22 +00:00
|
|
|
<script src="/js/liquidmetal.js" type="text/javascript" charset="utf-8"></script>
|
2010-03-03 20:44:34 +00:00
|
|
|
<script src="/js/application.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
2010-06-16 10:23:22 +00:00
|
|
|
jQuery(function() {
|
|
|
|
WezM.showJavascriptWidgets();
|
|
|
|
$('#search input').keypress(function(e) {
|
|
|
|
var input = $(this);
|
|
|
|
var q = (input.val() + String.fromCharCode(e.which)).toLowerCase();
|
|
|
|
|
|
|
|
var filtered_articles = $('#articles li').filter(function(i) {
|
|
|
|
var article = $(this);
|
|
|
|
var text = article.text().toLowerCase();
|
|
|
|
// var score = LiquidMetal.score(text, q);
|
|
|
|
// article.attr("data-score", score);
|
|
|
|
// return score > 0;
|
|
|
|
return text.indexOf(q) >= 0;
|
|
|
|
})
|
|
|
|
|
|
|
|
// Sort results
|
|
|
|
// var sorted_articles = filtered_articles.get().sort(function(a, b) {
|
|
|
|
// var valA = parseFloat($(a).attr("data-score"));
|
|
|
|
// var valB = parseFloat($(b).attr("data-score"));
|
|
|
|
// return (valA < valB) ? 1 : (valA > valB) ? -1 : 0;
|
|
|
|
// });
|
|
|
|
|
|
|
|
$("#articles").quicksand($(filtered_articles));
|
2010-03-03 20:44:34 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2009-11-23 02:34:17 +00:00
|
|
|
</head>
|
2010-01-30 04:33:54 +00:00
|
|
|
<body class="articles">
|
2010-02-04 02:38:35 +00:00
|
|
|
<%= render '_header' %>
|
2010-01-30 04:33:54 +00:00
|
|
|
<div id="content">
|
2010-02-04 02:38:35 +00:00
|
|
|
<h1>Archives</h1>
|
2010-01-30 06:09:05 +00:00
|
|
|
|
2010-01-30 06:42:29 +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">
|
2010-01-30 06:42:29 +00:00
|
|
|
<% menu.each do |menu_item|
|
|
|
|
label, count = menu_item
|
|
|
|
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
|
2010-04-01 07:24:05 +00:00
|
|
|
feed = 'http://feeds.feedburner.com/wezm'
|
|
|
|
feed += "-#{label.downcase}" if label != "All"
|
2010-02-03 10:53:58 +00:00
|
|
|
active = (@item.identifier.sub(%r{page/$}, '') == path)
|
2010-01-30 06:42:29 +00:00
|
|
|
%>
|
2010-03-30 21:03:04 +00:00
|
|
|
<li>
|
2010-06-16 10:23:22 +00:00
|
|
|
<a href="<%= feed %>"><img class="feed-icon" src="/images/black-feed-icon.png" width="12" height="12" alt="Black Feed Icon" /></a>
|
2010-03-30 21:03:04 +00:00
|
|
|
<a href="<%= path %>"<%= %Q{class="active"} if active %>><%= label %></a> (<%= count %>)
|
|
|
|
</li>
|
2010-01-30 06:42:29 +00:00
|
|
|
<% 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="" />
|
2010-03-04 06:59:41 +00:00
|
|
|
<span class="clear"></span>
|
2010-02-02 10:08:33 +00:00
|
|
|
</fieldset>
|
|
|
|
</li>
|
2010-01-30 06:09:05 +00:00
|
|
|
</ul>
|
|
|
|
|
2010-06-16 10:23:22 +00:00
|
|
|
<ul id="articles" class="articles">
|
2010-01-30 05:50:07 +00:00
|
|
|
<%= yield %>
|
2009-11-23 02:34:17 +00:00
|
|
|
</ul>
|
2010-01-30 06:09:05 +00:00
|
|
|
|
2009-11-23 02:34:17 +00:00
|
|
|
<div class="pagination">
|
2010-02-03 02:34:04 +00:00
|
|
|
<% pagepath = @item.identifier; pagepath += 'page/' if pagepath !~ %r{/page/$} %>
|
2010-02-04 02:42:58 +00:00
|
|
|
<a href="<%= pagepath %>" class="newer">« Newer</a>
|
2009-11-23 02:34:17 +00:00
|
|
|
|
|
2010-02-04 02:42:58 +00:00
|
|
|
<a href="<%= pagepath %>#2" class="older">Older »</a>
|
2009-11-23 02:34:17 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2010-02-04 02:38:35 +00:00
|
|
|
<%= render '_footer' %>
|
2009-11-23 02:34:17 +00:00
|
|
|
</body>
|
|
|
|
</html>
|