diff options
Diffstat (limited to 'app/views/layouts/blog')
-rw-r--r-- | app/views/layouts/blog/_summary.html.haml | 17 | ||||
-rw-r--r-- | app/views/layouts/blog/show.html.haml | 20 |
2 files changed, 37 insertions, 0 deletions
diff --git a/app/views/layouts/blog/_summary.html.haml b/app/views/layouts/blog/_summary.html.haml new file mode 100644 index 0000000..c1f7784 --- /dev/null +++ b/app/views/layouts/blog/_summary.html.haml @@ -0,0 +1,17 @@ +%article.blog_summary + %heading.h3= link_to(page.title, page_path(page)) + .byline + - if page.props.author + %span.author>= page.props.author + - if page.props.author && page.props.posted_at + \. + - if page.props.posted_at + %i + = time_tag(page.props.posted_at.to_date, :format => :long, :pubdate => true) + %div.content + - if page.props.preview + = page.props.preview + - if page.props.body.try(:any?) + = link_to(I18n.t(:read_more), page_path(page)) + - else + = render :template => page.template_path
\ No newline at end of file diff --git a/app/views/layouts/blog/show.html.haml b/app/views/layouts/blog/show.html.haml new file mode 100644 index 0000000..b5bc983 --- /dev/null +++ b/app/views/layouts/blog/show.html.haml @@ -0,0 +1,20 @@ +%article.blog_full + + %h1.first= @page.title + + .byline + - if @page.props.author + %span.author>= I18n.t('posted_by') + ' ' + @page.props.author + - if @page.props.author && @page.props.posted_at + \. + - if @page.props.posted_at + %i + = time_tag(@page.props.posted_at.to_date, :format => :long, :pubdate => true) + + - content_for :blog_content do + = yield + + - if content_for?(:blog_content) + = yield(:blog_content) + - else + = @page.props.preview
\ No newline at end of file |