journalduhacker/app/views/weblogs/index.html.erb
joshua stein 85cb7c2057 first stab at planet rss aggregation
could probably use a prettier layout and auto-posting a weblog url
to the main site (carrying tags)
2014-08-03 22:07:57 -05:00

45 lines
1.3 KiB
Plaintext

<ol class="stories list">
<% @weblogs.each do |weblog| %>
<li class="story">
<div class="story_liner">
<div class="details">
<span class="link">
<a href="<%= weblog.url %>"><%= weblog.title %></a>
</span>
<span class="tags">
<% weblog.tags.map{|t| t.downcase }.sort.each do |tag| %>
<a href="<%= main_root_url %>t/<%= tag %>" class="tag"><%= tag %></a>
<% end %>
</span>
<span class="domain">
<a href="<%= weblog.site_url %>"><%= weblog.site_title %></a>
</span>
<div class="byline">
by <a href="<%= main_root_url %>u/<%= weblog.user.username %>"><%=
weblog.user.username %></a>
<%= raw(time_ago_in_words_label(weblog.created_at).
gsub(/^about /, "")) %> ago
</div>
</div>
</div>
<div class="story_content weblog_content shorten_first_p">
<%= weblog.sanitized_content %>
</div>
</li>
<% end %>
</ol>
<div class="morelink">
<% if @page && @page > 1 %>
<a href="/<%= @page == 2 ? "" : "page/#{@page - 1}" %>">&lt;&lt; Page
<%= @page - 1 %></a>
<% end %>
<% if @show_more %>
<% if @page && @page > 1 %>
|
<% end %>
<a href="/page/<%= @page + 1 %>">Page <%= @page + 1 %> &gt;&gt;</a>
<% end %>
</div>