<commit_before><div class="l-header-library -search">
  <div class="overlay"></div>
  <%= render 'shared/menu' %>
  <div class="row">
    <div class="small-12 columns">
      <div class="title-block">
        <h1 class="text -title-library">Search</h1>
        <%= render 'shared/share' %>
      </div>
    </div>
  </div>
</div>

<div class="l-header-library-separator"></div>

<% if @news.any? %>
  <%= render 'shared/news', news: @news, title: 'News', sectionClass: 'content -color-7' %>
<% end%>

<% if @activities.any? %>
  <%= render 'shared/posts', collection: @activities, title: 'Activities', link: activities_path, sectionClass: 'content -color-7' %>
<% end%>

<% if @publications.any? %>
  <%= render 'shared/posts', collection: @publications, title: 'Publications', link: publications_path, sectionClass: 'content -color-7' %>
<% end%>

<% if @media_contents.any? %>
  <section class="l-main-content content -news -color-7">
    <div class="row">
      <div class="small-12 columns">
        <div class="c-main-content-header">
          <h2 class="text -title-block">Media</h2>
            <p class="text -view-all">
              <%= link_to media_path do %>
                <span>View all media</span>
                <svg class="icon -arrow">
                  <use xlink:href="#icon-arrow"></use>
                </svg>
              <% end %>
            </p>
        </div>
      </div>
    </div>

    <div class="row">
      <div class="small-12 small-centered columns">
        <div class="c-slider slider js_slider" data-slider-type="card">
          <div class="frame js_frame">
            <div class="masonry-layout slides js_slides" data-columns="4">
              <% @media_contents.each do |media| %>
                <% picture_url = case media.type
                                   when MediaContent::TYPE_ALBUM
                                     photo = media.photos.first
                                     photo ? photo.photo_sizes.where(label: PhotoSize::MEDIUM).first.try(:url) : nil
                                   when MediaContent::TYPE_PHOTO
                                     media.photo_sizes.where(label: PhotoSize::MEDIUM).first.try(:url)
                                   else
                                     nil
                                 end %>
                <%= render 'shared/media_card',
                  picture: picture_url,
                  title: media.title,
                  link: medium_path(media),
                  photos_count: media.type == 'Album' ? media.photos.size : 0,
                  videos_count: 0 %>
              <% end %>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
<% end%>

<%= render 'shared/footer' %>
<commit_msg>No results block<commit_after><div class="l-header-library -search">
  <div class="overlay"></div>
  <%= render 'shared/menu' %>
  <div class="row">
    <div class="small-12 columns">
      <div class="title-block">
        <h1 class="text -title-library">Search</h1>
        <%= render 'shared/share' %>
      </div>
    </div>
  </div>
</div>

<div class="l-header-library-separator"></div>

<% if @news.empty? && @activities.empty? && @publications.empty? && @media_contents.empty? %>
  <section class="l-main-content content -news -color-7">
    <div class="row">
      <div class="small-12 small-centered columns">
        No results for your search
      </div>
    </div>
  </section>
<% end%>

<% if @news.any? %>
  <%= render 'shared/news', news: @news, title: 'News', sectionClass: 'content -color-7' %>
<% end%>

<% if @activities.any? %>
  <%= render 'shared/posts', collection: @activities, title: 'Activities', link: activities_path, sectionClass: 'content -color-7' %>
<% end%>

<% if @publications.any? %>
  <%= render 'shared/posts', collection: @publications, title: 'Publications', link: publications_path, sectionClass: 'content -color-7' %>
<% end%>

<% if @media_contents.any? %>
  <section class="l-main-content content -news -color-7">
    <div class="row">
      <div class="small-12 columns">
        <div class="c-main-content-header">
          <h2 class="text -title-block">Media</h2>
            <p class="text -view-all">
              <%= link_to media_path do %>
                <span>View all media</span>
                <svg class="icon -arrow">
                  <use xlink:href="#icon-arrow"></use>
                </svg>
              <% end %>
            </p>
        </div>
      </div>
    </div>

    <div class="row">
      <div class="small-12 small-centered columns">
        <div class="c-slider slider js_slider" data-slider-type="card">
          <div class="frame js_frame">
            <div class="masonry-layout slides js_slides" data-columns="4">
              <% @media_contents.each do |media| %>
                <% picture_url = case media.type
                                   when MediaContent::TYPE_ALBUM
                                     photo = media.photos.first
                                     photo ? photo.photo_sizes.where(label: PhotoSize::MEDIUM).first.try(:url) : nil
                                   when MediaContent::TYPE_PHOTO
                                     media.photo_sizes.where(label: PhotoSize::MEDIUM).first.try(:url)
                                   else
                                     nil
                                 end %>
                <%= render 'shared/media_card',
                  picture: picture_url,
                  title: media.title,
                  link: medium_path(media),
                  photos_count: media.type == 'Album' ? media.photos.size : 0,
                  videos_count: 0 %>
              <% end %>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
<% end%>

<%= render 'shared/footer' %>

{'fraction_non_alphanumeric': 0.15807501284466519, 'fraction_numerical': 0.006336701489981161, 'mean_word_length': 1.7099767981438516, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4016445', 'n_tokens_mistral': 1814, 'n_tokens_neox': 1680, 'n_words': 361}