<commit_before>{% extends 'base/standard.html.twig' %}

{% block head %}
  <style type="text/css">
    #games td {
      text-align: center;
    }

    .pc {
      background-color: rgb(10, 10, 10);
      color: white;
    }

    .vr {
      background-color: #b63438;
      color: white;
    }

    .sony {
      background-color: rgb(0, 64, 152);
      color: white;
    }

    .microsoft {
      background-color: rgb(17, 125, 16);
      color: white;
    }

    .nintendo {
      background-color: rgb(127, 127, 127);
      color: white;
    }

    .yes {
      display: block;
    }

    #games {
      border-color: black;
      border-radius: 0;
    }

    thead th {
      background-color: white;
      border-bottom: 2px black solid;
    }

    #games td, thead th {
      border-radius: 0 !important;
    }

    #games .divider {
      border-left: 1px solid rgba(0, 0, 0, 0.2);
    }

    #games {
      border: 1px solid rgba(0, 0, 0, 0.2);
    }

    .notable {
      font-weight: bold;
    }

    #new-game input[type=checkbox] {
      width: 100%;
      height: 25px;
    }

    #new-game td {
      vertical-align: middle;
    }

    .game-container {
      margin-left: 0;
    }

    .game-container .col-sm-2 {
      display: flex;
      padding-left: 0;
    }

    .game-container .card {
      flex-grow: 1;
    }

    .title {
      font-weight: 500;
    }

    .small-title {
      font-size: small;
    }

    .game {
      padding: 0.75rem 1rem;
      display: flex;
      flex-direction: column;
    }

    .fa-desktop, .fa-mobile {
      color: #1D2026;
    }

    .fa-xbox {
      color: #187B18;
    }

    .fa-playstation {
      color: #2A32AD;
    }

    .fa-nintendo-switch {
      color: #E50019;
    }

    .remove-game {
      display: none;
    }

    .game:hover .remove-game {
      display: block;
    }
  </style>
{% endblock %}

{% block content %}

  <h1 class="page-header board-header">/v/ - The Vidya</h1>
  <p class="board-subheader">A reminder of all the games released in 2018.</p>

  <div class="row game-container">
    {% for game in games %}
      <div class="col-sm-2">
        <div class="card mb-2">
          <div class="card-body game">
            <div class="title {{ game.name | length > 30 ? 'small-title' : '' }} mb-3">
              <a href="{{ game.url }}" target="_blank" class="text-dark">{{ game.name }}</a>
            </div>

            <div class="platforms mt-auto">
              {% if game.pc %}<i class="far fa-fw fa-desktop"></i>{% endif %}
              {% if game.x360 or game.xb1 %}<i class="fab fa-fw fa-xbox"></i>{% endif %}
              {% if game.ps3 or game.ps4 or game.vita %}<i class="fab fa-fw fa-playstation"></i>{% endif %}
              {% if game.switch %}<i class="fab fa-fw fa-nintendo-switch"></i>{% endif %}
              {% if game.mobile %}<i class="far fa-fw fa-mobile"></i>{% endif %}

              <a href="#" class="remove-game float-right" data-title="{{ game.name | e('html_attr') }}" data-id="{{ game.id }}">×</a>
            </div>
          </div>
        </div>
      </div>
    {% endfor %}
  </div>

  {% if is_granted('ROLE_ADD_VIDEO_GAME') and not configService.isReadOnly %}
    <button class="btn btn-primary my-3" type="button" data-toggle="modal" data-target="#addGameModal">
      <i class="far fa-plus"></i> Add a video game
    </button>

    <!-- Modal -->
    <div class="modal fade" id="addGameModal" tabindex="-1" role="dialog" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <form>
            <div class="modal-header">
              <h5 class="modal-title">Add a video game</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span><commit_msg>Replace the PC and mobile icons with branded icons<commit_after>{% extends 'base/standard.html.twig' %}

