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

{% block fullTitle %}/v/GAs - Voting{% endblock %}

{% block css %}
  {{ parent() }}
  <link rel="stylesheet" href="{{ asset('css/voting.css') }}">
  <link rel="stylesheet" href="{{ asset('css/votingNominees.css') }}">
{% endblock %}

{% block js %}
  {{ parent() }}
  <script src="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.6.0/Sortable.min.js"></script>
  <script src='{{ asset('js/dumbshit.js') }}'></script>
  <script src='{{ asset('js/voting.js') }}'></script>
{% endblock %}

{% block head %}
  {% if award %}
    <script type="text/javascript">
      var votingEnabled = {{ votingOpen ? 'true' : 'false' }};
      var lastVotes = {{ votes | json_encode | raw }};
      var currentAward = "{{ award.id }}";
      var postURL = "{{ path('votingSubmission', {'awardID': award.id}) }}";
      var votingStyle = "{{ votingStyle }}";
    </script>
  {% endif %}

  {% if votingOpen %}
    <style type="text/css">
      .aNominee {
        cursor: move;
      }
      .voteBox {
        cursor: pointer;
      }

      #voteDropAreaBottom:empty:after {
        content: 'You haven\'t yet voted for this award - click on any number of nominees in the order you want them to win';
      }

    </style>
  {% endif %}
{% endblock %}

