2018-02-05 17:27:12 +00:00
|
|
|
.row
|
|
|
|
.col
|
|
|
|
= render 'layouts/breadcrumb',
|
|
|
|
crumbs: [ link_to(t('sites.index'), sites_path),
|
|
|
|
@site.name,
|
|
|
|
link_to(t('posts.index'),
|
|
|
|
site_posts_path(@site)),
|
|
|
|
@post.title ]
|
|
|
|
|
2018-01-30 15:20:19 +00:00
|
|
|
.row
|
2018-02-03 22:37:09 +00:00
|
|
|
.col
|
2018-02-10 16:09:42 +00:00
|
|
|
%h1{class: @post.get_front_matter(:dir)}= @post.title
|
2018-01-30 15:20:19 +00:00
|
|
|
|
2018-02-03 22:37:09 +00:00
|
|
|
.row
|
|
|
|
.col
|
|
|
|
= link_to t('posts.edit'), edit_site_post_path(@site, @post),
|
|
|
|
class: 'btn btn-info'
|
2018-01-31 20:29:27 +00:00
|
|
|
|
2018-02-03 22:37:09 +00:00
|
|
|
.row
|
|
|
|
.col
|
2018-02-10 16:09:42 +00:00
|
|
|
.content{class: @post.get_front_matter(:dir)}
|
2018-02-03 22:37:09 +00:00
|
|
|
:markdown
|
|
|
|
#{@post.content}
|
2018-01-30 15:20:19 +00:00
|
|
|
|
2018-02-03 22:37:09 +00:00
|
|
|
%table.table.table-condensed.table-striped
|
|
|
|
%tbody
|
|
|
|
- @post.front_matter.each do |key, data|
|
|
|
|
%tr
|
|
|
|
%th= key
|
|
|
|
%td
|
|
|
|
- if data.respond_to? :each
|
|
|
|
- data.each do |d|
|
|
|
|
%span.badge.badge-success= d
|
|
|
|
- elsif data.respond_to? :content
|
|
|
|
:markdown
|
|
|
|
#{data.content}
|
|
|
|
- elsif data.respond_to? :strftime
|
|
|
|
= data.strftime('%F')
|
|
|
|
- else
|
|
|
|
= data
|