<commit_before>
<%= if @referred_via_elixirweekly do %>
  <div class="post post--referred-via-elixirweekly">
    <div class="post__avatar">
      <div class="image" style="background: none">
        <img src="<%= static_path(@conn, "/images/elixirweekly-thumb.png") %>"/>
      </div>
    </div>
    <strong>Welcome!</strong>
    Submit your posts for the next ElixirWeekly!
  </div>
<% end %>

<div class="posts">
  <%= if logged_in?(@conn) do %>
    <%= if @page_number == 1 do %>
      <%= if @just_signed_in do %>
        <div id="post--new">
          <%= render "form.html", current_user: current_user(@conn),
                                  changeset: @changeset,
                                  action: posting_path(@conn, :create),
                                  conn: @conn,
                                  posting: nil,
                                  css_class: "post--new",
                                  editing?: false %>
        </div>
      <% else %>
        <div class="post post--sign-in-to-post" id="js-post-new-wrapper">
          <div class="post__avatar">
            <div class="image" style="background-image: url(<%= raw avatar_path(current_user(@conn).user_name) %>)"></div>
          </div>
          <a class="btn btn--sign-in" data-toggle="#post--new, #js-post-new-wrapper" href="#"><i class="icon-pen"></i> Submit a post</a>
        </div>
        <div id="post--new" style="display: none">
          <%= render "form.html", current_user: current_user(@conn),
                                  changeset: @changeset,
                                  action: posting_path(@conn, :create),
                                  conn: @conn,
                                  posting: nil,
                                  css_class: "post--new",
                                  editing?: false %>
        </div>
      <% end %>
    <% else %>
      <div class="post post--sign-in-to-post" id="js-post-new-wrapper">
        <div class="post__avatar">
          <div class="image" style="background-image: url(<%= raw avatar_path(current_user(@conn).user_name) %>)"></div>
        </div>
        <a class="btn btn--sign-in" href="/postings/new"><i class="icon-pen"></i> Submit another post</a>
      </div>
    <% end %>
  <% else %>
    <div class="post post--sign-in-to-post">
      <div class="post__avatar">
        <div class="image" style="background-color: #f5f5f5; border: 1px dashed #aaa;"></div>
      </div>
      <a class="btn btn--sign-in" href="/auth"><i class="icon-git"></i> Sign in and post</a>
    </div>
  <% end %>

  <%= if @searching? do %>
    Search results for <code><%= @search_query %></code>
    <a href="/">clear</a>
  <% end %>

  <% #= render ElixirStatus.PostingView, "_tab_nav_index.html", assigns %>

  <h1>Today</h1>

  <%= for {posting, index} <- Enum.with_index(@postings) do %>
    <%= render ElixirStatus.PostingView, "posting.html", conn: @conn,
                posting: posting,
                belongs_to_me?: ElixirStatus.Auth.belongs_to_current_user?(@conn, posting),
                just_created_by_me?: @created_posting == posting
                %>
    <%= if index == 2 || index == 8 do %>
      <%= render ElixirStatus.SharedView, "promo_elixirweekly.html", conn: @conn %>
    <% end %>
  <% end %>
</div>

<div class="pagination">
  <%= if @page_number > 1 do %>
    <%= link "Previous", to: posting_path(@conn, :index, page: @page_number - 1), class: "pagination__item pagination__item--older" %>
  <% else %>
    <span class="pagination__item pagination__item--older">Previous</span>
  <% end %>
  <%= if @page_number < @total_pages do %>
    <%= link "Next", to: posting_path(@conn, :index, page: @page_number + 1), class: "pagination__item pagination__item--newer" %>
  <% else %><commit_msg>Clean posting/index template<commit_after>
<%= if @referred_via_elixirweekly do %>
  <div class="post post--referred-via-elixirweekly">
    <div class="post__avatar">
      <div class="image" style="background: none">
        <img src="<%= static_path(@conn, "/images/elixirweekly-thumb.png") %>"/>
      </div>
    </div>
    <strong>Welcome!</strong>
    Submit your posts for the next ElixirWeekly!
  </div>
<% end %>

<div class="posts">
  <%= if logged_in?(@conn) do %>
    <%= if @page_number == 1 do %>
      <%= if @just_signed_in do %>
        <div id="post--new">
          <%= render "form.html", current_user: current_user(@conn),
                                  changeset: @changeset,
                                  action: posting_path(@conn, :create),
                                  conn: @conn,
                                  posting: nil,
                                  css_class: "post--new",
                                  editing?: false %>
        </div>
      <% else %>
        <div class="post post--sign-in-to-post" id="js-post-new-wrapper">
          <div class="post__avatar">
            <div class="image" style="background-image: url(<%= raw avatar_path(current_user(@conn).user_name) %>)"></div>
          </div>
          <a class="btn btn--sign-in" data-toggle="#post--new, #js-post-new-wrapper" href="#"><i class="icon-pen"></i> Submit a post</a>
        </div>
        <div id="post--new" style="display: none">
          <%= render "form.html", current_user: current_user(@conn),
                                  changeset: @changeset,
                                  action: posting_path(@conn, :create),
                                  conn: @conn,
                                  posting: nil,
                                  css_class: "post--new",
                                  editing?: false %>
        </div>
      <% end %>
    <% else %>
      <div class="post post--sign-in-to-post" id="js-post-new-wrapper">
        <div class="post__avatar">
          <div class="image" style="background-image: url(<%= raw avatar_path(current_user(@conn).user_name) %>)"></div>
        </div>
        <a class="btn btn--sign-in" href="/postings/new"><i class="icon-pen"></i> Submit another post</a>
      </div>
    <% end %>
  <% else %>
    <div class="post post--sign-in-to-post">
      <div class="post__avatar">
        <div class="image" style="background-color: #f5f5f5; border: 1px dashed #aaa;"></div>
      </div>
      <a class="btn btn--sign-in" href="/auth"><i class="icon-git"></i> Sign in and post</a>
    </div>
  <% end %>

  <%= if @searching? do %>
    Search results for <code><%= @search_query %></code>
    <a href="/">clear</a>
  <% end %>

  <% #= render ElixirStatus.PostingView, "_tab_nav_index.html", assigns %>

  <%= for {posting, index} <- Enum.with_index(@postings) do %>
    <%= render ElixirStatus.PostingView, "posting.html", conn: @conn,
                posting: posting,
                belongs_to_me?: ElixirStatus.Auth.belongs_to_current_user?(@conn, posting),
                just_created_by_me?: @created_posting == posting
                %>
    <%= if index == 2 || index == 8 do %>
      <%= render ElixirStatus.SharedView, "promo_elixirweekly.html", conn: @conn %>
    <% end %>
  <% end %>
</div>

<div class="pagination">
  <%= if @page_number > 1 do %>
    <%= link "Previous", to: posting_path(@conn, :index, page: @page_number - 1), class: "pagination__item pagination__item--older" %>
  <% else %>
    <span class="pagination__item pagination__item--older">Previous</span>
  <% end %>
  <%= if @page_number < @total_pages do %>
    <%= link "Next", to: posting_path(@conn, :index, page: @page_number + 1), class: "pagination__item pagination__item--newer" %>
  <% else %>
{'fraction_non_alphanumeric': 0.17668031163343456, 'fraction_numerical': 0.0029050574409084907, 'mean_word_length': 2.077610727346607, 'pattern_counts': {'":': 0, '<': 179, '<?xml version=': 0, '>': 177, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4922232', 'n_tokens_mistral': 2539, 'n_tokens_neox': 2355, 'n_words': 497}