wezm.net/v1/layouts/articles.html

51 lines
1.5 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<%= render '_head' %>
</head>
<body class="articles">
<%= render '_header' %>
<div class=" archive-banner">This is an old version of my website with posts from 20032019. For newer posts <a href="/v2/">visit the new version</a>.</div>
<div id="content">
2010-07-23 03:21:05 +00:00
<h1><%= h(@item[:title] || 'Articles') %></h1>
2010-01-30 06:09:05 +00:00
<%
menu = [
['All', sorted_articles.size],
['Technical', technical_articles.size],
['Personal', personal_articles.size],
]
%>
<nav class="inline search">
<li id="search">
<fieldset>
<label for="query">Search</label>
<input id="query" type="search" incremental="" results="0" placeholder="Search Articles">
</fieldset>
</li>
<% menu.each do |menu_item|
label, count = menu_item
path = (label != "All" ? '/' + label.downcase : '') + "/articles/"
2013-05-21 11:31:33 +00:00
if label != "All"
feed = "/#{label.downcase}/feed/"
else
feed = '/feed/'
end
2018-08-18 07:49:02 +00:00
active = (@item.identifier.to_s.sub(%r{page/$}, '') == path)
%>
2010-03-30 21:03:04 +00:00
<li>
2016-09-29 11:44:31 +00:00
<a href="<%= feed %>"><img class="feed-icon" src="/images/feed-icon.svg" width="12" height="12" alt="Feed Icon" /></a>
2010-03-30 21:03:04 +00:00
<a href="<%= path %>"<%= %Q{class="active"} if active %>><%= label %></a> (<%= count %>)
</li>
<% end %>
2010-06-30 07:56:37 +00:00
</nav>
2010-01-30 06:09:05 +00:00
2010-06-16 10:23:22 +00:00
<ul id="articles" class="articles">
<%= yield %>
</ul>
2010-01-30 06:09:05 +00:00
</div>
<%= render '_footer' %>
</body>
</html>