1
0
mirror of https://github.com/meineerde/holgerjust.de.git synced 2025-10-17 17:01:01 +00:00

77 lines
3.5 KiB
Plaintext

= wrap_layout :layout do
%header.main-header.post-head{cover}
%nav.main-nav.clearfix{class: cover? ? 'overlay' : nil}
%a.home-button.icon-angle-left{href: home_path}
%span.word Home
- if blog_settings.navigation
%a.menu-button.icon-menu{href: '#'}
%span.word Menu
%main.content{role: :main}
%article.post
%header.post-header
%h1.post-title= current_article.title
%section.post-meta
published on
%time.post-date{datetime: current_article.date.strftime('%Y-%m-%d')}
= current_article.date.strftime(blog_settings.date_format)
- if tags?
about #{tags}
|
- words = Nokogiri::HTML::DocumentFragment.parse(yield).search('.//text()').map(&:text).join(' ').split.count
= [1, (words / 200.0).round].max # average reading speed as of http://EzineArticles.com/2298503
min read
%section.post-content= yield
%footer.post-footer
- if gravatar?
%figure.author-image
%a.img{href: author_path, style: "background-image: url(#{gravatar(nil, size: 68)}); background-image: image-set(url(#{gravatar(nil, size: 68)}) 1x, url(#{gravatar(nil, size: 68*2)}) 2x, url(#{gravatar(nil, size: 68*2)}) 3x); background-image: -webkit-image-set(url(#{gravatar(nil, size: 68)}) 1x, url(#{gravatar(nil, size: 68*2)}) 2x, url(#{gravatar(nil, size: 68*2)}) 3x)"}
%span.hidden #{blog_author.name}'s Picture
%section.author
%h4
%a{href: author_path}= blog_author.name
- if blog_author.bio.present?
= blog_author.bio
- else
%p
Read
%a{href: author_path} more posts
by this author.
- if blog_author.location.present? || blog_author.website.present?
.author-meta
- if blog_author.location.present?
%span.author-location.icon-location= blog_author.location
= partial(:profile_links, locals: {author: blog_author.name})
- if blog_author.website.present?
%span.author-link.icon-link
%a{href: blog_author.website}= blog_author.website.sub(%r{^https?://}, '')
%section.share
%h4 Share this post
%a.icon-twitter{href: twitter_url, rel: 'nofollow', onclick: "window.open(this.href, 'twitter-share', 'width=550,height=235');return false;"}
%span.hidden Twitter
%a.icon-facebook{href: facebook_url, rel: 'nofollow', onclick: "window.open(this.href, 'facebook-share','width=580,height=296');return false;"}
%span.hidden Facebook
%a.icon-google-plus{href: google_plus_url, rel: 'nofollow', onclick: "window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;"}
%span.hidden Google+
%a.icon-mail{href: mail_url, rel: 'nofollow'}
%span.hidden Email
%aside.read-next
- if prev_article = current_article.previous_article
- attributes = { href: prev_article.url }.merge(cover(prev_article))
%a.read-next-story{attributes}
%section.post
%h2= prev_article.title
%p #{read_next_summary(prev_article, 19)}…
- if next_article = current_article.next_article
- attributes = { href: next_article.url }.merge(cover(next_article))
%a.read-next-story.prev{attributes}
%section.post
%h2= next_article.title
%p #{read_next_summary(next_article, 19)}…