%ul.category-summary
  - categories.select {|category| category.post_count > 0 }.each do |category|
    %li.category-summary__item
      = link_to "#{category.name} (#{category.post_count})", category_url(category.slug), class: "category-summary__title"

      %ul.category-summary__list
        - if category.has_children?
          - category.children.each do |sub_category|
            %li.category-summary__list-item
              = link_to category.name, category_url(category.slug)

        - else
          - category.posts.published.order_by_recent.limit(7).each do |post|
            %li.category-summary__list-item
              = link_to post.title, post_url(post.public_id)

%ul.category-summary
  - categories.select {|category| category.post_count > 0 }.each do |category|
    %li.category-summary__item
      = link_to "#{category.name} (#{category.post_count})", category_url(category.slug), class: "category-summary__title"

      %ul.category-summary__list
        - if category.has_children?
          - category.children.each do |sub_category|
            %li.category-summary__list-item
              = link_to "#{sub_category.name} (#{sub_category.post_count})", category_url(category.slug)

        - else
          - category.posts.published.order_by_recent.limit(7).each do |post|
            %li.category-summary__list-item
              = link_to post.title, post_url(post.public_id)

Fix sub category's text :<
Fix sub category's text :<
