<commit_before><%- title @story.name %>

<% if current_user %>
  <div id="story-toolbar-container" class="fd-toolbar-container">
    <div id="story-toolbar" class="fd-toolbar">
      <ul id="story-toolbar-left" class="fd-toolbar-left">
        <%# This has to be here, because CSS. %>
      </ul>

      <ul id="story-toolbar-right" class="fd-toolbar-right">
        <% if @story.published %>
          <%= react_component('AddToBookshelves', render(partial: 'bookshelves/add_to_bookshelves.json.jbuilder', locals: {i18npath: 'stories.show'}), tag: "li", id: "add-to-bookshelves") %>
        <% end %>

        <% if current_user == @story.author %>
          <li><%= link_to t(".edit"), edit_story_path(@story) %></li>

          <% if @story.published %>
            <li><%= button_to t(".unpublish"), unpublish_story_path(@story), method: :delete %></li>
          <% elsif @story.publishable? %>
            <li><%= button_to t(".publish"), publish_story_path(@story), method: :post %></li>
          <% else %>
            <li><%= button_to t(".publish"), publish_story_path(@story), method: :post, disabled: true, title: t(".you_can't_publish_this_story_without_first_publishing_a_chapter") %></li>
          <% end %>
        <% end %>

        <% unless current_user == @story.author %>
          <li><%= link_to t(".report"), "#" %></li>
        <% end %>
      </ul>
    </div>
  </div>
<% end %>

<div class="story-directory">

  <div class="story-information">
    
    <%# Only display Favorite button if the story has been published. %>
    <% if @story.published %>
      <%# Favorite button %>
      <% if current_user.try(:has_favorited?, @story) %>
        <div class="story-favorite-button favorited">
          <%= link_to unfavorite_story_path(@story), method: :delete do %>
            <span class="icon icon-heart" title="<%= t('.unfavorite') %>"></span>
          <% end %>
        </div>
      <% else %>
        <div class="story-favorite-button favorite">
          <%= link_to favorite_story_path(@story), method: :post do %>
            <span class="icon icon-heart-border" title="<%= t('.favorite') %>"></span>
          <% end %>
        </div>
      <% end %>
    <% end %>

    <h2 class="story-title"><%= @story.name %></h2>

    <p class="story-description"><%= @story.description %></p>

    <div class="table-of-contents">
      <ol class="toc-chapter-list">
        <%= render partial: 'chapter_stub', collection: policy_scope(@story.chapters), as: :chapter %>

        <% if current_user == @story.author %>
          <li class="add-new-chapter"><%= link_to t(".add_a_new_chapter"), new_story_chapter_path(@story) %></li>
        <% end %>
      </ol>
    </div>

    <div class="story-extra-information">

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".author") %></li>
        <li><%= link_to(@story.author.name, user_path(@story.author)) %></li>
      </ul>

      <% if @story.published %>
        <ul class="story-extra-information-block">
          <li class="list-item-header"><%= t(".published") %></li>
          <li><%= @story.created_at.strftime("%B %e, %Y") %></li>
        </ul>
      <% end %>

      <% if @story.published %>
        <ul class="story-extra-information-block">
          <li class="list-item-header"><%= t(".last_updated") %></li>
          <li><%= @story.updated_at.strftime("%B %e, %Y") %></li>
        </ul>
      <% end %>

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".rating") %></li>
        <li><%= t("ratings.#{@story.content_rating}") %></li>
      </ul>

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".language") %></li>
        <li><%= t("languages.#{@story.language}") %></li>
      </ul>

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".license") %></li>
        <li><%= t("licenses_html.#{@story.license}_html") %></li>
      </ul>

      <ul class="story-franchises-list">
        <li class="list-item-header"><%= t(".franchises") %></li>

        <% @story.franchises.each do |franchise| %>
          <li><%= link_to franchise.name, franchise_path(franchise) %></li>
        <% end %>
      </ul>

      <ul class="story-characters-list">
        <li class="list-item-header"><%= t(".characters") %></li>
        <% @story.characters.each do |character| %>
          <li><%= link_to character.name, franchise_character_path(character.franchise, character) %></li>
        <% end %>
      </ul><commit_msg>I honestly forget what this changes (it's my first week of college I'm tired lay off)<commit_after><%- title @story.name %>

