Sha256: 8a01ea375b989081244ce48da259df9fbde9f832595dbe2df385a9b3a675041f

Contents?: true

Size: 1.68 KB

Versions: 6

Compression:

Stored size: 1.68 KB

Contents

%div{ id: dom_id(post), class: dom_class(post) }
  .row
    .col-12
      %h1.post-title
        = post.title
      %small
        %span.post-creation-information.text-muted
          = instance_exec(post, &Cmor::Blog::Configuration.post_creation_information_proc)

        - if Cmor::Core.features?(:cmor_comments)
          |
          %span.comments-information
            = link_to(t('cmor.comments.commentable.comments_information', comments_count: post.comments.count), cmor_blog.post_url(post, anchor: 'comments'))
        - if Cmor::Core.features?(:cmor_tags)
          |
          %span.post-tags
            = tags_helper(self).render_tags_for(post)

  .row
    .col-12
      %p.post-body= post.body(format: :html).html_safe

  - if post.asset_details.images.any?
    .row
      - post.asset_details.images.order(position: :asc).each do |picture_detail|
        .col-lg-4.d-flex.align-items-stretch
          .card.text-center.border-0
            %a{ href: main_app.url_for(picture_detail.asset), data: { gallery: dom_id(post) } }
              %img.ing-fluid.w-100{ src: main_app.url_for(picture_detail.asset.variant(Cmor::Blog::Configuration.preview_picture_asset_variant_options)) }
            .card-body
              %h5.card-title
                = picture_detail.title
              %p.card-text
                = picture_detail.description

  - if post.asset_details.non_images.any?
    .row
      .col-12
        = collection_table(collection: post.asset_details.non_images.order(position: :asc)) do |t|
          = t.column :filename
          = t.column :actions do |resource|
            - link_to(main_app.url_for(resource.asset), class: 'btn btn-primary') do
              - t('.download')

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cmor_blog-0.0.60.pre app/views/cmor/blog/posts/_post.html.haml
cmor_blog-0.0.59.pre app/views/cmor/blog/posts/_post.html.haml
cmor_blog-0.0.58.pre app/views/cmor/blog/posts/_post.html.haml
cmor_blog-0.0.57.pre app/views/cmor/blog/posts/_post.html.haml
cmor_blog-0.0.56.pre app/views/cmor/blog/posts/_post.html.haml
cmor_blog-0.0.55.pre app/views/cmor/blog/posts/_post.html.haml