%ul.anime-list
  - @results.each do |post|
    - page_number = 1 + post.topic.posts.where('created_at <= ?', post.created_at).count / Forem.per_page
    %li.search-result.cf
      .large-1.columns.hide-for-small.avatar.no-padding-right
        = link_to image_tag(post.user.avatar.url(:thumb)), post.user
      .small-12.large-11.columns
        .large-12.columns.forum-title.no-padding
          = link_to post.topic.subject, forem.topic_path(post.topic, page: page_number, anchor: "post#{post.id}")
        .large-12.columns.forum-info.no-padding
          %p 
            = distance_of_time_in_words_to_now post.created_at
            ago by
            = link_to post.user.name, post.user
            to
            = link_to post.topic.forum.title, forem.forum_path(post.topic.forum)
        .large-12.columns.synopsis
          %p
            = truncate strip_tags(post.text), length: 280, separator: ' '
            - if strip_tags(post.text).length > 280
              %span
                = link_to "[read more]", forem.topic_path(post.topic, page: page_number, anchor: "post#{post.id}")

= paginate @results

%ul.anime-list
  - @results.each do |post|
    - page_number = 1 + post.topic.posts.where('created_at <= ?', post.created_at).count / Forem.per_page
    %li.search-result.cf
      .large-1.columns.hide-for-small.avatar.no-padding-right
        = link_to image_tag(post.user.avatar.url(:thumb)), post.user
      .small-12.large-11.columns
        .large-12.columns.forum-title.no-padding
          = link_to post.topic.subject, forem.forum_topic_path(post.topic.forum, post.topic, page: page_number, anchor: "post#{post.id}")
        .large-12.columns.forum-info.no-padding
          %p 
            = distance_of_time_in_words_to_now post.created_at
            ago by
            = link_to post.user.name, post.user
            to
            = link_to post.topic.forum.title, forem.forum_path(post.topic.forum)
        .large-12.columns.synopsis
          %p
            = truncate strip_tags(post.text), length: 280, separator: ' '
            - if strip_tags(post.text).length > 280
              %span
                = link_to "[read more]", forem.forum_topic_path(post.topic.forum, post.topic, page: page_number, anchor: "post#{post.id}")

= paginate @results

Fix forum topic link in search.
Fix forum topic link in search.
