Sha256: 6734f72ee2c6ece89d1c9ffe3fcbc604cc446e30b4ca240d00a4c8b9a71ef8d6

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

- complete       ||= false
- show_title     ||= post.title.present?
- show_summary   ||= post.summary.present?
- show_body      ||= complete || !show_summary
- show_read_more ||= !complete && post.summary.present?
- show_permalink ||= post.post? && !show_read_more
- show_twitter   ||= complete && post.post? && settings.twitter_id.present?

%article.post{class: post.status}
  %header
    - if show_title
      %h2
        %a{href: post.link.present? ? post.link : post.to_url}
          = post.title
          = "→" if post.link.present?
      .info
        - if post.date.present?
          #{post.date}

  - if show_summary
    .summary
      ~ markdown post.summary
      - if show_read_more
        %p
          = link_to (post.read_more || settings.read_more), post
          →

  - if show_body
    ~ post.to_html

  %footer
    - if show_permalink
      %p.permalink= link_to '∞', post
    - if show_twitter
      .social_media_buttons
        - if show_twitter
          %a{ href: "https://twitter.com/share", class: "twitter-share-button", data: { via: settings.twitter_id } }
          :javascript
            !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
schreihals-0.0.3 lib/views/partials/_post.haml