{% block body %}
  <p class="shit">Created and Directed by<br><span style="font-size:100px"><NAME></span></p>

  <div class="pageHeader">
    {#<a href="{{ path('voting') }}"><img src="{{ asset('2016images/vga_logo.png') }}" class="logo" alt="oh god it's happening again"/></a>#}
    <h1>The 2017 Vidya Gaem Awards</h1>
    <h2>{{ voteText }}</h2>
  </div>

  {#<div class="pageHeader" style="text-align: center; height: 110px;">#}
  {#<label>Width <input type="number" value="350" id="debugWidth"></label>#}
  {#<label>Height <input type="number" value="140" id="debugHeight"></label>#}
  {#<label>Title <input type="number" value="14" id="debugTitle"></label>#}
  {#<label>Subtitle <input type="number" value="12" id="debugSubtitle"></label>#}
  {#</div>#}

    <script type="text/javascript">
        $(document).ready(function () {
            var val;
            $('#debugWidth').change(function () {
                val = $(this).val();
//                $('.nominee').css('width', val);
            });
            $('#debugHeight').change(function () {
                val = $(this).val();
                $('.nominee').css('height', val);
            });
            $('#debugTitle').change(function () {
                val = $(this).val();
                $('.nomineeName').css('fontSize', val);
            });
            $('#debugSubtitle').change(function () {
                val = $(this).val();
                $('.nomineeSubtitle').css('fontSize', val);
            });
        });
    </script>

    {% if award %}
        <div class="awardHeader">
            <a href="{{ path('voting', {'awardID': prevAward.id}) }}" class="navigation left"></a>
            <div class="awardHeaderContainer">
                <div class="awardName">{{ award.name }}</div>
                <h2 class="awardSubtitle">{{ award.subtitle }}</h2>
            </div>
            <a href="{{ path('voting', {'awardID': nextAward.id}) }}" class="navigation right"></a>
        </div>
        {% if votingOpen %}
            {#<img src="{{ asset('2016images/dontForget.png') }}" id="dontforget" alt="Don't forget to hit submit"/>#}
        {% endif %}
    {% endif %}

    <div class="memeContainer {{ votingStyle }}Style">
        <div class="meme leftMeme">
          {% if ad1 %}
            <a href="{{ path('advertRedirect', {'advertToken': ad1.token}) }}" target="_blank">
              <img src="{{ ad1.image | escape('html_attr') }}">
            </a>
          {% endif %}
        </div>
        <div id="wrapper">
            {% if award %}
                {% if votingStyle == 'legacy' %}
                  <div id="limitsDrag">
                    <div id="nomineeColumn" class="column">

                      <img src="/2016images/pickYourNominees.png" width="204" height="70" alt="Pick your nominees">

                      {% for nominee in award.nominees | shuffle %}

                        {% spaceless %}
                          <div class="voteBox">
                            <div id="nominee-{{ nominee.shortName }}" class="aNominee" data-order="{{ loop.index }}"
                                 data-nominee="{{ nominee.shortName }}">
                              <img class="fakeBorder" src="/2016images/votebox_foreground.png">
                              <img class="fakeBorder locked" src="/2016images/votebox_foreground_locked.png">
                              {% if nominee.flavorText %}
                                <div class="flavorText">{{ nominee.flavorText | nl2br }}</div>
                              {% endif %}
                              <img class="nomineeImage" src="{{ nominee.image }}">
                              <div class="nomineeInfo">
                                <div class="number"></div>
                                <div class="nomineeName">{{ nominee.name }}</div>
                                <div class="nomineeSubtitle">{{ nominee.subtitle | raw }}</div>
                              </div>
                            </div>
                          </div>
                        {% endspaceless %}

                      {% endfor %}

                    </div>

                    <div id="spacerColumn" class="column">
                      &nbsp;
                    </div>

                    {% if votingOpen or votingClosed %}
                      <div id="voteColumn" class="column">
                        <img src="/2016images/dragAndDrop.png" width="307px" height="70px" alt="Drag and drop to vote"/>
                        {% for nominee in award.nominees %}
                          <div id="voteBox{{ loop.index }}" class="voteBox">
                          </div>
                        {% endfor %}
                      </div>
                    {% endif %}

                  </div>
                {% else %}
                  {#<div class="numberPopup {{ voteButtonSizeMap[award.nominees | length] }}" style="display: none;" id="numberPopup">#}
                  {#<div class="numberButtons">#}
                  {#{% for i in 1..award.nominees | length %}#}
                  {#<button id="numberButton{{ i }}" class="numberButton" data-value="{{ i }}">#{{ i }}</button>#}
                  {#{% endfor %}#}
                  {#</div>#}
                  {#</div>#}

                  <div id="dragLimit">
                      {% spaceless %}
                          <div class="flexContainer voteDropArea" id="voteDropAreaTop">
                            {% if votingOpen %}
                              <div class="mobileInstructions">
                                Tap on any nominee to make them your <span class="nextPreference">1st</span> preference.
                              </div>
                            {% endif %}
                              {% for nominee in award.nominees | shuffle %}
                                  <div class="voteGroup" id="nominee-{{ nominee.shortName }}" data-nominee="{{ nominee.shortName }}" data-order="{{ loop.index }}">
                                      {#<button id="voteBox{{ loop.index }}" name="{{ nominee.shortName }}" class="preferenceButton"}">+</button>#}
                                      {#<input type="number" id="voteBox{{ loop.index }}" name="{{ nominee.shortName }}" class="preferenceInput" min="1" max="{{ award.nominees | length }}">#}
                                      {#<label for="voteBox{{ loop.index }}">#}
                                      <div class="voteBox">
                                          <div class="number" style="display: none;">{{ loop.index }}</div>
                                          <div class="nominee" style="background-image: url('{{ nominee.image ?: asset('img/no-image-available.png') }}'); background-size: cover">
                                              <div class="fakeElement"></div>
                                              <div class="handle fakeHandle"></div>
                                              {% if votingOpen %}
                                                <div class="hoverOverlay overlayWhenTop {{ 'href=' in nominee.subtitle ? 'adjustForLink' : '' }}">
                                                  <span>
                                                    Click to make <strong style="color: rgb(251,68,7);">{{ nominee.name }}</strong>
                                                    your&nbsp;<span class="nextPreference">1st</span>&nbsp;preference
                                                  </span>
                                                </div>
                                                <div class="hoverOverlay overlayWhenBottom {{ 'href=' in nominee.subtitle ? 'adjustForLink' : '' }}">
                                                    <span>
                                                      Click to remove <strong style="color: rgb(251,68,7);">{{ nominee.name }}</strong>
                                                      from your votes
                                                    </span>
                                                </div>
                                              {% endif %}
                                              {% if nominee.flavorText %}
                                                  <div class="flavorText">{{ nominee.flavorText | nl2br }}</div>
                                              {% endif %}
                                              <div class="nomineeName">{{ nominee.name }}</div>
                                              <div class="nomineeSubtitle">{{ nominee.subtitle | raw }}</div>
                                              <div class="handle realHandle">
                                                  <span class="glyphicon glyphicon-menu-hamburger"></span>
                                              </div>
                                          </div>
                                      </div>
                                      {#</label>#}
                                  </div><commit_msg>Automatically include target=_blank<commit_after>{% extends 'base/special.html.twig' %}

{% block fullTitle %}/v/GAs - Voting{% endblock %}

{% block css %}
  {{ parent() }}
  <link rel="stylesheet" href="{{ asset('css/voting.css') }}">
  <link rel="stylesheet" href="{{ asset('css/votingNominees.css') }}">
{% endblock %}

{% block js %}
  {{ parent() }}
  <script src="https://cdnjs.cloudflare.com/ajax/libs/Sortable/1.6.0/Sortable.min.js"></script>
  <script src='{{ asset('js/dumbshit.js') }}'></script>
  <script src='{{ asset('js/voting.js') }}'></script>
{% endblock %}

{% block head %}
  {% if award %}
    <script type="text/javascript">
      var votingEnabled = {{ votingOpen ? 'true' : 'false' }};
      var lastVotes = {{ votes | json_encode | raw }};
      var currentAward = "{{ award.id }}";
      var postURL = "{{ path('votingSubmission', {'awardID': award.id}) }}";
      var votingStyle = "{{ votingStyle }}";
    </script>
  {% endif %}

  {% if votingOpen %}
    <style type="text/css">
      .aNominee {
        cursor: move;
      }
      .voteBox {
        cursor: pointer;
      }

      #voteDropAreaBottom:empty:after {
        content: 'You haven\'t yet voted for this award - click on any number of nominees in the order you want them to win';
      }

    </style>
  {% endif %}
{% endblock %}

{% block body %}
  <p class="shit">Created and Directed by<br><span style="font-size:100px"><NAME></span></p>

  <div class="pageHeader">
    {#<a href="{{ path('voting') }}"><img src="{{ asset('2016images/vga_logo.png') }}" class="logo" alt="oh god it's happening again"/></a>#}
    <h1>The 2017 Vidya Gaem Awards</h1>
    <h2>{{ voteText }}</h2>
  </div>

  {#<div class="pageHeader" style="text-align: center; height: 110px;">#}
  {#<label>Width <input type="number" value="350" id="debugWidth"></label>#}
  {#<label>Height <input type="number" value="140" id="debugHeight"></label>#}
  {#<label>Title <input type="number" value="14" id="debugTitle"></label>#}
  {#<label>Subtitle <input type="number" value="12" id="debugSubtitle"></label>#}
  {#</div>#}

    <script type="text/javascript">
        $(document).ready(function () {
            var val;
            $('#debugWidth').change(function () {
                val = $(this).val();
//                $('.nominee').css('width', val);
            });
            $('#debugHeight').change(function () {
                val = $(this).val();
                $('.nominee').css('height', val);
            });
            $('#debugTitle').change(function () {
                val = $(this).val();
                $('.nomineeName').css('fontSize', val);
            });
            $('#debugSubtitle').change(function () {
                val = $(this).val();
                $('.nomineeSubtitle').css('fontSize', val);
            });
        });
    </script>

    {% if award %}
        <div class="awardHeader">
            <a href="{{ path('voting', {'awardID': prevAward.id}) }}" class="navigation left"></a>
            <div class="awardHeaderContainer">
                <div class="awardName">{{ award.name }}</div>
                <h2 class="awardSubtitle">{{ award.subtitle }}</h2>
            </div>
            <a href="{{ path('voting', {'awardID': nextAward.id}) }}" class="navigation right"></a>
        </div>
        {% if votingOpen %}
            {#<img src="{{ asset('2016images/dontForget.png') }}" id="dontforget" alt="Don't forget to hit submit"/>#}
        {% endif %}
    {% endif %}

    <div class="memeContainer {{ votingStyle }}Style">
        <div class="meme leftMeme">
          {% if ad1 %}
            <a href="{{ path('advertRedirect', {'advertToken': ad1.token}) }}" target="_blank">
              <img src="{{ ad1.image | escape('html_attr') }}">
            </a>
          {% endif %}
        </div>
        <div id="wrapper">
            {% if award %}
                {% if votingStyle == 'legacy' %}
                  <div id="limitsDrag">
                    <div id="nomineeColumn" class="column">

                      <img src="/2016images/pickYourNominees.png" width="204" height="70" alt="Pick your nominees">

                      {% for nominee in award.nominees | shuffle %}

                        {% spaceless %}
                          <div class="voteBox">
                            <div id="nominee-{{ nominee.shortName }}" class="aNominee" data-order="{{ loop.index }}"
                                 data-nominee="{{ nominee.shortName }}">
                              <img class="fakeBorder" src="/2016images/votebox_foreground.png">
                              <img class="fakeBorder locked" src="/2016images/votebox_foreground_locked.png">
                              {% if nominee.flavorText %}
                                <div class="flavorText">{{ nominee.flavorText | nl2br }}</div>
                              {% endif %}
                              <img class="nomineeImage" src="{{ nominee.image }}">
                              <div class="nomineeInfo">
                                <div class="number"></div>
                                <div class="nomineeName">{{ nominee.name }}</div>
                                <div class="nomineeSubtitle">{{ nominee.subtitle | raw }}</div>
                              </div>
                            </div>
                          </div>
                        {% endspaceless %}

                      {% endfor %}

                    </div>

                    <div id="spacerColumn" class="column">
                      &nbsp;
                    </div>

                    {% if votingOpen or votingClosed %}
                      <div id="voteColumn" class="column">
                        <img src="/2016images/dragAndDrop.png" width="307px" height="70px" alt="Drag and drop to vote"/>
                        {% for nominee in award.nominees %}
                          <div id="voteBox{{ loop.index }}" class="voteBox">
                          </div>
                        {% endfor %}
                      </div>
                    {% endif %}

                  </div>
                {% else %}
                  {#<div class="numberPopup {{ voteButtonSizeMap[award.nominees | length] }}" style="display: none;" id="numberPopup">#}
                  {#<div class="numberButtons">#}
                  {#{% for i in 1..award.nominees | length %}#}
                  {#<button id="numberButton{{ i }}" class="numberButton" data-value="{{ i }}">#{{ i }}</button>#}
                  {#{% endfor %}#}
                  {#</div>#}
                  {#</div>#}

                  <div id="dragLimit">
                      {% spaceless %}
                          <div class="flexContainer voteDropArea" id="voteDropAreaTop">
                            {% if votingOpen %}
                              <div class="mobileInstructions">
                                Tap on any nominee to make them your <span class="nextPreference">1st</span> preference.
                              </div>
                            {% endif %}
                              {% for nominee in award.nominees | shuffle %}
                                  <div class="voteGroup" id="nominee-{{ nominee.shortName }}" data-nominee="{{ nominee.shortName }}" data-order="{{ loop.index }}">
                                      {#<button id="voteBox{{ loop.index }}" name="{{ nominee.shortName }}" class="preferenceButton"}">+</button>#}
                                      {#<input type="number" id="voteBox{{ loop.index }}" name="{{ nominee.shortName }}" class="preferenceInput" min="1" max="{{ award.nominees | length }}">#}
                                      {#<label for="voteBox{{ loop.index }}">#}
                                      <div class="voteBox">
                                          <div class="number" style="display: none;">{{ loop.index }}</div>
                                          <div class="nominee" style="background-image: url('{{ nominee.image ?: asset('img/no-image-available.png') }}'); background-size: cover">
                                              <div class="fakeElement"></div>
                                              <div class="handle fakeHandle"></div>
                                              {% if votingOpen %}
                                                <div class="hoverOverlay overlayWhenTop {{ 'href=' in nominee.subtitle ? 'adjustForLink' : '' }}">
                                                  <span>
                                                    Click to make <strong style="color: rgb(251,68,7);">{{ nominee.name }}</strong>
                                                    your&nbsp;<span class="nextPreference">1st</span>&nbsp;preference
                                                  </span>
                                                </div>
                                                <div class="hoverOverlay overlayWhenBottom {{ 'href=' in nominee.subtitle ? 'adjustForLink' : '' }}">
                                                    <span>
                                                      Click to remove <strong style="color: rgb(251,68,7);">{{ nominee.name }}</strong>
                                                      from your votes
                                                    </span>
                                                </div>
                                              {% endif %}
                                              {% if nominee.flavorText %}
                                                  <div class="flavorText">{{ nominee.flavorText | nl2br }}</div>
                                              {% endif %}
                                              <div class="nomineeName">{{ nominee.name }}</div>
                                              <div class="nomineeSubtitle">{{ nominee.subtitle | replace({'href=': 'target="_blank" href='}) | raw }}</div>
                                              <div class="handle realHandle">
                                                  <span class="glyphicon glyphicon-menu-hamburger"></span>
                                              </div>
                                          </div>
                                      </div>
                                      {#</label>#}
                                  </div>
{'fraction_non_alphanumeric': 0.16021619534793938, 'fraction_numerical': 0.008107325547727053, 'mean_word_length': 1.2961772853185596, 'pattern_counts': {'":': 0, '<': 293, '<?xml version=': 0, '>': 293, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 136, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2330814', 'n_tokens_mistral': 5604, 'n_tokens_neox': 4996, 'n_words': 1066}