time datetime was invalid for HTML5 - sorry
details & aside added for category list blog_post class added to show view title put inside header empty title hidden on show
This commit is contained in:
parent
56ed554f56
commit
178d782743
2 changed files with 23 additions and 13 deletions
|
@ -7,23 +7,23 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :body_content_title, @blog_post.title %>
|
||||
|
||||
<% content_for :body_content_left do %>
|
||||
<article id="show_blog_post">
|
||||
<article class="blog_post" id="show_blog_post">
|
||||
<header>
|
||||
<p class='posted_at'>
|
||||
<%= t('blog.shared.posts.created_at', :when => @blog_post.published_at.strftime('%d %B %Y')) %>.
|
||||
|
||||
<h1><%= @blog_post.title %></h1>
|
||||
<details>
|
||||
<time datetime="<%= @blog_post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
|
||||
<%= t('blog.shared.posts.created_at', :when => @blog_post.published_at.strftime('%d %B %Y')) %>.
|
||||
</time>
|
||||
<% if (categories = @blog_post.categories).any? %>
|
||||
<span class='filed_in'>
|
||||
<aside class='filed_in'>
|
||||
<%= t('.filed_in') %>
|
||||
<% categories.each_with_index do |category, index| %>
|
||||
<%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</aside>
|
||||
<% end %>
|
||||
</p>
|
||||
</details>
|
||||
</header>
|
||||
<%= @blog_post.body.html_safe %>
|
||||
|
||||
|
@ -91,5 +91,5 @@
|
|||
<%= blog_archive_list %>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "/shared/content_page" %>
|
||||
<%= render :partial => "/shared/content_page", :locals => { :remove_automatic_sections => true } %>
|
||||
<% content_for :head, stylesheet_link_tag('refinerycms-blog') %>
|
|
@ -2,9 +2,19 @@
|
|||
<article class="blog_post" id="<%= dom_id(post) %>">
|
||||
<header>
|
||||
<h1><%= link_to post.title, blog_post_url(post) %></h1>
|
||||
<time datetime="<%= post.published_at.strftime('%m-%d-%Y') %>" class='posted_at'>
|
||||
<%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>
|
||||
</time>
|
||||
<details>
|
||||
<time datetime="<%= post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
|
||||
<%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>.
|
||||
</time>
|
||||
<% if (categories = post.categories).any? %>
|
||||
<aside class='filed_in'>
|
||||
<%= t('.filed_in') %>
|
||||
<% categories.each_with_index do |category, index| %>
|
||||
<%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
|
||||
<% end %>
|
||||
</aside>
|
||||
<% end %>
|
||||
</details>
|
||||
</header>
|
||||
<section class='clearfix'>
|
||||
<%= truncate(post.body,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue