<div class="post">
<ul class="container">
- <% @items.each do |item| %>
- <li class="<%= item.post_type %>-item<%= if item.short_dispatch? then " thought-item" end %>">
- <% if item.dispatch? %>
- <span class="post-link">
- <%= link_to item.title, public_post_path(year: item.published_at.year, slug: item.slug) %>
- <abbr title="internal link">↙︎</abbr>
- </span>
- <span class="dash">—</span>
- <span class="meta">posted <%= item.published_at.strftime('%d/%m/%y') %>, tagged as <%= raw item.format_tags %></span>
- <% if item.short_dispatch? %>
- <blockquote class="full-content">
- <%= raw item.rendered_content.html_safe %>
- </blockquote>
- <% else %>
- <blockquote class="excerpt"><%= item.generate_excerpt %>...</blockquote>
- <% end %>
- <% else %>
- <span class="post-link">
- <%= link_to item.title, item.url, target: "_blank" %>
- <abbr title="external link">↗︎</abbr> <br><span class="comment-separator">↳</span> <span class="bookmark-comment"><%= item.content %></span>
- </span>
- <span class="dash">—</span>
- <span class="meta">added <%= item.created_at.strftime('%l:%M%P on %d/%m/%y') if item.created_at.present? %></span>
- <% end %>
- </li>
- <% end %>
+ <% @items.group_by { |item| item.respond_to?(:published_at) ? item.published_at.to_date : item.created_at.to_date }.each do |date, items| %>
+ <li class="date-heading">
+ From <%= date.strftime('%B %e, %Y') %>:
+ </li>
+ <% items.each do |item| %>
+ <li class="<%= item.post_type %>-item<%= if item.short_dispatch? then " thought-item" end %>">
+ <% if item.dispatch? %>
+ <span class="post-link">
+ <%= link_to item.title, public_post_path(year: item.published_at.year, slug: item.slug) %>
+ <abbr title="internal link">↙︎</abbr>
+ </span>
+ <span class="dash">—</span>
+ <span class="meta">posted <%= item.published_at.strftime('%d/%m/%y') %>, tagged as <%= raw item.format_tags %></span>
+ <% if item.short_dispatch? %>
+ <blockquote class="full-content">
+ <%= raw item.rendered_content.html_safe %>
+ </blockquote>
+ <% else %>
+ <blockquote class="excerpt"><%= item.generate_excerpt %>...</blockquote>
+ <% end %>
+ <% else %>
+ <span class="post-link">
+ <%= link_to item.title, item.url, target: "_blank" %>
+ <abbr title="external link">↗︎</abbr> <br><span class="comment-separator">↳</span> <span class="bookmark-comment"><%= item.content %></span>
+ </span>
+ <span class="dash">—</span>
+ <span class="meta">added <%= item.created_at.strftime('%l:%M%P on %d/%m/%y') if item.created_at.present? %> <span class="lowlight"><%= link_to "❧", "/#{item.updated_at.year}/#{item.slug}", title: "permalink" %></a></span>
+ <% end %>
+ </li>
+ <% end %>
+ <% end %>
</ul>
</div>
<% content_for :title, @post.title %>
<% content_for :meta_description, "#{@post.generate_excerpt(150)}." %>
<% content_for :meta_keywords, "#{@post.tags}" %>
+ <% if @post.post_type != "bookmark" %>
<h1><%= @post.title %></h1>
<%= link_to "↼ Back to some other dispatches...", "#{root_path}?filter=posts" %>
<div class="postmeta">
<p>Posted <%= @post.published_at.strftime('%B %d, %Y') %> and tagged <%= raw @post.format_tags %> <% if
[email protected]_dispatch?%>Reading Time: about <%= @reading_time %> minute(s).<% end %></p>
</div>
+ <% else %>
+ <h1 style="margin-bottom: -.8em">Bookmark comment permalink:</h1>
+ <h3><%= @post.title %></h3>
+ <%= link_to "View original content", @post.url, class: "button" %>
+ <%= link_to "More from mind reader", "#{root_path}?filter=bookmarks", class: "button", target: "_BLANK" %>
+ <div class="postmeta">
+ <p>Originally bookmarked on mind reader on <%= @post.published_at.strftime('%B %d, %Y') %>.</p>
+ </div>
+ <% end %>
</div>
<div class="post">
</div>
</div>
+<% if @post.post_type != "bookmark" %>
<div class="container" id="bottom">
<%= render partial: "layouts/home_post_links" %>
</div>
+<% end %>