Sha256: 074398df75d4b5637fc7214a2a68a824b754c66c54c34c32a826e78e15b728f4

Contents?: true

Size: 1.74 KB

Versions: 3

Compression:

Stored size: 1.74 KB

Contents

.well.post
  %h4
    = link_to (@post.title.nil? or @post.title.empty?) ? "No Title" : @post.title, (@post.published) ? post_path(@post.slug) : draft_path(@post.id)
  - if (action_name == "index" or action_name == "tag") and !(@post.excerpt.nil? or @post.excerpt.empty?)
    .content
      = @kramdown_parser.kramdown_to_html(@post.excerpt).html_safe
      %p
        = link_to "Continue reading...", (@post.published) ? post_path(@post.slug) : draft_path(@post.id)
  - else
    .content
      = @kramdown_parser.kramdown_to_html(@post.body).html_safe if !(@post.body.nil? or @post.body.empty?)
  - unless @post.tag_list.empty?
    %div.tags
      - @post.tag_list.each_with_index do |tag, index|
        = succeed (index < @post.tag_list.count - 1) ? " " : "" do
          %a{:href => tag_path(tag), :class => "label"}>= tag
  %hr.gradient-black
  .actions
    - if @post.published
      - if @blog.disqus_shortname
        = link_to "#{post_path(@post.slug)}#disqus_thread" do
          %i.icon-comment.icon
      = link_to "http://twitter.com/share?url=#{post_url(@post.slug)}#{"&via="+@blog.twitter unless @blog.twitter.empty?}&text=#{@post.title}", :target => "_blank", :class => "popup" do
        %i.icon-retweet.icon
      = link_to "http://www.facebook.com/share.php?u=#{post_url(@post.slug)}", :target => "_blank", :class => "popup" do
        %i.icon-thumbs-up.icon

    - if can? :edit, @post
      = link_to edit_post_path(@post), :class => "" do
        %i.icon-edit.icon
    - if can? :delete, @post
      = link_to post_path(@post), :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "delete-post" do
        %i.icon-trash.icon
  - if @post.published and action_name == "show" and @blog.disqus_shortname
    %hr.gradient-black
    #disqus_thread

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
almanac-0.9.2 app/views/almanac/posts/_post.html.haml
almanac-0.9.1 app/views/almanac/posts/_post.html.haml
almanac-0.9.0 app/views/almanac/posts/_post.html.haml