<% if current_user %>
  <div id="story-toolbar-container" class="fd-toolbar-container">
    <div id="story-toolbar" class="fd-toolbar">
      <ul id="story-toolbar-left" class="fd-toolbar-left">
        <%# This has to be here, because CSS. %>
      </ul>

      <ul id="story-toolbar-right" class="fd-toolbar-right">
        <% if @story.published %>
          <%= react_component('AddToBookshelves', render(partial: 'bookshelves/add_to_bookshelves.json.jbuilder', locals: {i18npath: 'stories.show'}), tag: "li", id: "add-to-bookshelves") %>
        <% end %>

        <% if current_user == @story.author %>
          <li><%= link_to t(".edit"), edit_story_path(@story) %></li>

          <% if @story.published %>
            <li><%= button_to t(".unpublish"), unpublish_story_path(@story), method: :delete %></li>
          <% elsif @story.publishable? %>
            <li><%= button_to t(".publish"), publish_story_path(@story), method: :post %></li>
          <% else %>
            <li><%= button_to t(".publish"), publish_story_path(@story), method: :post, disabled: true, title: t(".you_can't_publish_this_story_without_first_publishing_a_chapter") %></li>
          <% end %>
        <% end %>

        <% unless current_user == @story.author %>
          <li><%= link_to t(".report"), "#" %></li>
        <% end %>
      </ul>
    </div>
  </div>
<% end %>

<div class="story-directory">

  <div class="story-information">
    
    <%# Only display Favorite button if the story has been published. %>
    <% if @story.published %>
      <%# Favorite button %>
      <% if current_user.try(:has_favorited?, @story) %>
        <div class="story-favorite-button favorited">
          <%= link_to unfavorite_story_path(@story), method: :delete do %>
            <span class="icon icon-heart" title="<%= t('.unfavorite') %>"></span>
          <% end %>
        </div>
      <% else %>
        <div class="story-favorite-button favorite">
          <%= link_to favorite_story_path(@story), method: :post do %>
            <span class="icon icon-heart-border" title="<%= t('.favorite') %>"></span>
          <% end %>
        </div>
      <% end %>
    <% end %>

    <h2 class="story-title"><%= @story.name %></h2>

    <p class="story-description"><%= @story.description %></p>

    <div class="table-of-contents">
      <ol class="toc-chapter-list">
        <%= render partial: 'chapter_stub', collection: policy_scope(@story.chapters), as: :chapter %>

        <% if current_user == @story.author %>
          <li class="add-new-chapter"><%= link_to t(".add_a_new_chapter"), new_story_chapter_path(@story) %></li>
        <% end %>
      </ol>
    </div>

    <div class="story-extra-information">

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".author") %></li>
        <li><%= link_to(@story.author.name, user_path(@story.author)) %></li>
      </ul>

      <% if @story.published %>
        <ul class="story-extra-information-block">
          <li class="list-item-header"><%= t(".published") %></li>
          <li><%= @story.created_at.strftime("%B %e, %Y") %></li>
        </ul>
      <% end %>

      <% if @story.published %>
        <ul class="story-extra-information-block">
          <li class="list-item-header"><%= t(".last_updated") %></li>
          <li><%= @story.updated_at.strftime("%B %e, %Y") %></li>
        </ul>
      <% end %>

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".rating") %></li>
        <li><%= t("ratings.#{@story.content_rating}") %></li>
      </ul>

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".language") %></li>
        <li><%= t("languages.#{@story.language}") %></li>
      </ul>

      <ul class="story-extra-information-block">
        <li class="list-item-header"><%= t(".license") %></li>
        <li><%= t("licenses_html.#{@story.license}_html") %></li>
      </ul>
      <ul class="story-franchises-list">
        <li class="list-item-header"><%= t(".franchises") %></li>

        <% @story.franchises.each do |franchise| %>
          <li><%= link_to franchise.name, franchise_path(franchise) %></li>
        <% end %>
      </ul>

      <ul class="story-characters-list">
        <li class="list-item-header"><%= t(".characters") %></li>
        <% @story.characters.each do |character| %>
          <li><%= link_to character.name, franchise_character_path(character.franchise, character) %></li>
        <% end %>
      </ul>
{'fraction_non_alphanumeric': 0.21514462138446538, 'fraction_numerical': 0.0008666450005416531, 'mean_word_length': 2.6533438860308665, 'pattern_counts': {'":': 0, '<': 303, '<?xml version=': 0, '>': 303, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2622907', 'n_tokens_mistral': 3202, 'n_tokens_neox': 2945, 'n_words': 580}