<commit_before><div class="sheet">
  <!-- times -->
  <% if @recipe.sum_of_times != 0%>
    <div class="row">
      <div class="col-xs-12">
        <div class="recipe-times progress">
          <% {cooking: 'warning', baking: 'danger', cooling: 'info', rest: 'success'}.each do |time, color| %>
            <% time_value = @recipe.send time %>
            <div class="recipe-time progress-bar progress-bar-<%= color %>" style="width: <%= @recipe.percentage_time time %>%">
              <span><span class="recipe-time-title"><%= Recipe::TIME_LABELS[time.to_sym] %></span> <%= @recipe.send time %>"</span>
            </div>
          <% end %>
        </div>
      </div>
    </div>
    <!-- end of image-->
  <% end %>
  <!-- title of recipe -->
  <div class="row page-header recipe">
    <div class="col-xs-12 col-md-8">
      <% if @recipe.user %>
        <%= render "users/image", user: @recipe.user %>
      <% end %>
      <h1 class="recipe"><%= @recipe.pretty_name %></h1>
      <pre><%=  %></pre>
      <% if @recipe.rate.to_i != 0 %>
        <%= render 'shared/stars', stars: @recipe.rate.to_i %>
      <% end %>
      <!-- allergens -->
      <p class="lead">
        <%= render 'recipes/allergens', recipe: @recipe %>
      </p>
      <p><%= @recipe.description %></p>
    </div>
    <!-- image -->
    <% if @recipe.has_image? %>
      <div class="col-xs-12 col-md-4">
        <%= image_tag @recipe.true_image_url , class: "img img-responsive full-width recipe-image"%>
      </div>
    <% end %>
  </div>
  <!-- forked recipes -->
  <div class="row">
    <!-- forked recipes -->
    <% if @recipe.forked_recipes.length > 0 %>
      <div class="col-xs-12">
        <h2>Variantes disponnibles</h2>
        <%= render 'shared/recipes' , :recipes => @recipe.forked_recipes %>
      </div>
    <% elsif @recipe.forked?  %>
      <div class="col-xs-12">
        <h2>Recette originelle</h2>
        <%= render 'shared/recipe' , :recipe => @recipe.root_recipe %>
      </div>
    <% end %>
  </div>
  <!-- ingredients and steps -->
  <div class="row">
    <div class="col-sm-4">
      <!-- ingrédients -->
      <% if @recipe.ingredients %>
        <div id="ingredients" class="row">
          <div class="col-xs-12">
            <h2 class="visible-md-block visible-sm-block">Ingrédients</h2>
            <ul class="list-group">
              <% @recipe.ingredients.each_line do |ingredient|%>
                <li class="col-sm-12 col-xs-6 list-group-item">
                  <%= link_to ingredient , recipes_path( :ingredients => ingredient )  %>
                </li>
              <% end %>
            </ul>
          </div>
        </div>
        <!-- #ingredients -->
      <% end %><!--/ ingrédients -->
      <div id="informations">
        <h2 class="visible-md-block visible-sm-block">Informations</h2>
        <div class="recipe-information col-sm-12 col-xs-3">
          <strong>Vues</strong>
          <%= image_tag 'icons/views.svg', class: 'views', alt: "Lunettes", height: 60 %><br/><%= @recipe.count_views %> fois
          </div>
          <div class="recipe-information col-sm-12 col-xs-3">
            <strong>Type</strong>
            <%= recipe_label_type @recipe  %>
          </div>
          <div class="recipe-information col-sm-12 col-xs-3">
            <strong>Saison</strong>
            <%= recipe_label_season @recipe %>
          </div>
        </div>
        <!-- / #informations -->
      </div>
      <!--/ .col-sm-3 -->
      <!-- steps -->
      <% if @recipe.steps %>
        <div id="steps" class="col-sm-8">
          <h2>Préparation</h2>
          <% @recipe.steps.each_line do |step|%>
            <p><%= step %></p>
          <% end %>
          <p class="alert alert-info" role="alert">Cette recette vous a paru trop grasse? <%= link_to "Créez votre variante" , fork_recipe_path( :id => @recipe.id), class: 'alert-link' %>!</p>
        </div>
        <!--/ #steps -->
      <% end %>
    </div>
  </div>
  <div class="row">
    <!-- actions buttons -->
    <div class="col-xs-12 recipe-toolbar">
      <div class="btn-group text-center" role="group" aria-label="...">
        <!-- fork button -->
        <%= link_to fork_recipe_path( :id => @recipe.id) , :class => 'btn btn-lg btn-primary' do %>
          <span class="glyphicon glyphicon-transfer" aria-hidden="true"></span> créer une variante
        <% end %>
        <!--/ .button-group -->
        <!-- if it's the owner of the recipe  -->
        <% if @recipe.user and current_user == @recipe.user %>
          <!-- edit button -->
          <%= link_to edit_recipe_path , :class => 'btn btn-lg btn-warning' do %>
            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> modifier
          <% end %>
          <!-- delete button -->
          <%= link_to @recipe , class: 'btn btn-lg btn-danger', method: :delete, confirm: "Etes vous certains de vouloir supprimer #{@recipe.name}?" , title: "Supprimer #{@recipe.name}?" do %>
            <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> supprimer
          <% end %>
        <% end %>
      </div>
      <!--/ .button-group -->
    </div>
    <!--/ .col-xs-12 (buttons)-->
  </div>
  <!--/.sheet -->
  <!-- commentaires -->
  <div class="row">
    <div class="col-xs-12 recipe-comments">
      <h2>Commentaires</h2>
      <%= render 'shared/comments', :comments => @recipe .comments %>
    </div>
  </div>
  <div class="row">
    <!-- actions buttons -->
    <div class="col-xs-12">
      <h3>Vous pouriez aussi aimer</h3><commit_msg>Center title for recipe who doesn't contain picture<commit_after><div class="sheet">
  <!-- times -->
  <% if @recipe.sum_of_times != 0%>
    <div class="row">
      <div class="col-xs-12">
        <div class="recipe-times progress">
          <% {cooking: 'warning', baking: 'danger', cooling: 'info', rest: 'success'}.each do |time, color| %>
            <% time_value = @recipe.send time %>
            <div class="recipe-time progress-bar progress-bar-<%= color %>" style="width: <%= @recipe.percentage_time time %>%">
              <span><span class="recipe-time-title"><%= Recipe::TIME_LABELS[time.to_sym] %></span> <%= @recipe.send time %>"</span>
            </div>
          <% end %>
        </div>
      </div>
    </div>
    <!-- end of image-->
  <% end %>
  <!-- title of recipe -->
  <div class="row page-header recipe">
    <div class="col-xs-12 <%= 'col-md-8' if @recipe.has_image? %>">
      <% if @recipe.user %>
        <%= render "users/image", user: @recipe.user %>
      <% end %>
      <h1 class="recipe"><%= @recipe.pretty_name %></h1>
      <pre><%=  %></pre>
      <% if @recipe.rate.to_i != 0 %>
        <%= render 'shared/stars', stars: @recipe.rate.to_i %>
      <% end %>
      <!-- allergens -->
      <p class="lead">
        <%= render 'recipes/allergens', recipe: @recipe %>
      </p>
      <p><%= @recipe.description %></p>
    </div>
    <!-- image -->
    <% if @recipe.has_image? %>
      <div class="col-xs-12 col-md-4">
        <%= image_tag @recipe.true_image_url , class: "img img-responsive full-width recipe-image"%>
      </div>
    <% end %>
  </div>
  <!-- forked recipes -->
  <div class="row">
    <!-- forked recipes -->
    <% if @recipe.forked_recipes.length > 0 %>
      <div class="col-xs-12">
        <h2>Variantes disponnibles</h2>
        <%= render 'shared/recipes' , :recipes => @recipe.forked_recipes %>
      </div>
    <% elsif @recipe.forked?  %>
      <div class="col-xs-12">
        <h2>Recette originelle</h2>
        <%= render 'shared/recipe' , :recipe => @recipe.root_recipe %>
      </div>
    <% end %>
  </div>
  <!-- ingredients and steps -->
  <div class="row">
    <div class="col-sm-4">
      <!-- ingrédients -->
      <% if @recipe.ingredients %>
        <div id="ingredients" class="row">
          <div class="col-xs-12">
            <h2 class="visible-md-block visible-sm-block">Ingrédients</h2>
            <ul class="list-group">
              <% @recipe.ingredients.each_line do |ingredient|%>
                <li class="col-sm-12 col-xs-6 list-group-item">
                  <%= link_to ingredient , recipes_path( :ingredients => ingredient )  %>
                </li>
              <% end %>
            </ul>
          </div>
        </div>
        <!-- #ingredients -->
      <% end %><!--/ ingrédients -->
      <div id="informations">
        <h2 class="visible-md-block visible-sm-block">Informations</h2>
        <div class="recipe-information col-sm-12 col-xs-3">
          <strong>Vues</strong>
          <%= image_tag 'icons/views.svg', class: 'views', alt: "Lunettes", height: 60 %><br/><%= @recipe.count_views %> fois
          </div>
          <div class="recipe-information col-sm-12 col-xs-3">
            <strong>Type</strong>
            <%= recipe_label_type @recipe  %>
          </div>
          <div class="recipe-information col-sm-12 col-xs-3">
            <strong>Saison</strong>
            <%= recipe_label_season @recipe %>
          </div>
        </div>
        <!-- / #informations -->
      </div>
      <!--/ .col-sm-3 -->
      <!-- steps -->
      <% if @recipe.steps %>
        <div id="steps" class="col-sm-8">
          <h2>Préparation</h2>
          <% @recipe.steps.each_line do |step|%>
            <p><%= step %></p>
          <% end %>
          <p class="alert alert-info" role="alert">Cette recette vous a paru trop grasse? <%= link_to "Créez votre variante" , fork_recipe_path( :id => @recipe.id), class: 'alert-link' %>!</p>
        </div>
        <!--/ #steps -->
      <% end %>
    </div>
  </div>
  <!-- actions buttons -->
  <div class="row">
    <div class="col-xs-12 recipe-toolbar">
      <div class="btn-group text-center" role="group" aria-label="...">
        <!-- fork button -->
        <%= link_to fork_recipe_path( :id => @recipe.id) , :class => 'btn btn-lg btn-primary' do %>
          <span class="glyphicon glyphicon-transfer" aria-hidden="true"></span> créer une variante
        <% end %>
        <!--/ .button-group -->
        <!-- if it's the owner of the recipe  -->
        <% if @recipe.user and current_user == @recipe.user %>
          <!-- edit button -->
          <%= link_to edit_recipe_path , :class => 'btn btn-lg btn-warning' do %>
            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> modifier
          <% end %>
          <!-- delete button -->
          <%= link_to @recipe , class: 'btn btn-lg btn-danger', method: :delete, confirm: "Etes vous certains de vouloir supprimer #{@recipe.name}?" , title: "Supprimer #{@recipe.name}?" do %>
            <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> supprimer
          <% end %>
        <% end %>
      </div>
      <!--/ .button-group -->
    </div>
    <!--/ .col-xs-12 (buttons)-->
  </div>
  <!--/.sheet -->
  <!-- commentaires -->
  <div class="row">
    <div class="col-xs-12 recipe-comments">
      <h2>Commentaires</h2>
      <%= render 'shared/comments', :comments => @recipe .comments %>
    </div>
  </div>
  <div class="row">
    <div class="col-xs-12">
      <h3>Vous pouriez aussi aimer</h3>
{'fraction_non_alphanumeric': 0.20518825436858223, 'fraction_numerical': 0.010448567825617006, 'mean_word_length': 1.998379692141507, 'pattern_counts': {'":': 0, '<': 355, '<?xml version=': 0, '>': 373, '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': '5501751', 'n_tokens_mistral': 3957, 'n_tokens_neox': 3680, 'n_words': 768}