{% block head %}
  <style type="text/css">
    #games td {
      text-align: center;
    }

    .pc {
      background-color: rgb(10, 10, 10);
      color: white;
    }

    .vr {
      background-color: #b63438;
      color: white;
    }

    .sony {
      background-color: rgb(0, 64, 152);
      color: white;
    }

    .microsoft {
      background-color: rgb(17, 125, 16);
      color: white;
    }

    .nintendo {
      background-color: rgb(127, 127, 127);
      color: white;
    }

    .yes {
      display: block;
    }

    #games {
      border-color: black;
      border-radius: 0;
    }

    thead th {
      background-color: white;
      border-bottom: 2px black solid;
    }

    #games td, thead th {
      border-radius: 0 !important;
    }

    #games .divider {
      border-left: 1px solid rgba(0, 0, 0, 0.2);
    }

    #games {
      border: 1px solid rgba(0, 0, 0, 0.2);
    }

    .notable {
      font-weight: bold;
    }

    #new-game input[type=checkbox] {
      width: 100%;
      height: 25px;
    }

    #new-game td {
      vertical-align: middle;
    }

    .game-container {
      margin-left: 0;
    }

    .game-container .col-sm-2 {
      display: flex;
      padding-left: 0;
    }

    .game-container .card {
      flex-grow: 1;
    }

    .title {
      font-weight: 500;
    }

    .small-title {
      font-size: small;
    }

    .game {
      padding: 0.75rem 1rem;
      display: flex;
      flex-direction: column;
    }

    .fa-windows {
      color: #2BA8E1;
    }

    .fa-android {
      color: #93C04A;
    }

    .fa-xbox {
      color: #187B18;
    }

    .fa-playstation {
      color: #2A32AD;
    }

    .fa-nintendo-switch {
      color: #E50019;
    }

    .remove-game {
      display: none;
    }

    .game:hover .remove-game {
      display: block;
    }
  </style>
{% endblock %}

{% block content %}

  <h1 class="page-header board-header">/v/ - The Vidya</h1>
  <p class="board-subheader">A reminder of all the games released in 2018.</p>

  <div class="row game-container">
    {% for game in games %}
      <div class="col-sm-2">
        <div class="card mb-2">
          <div class="card-body game">
            <div class="title {{ game.name | length > 30 ? 'small-title' : '' }} mb-3">
              <a href="{{ game.url }}" target="_blank" class="text-dark">{{ game.name }}</a>
            </div>

            <div class="platforms mt-auto">
              {% if game.pc %}<i class="fab fa-fw fa-windows"></i>{% endif %}
              {% if game.x360 or game.xb1 %}<i class="fab fa-fw fa-xbox"></i>{% endif %}
              {% if game.ps3 or game.ps4 or game.vita %}<i class="fab fa-fw fa-playstation"></i>{% endif %}
              {% if game.switch %}<i class="fab fa-fw fa-nintendo-switch"></i>{% endif %}
              {% if game.mobile %}<i class="fab fa-fw fa-android"></i>{% endif %}

              <a href="#" class="remove-game float-right" data-title="{{ game.name | e('html_attr') }}" data-id="{{ game.id }}">×</a>
            </div>
          </div>
        </div>
      </div>
    {% endfor %}
  </div>

  {% if is_granted('ROLE_ADD_VIDEO_GAME') and not configService.isReadOnly %}
    <button class="btn btn-primary my-3" type="button" data-toggle="modal" data-target="#addGameModal">
      <i class="far fa-plus"></i> Add a video game
    </button>

    <!-- Modal -->
    <div class="modal fade" id="addGameModal" tabindex="-1" role="dialog" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <form>
            <div class="modal-header">
              <h5 class="modal-title">Add a video game</h5>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
{'fraction_non_alphanumeric': 0.1708672612123562, 'fraction_numerical': 0.02688380509241308, 'mean_word_length': 1.865925925925926, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 99, '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': '1982966', 'n_tokens_mistral': 2916, 'n_tokens_neox': 2611, 'n_words': 611}