<commit_before><p id="notice"><%= notice %></p>

<h1>Listing Services</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th>Image</th>
      <th>Url</th>
      <th>Description</th>
      <th>User</th>
      <th>Service type</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @services.each do |service| %>
      <tr>
        <td><%= service.name %></td>
        <td><%= service.image %></td>
        <td><%= service.url %></td>
        <td><%= service.description %></td>
        <td><%= service.user %></td>
        <td><%= service.service_type %></td>
        <td><%= link_to 'Show', service %></td>
        <td><%= link_to 'Edit', edit_service_path(service) %></td>
        <td><%= link_to 'Destroy', service, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Service', new_service_path %><commit_msg>Added classes onto each listed service - they change background colours depending on the service type<commit_after><div id="homepage-banner-img" class="full-width-banner">
  <div id="homepage-title" class="radius">
    <h2>Services</h2>
  </div>
</div>
<section class="row">
  <p id="notice" class="small-12 text-center columns"><%= notice %></p>
</section>

<ul class="row">
  <div class="small-block-grid-1 small-centered medium-block-grid-3 columns">
    <% @services.each do |service| %>
      <li class="<%= service.service_type.name.downcase.gsub(/\s+/, "") %>-box">
        <ul class="no-bullet">
          <li><i class="<%= service.service_type.icon %> font-size-1-5em margin-right-10"></i><%= link_to service.name, service, class: "font-size-2em" %></li>
          <li><%= service.service_type.name %></li>
          <li><%= truncate(service.description)%></li>
          <li>
              <% service.tags.each do |tag| %>
                <%= link_to tag, services_path, class: "button tag" %>
              <% end %>
          </li>
        </ul>
      </li>
    <% end %>
  </div>
</ul>

<div class="row">
  <p class="small-12 text-center columns">Do you think this site is missing an important service? You can <%= link_to 'add a service here', new_service_path %>. 
  </p>
</div>
{'fraction_non_alphanumeric': 0.2152242863615768, 'fraction_numerical': 0.007249660172179429, 'mean_word_length': 2.6923076923076925, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 107, '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': '2259499', 'n_tokens_mistral': 810, 'n_tokens_neox': 764, 'n_words': 181}