Website/templates/news.erb
2016-07-31 13:26:09 -04:00

38 lines
1.2 KiB
Plaintext

<div class="news">
<div class="nextprev">
<% unless news_prev.nil? %>
<a href="<%=root_path(news_prev[:out_path])%>">
<div class="prev_link">← <%= news_prev.fetch("title", "Untitled Post") %></div>
</a>
<% end %>
<% unless news_next.nil? %>
<a href="<%=root_path(news_next[:out_path])%>">
<div class="next_link"><%= news_next.fetch("title", "Untitled Post") %> →</div>
</a>
<% end %>
<div class="nextprev_link_sep">&nbsp;&nbsp;&nbsp;</div>
</div>
<h1><%= title or "Untitled Post" %></h1>
<% if defined? author %>
<div class="author">By <%= LabMetadata::link_for author %></div>
<% end %>
<div class="content">
<%= body %>
</div>
<div class="nextprev">
<% unless news_prev.nil? %>
<a href="<%=root_path(news_prev[:out_path])%>">
<div class="prev_link">← <%= news_prev.fetch("title", "Untitled Post") %></div>
</a>
<% end %>
<% unless news_next.nil? %>
<a href="<%=root_path(news_next[:out_path])%>">
<div class="next_link"><%= news_next.fetch("title", "Untitled Post") %> →</div>
</a>
<% end %>
<div class="nextprev_link_sep">&nbsp;&nbsp;&nbsp;</div>
</div>
</div>