--- layout: master --- {% assign contest_skins = "" | split: "," %} {% assign contest_1st = "" %} {% assign contest_2nd = "" %} {% assign contest_3rd = "" %} {% comment %}top10 is optional, only used in soty{% endcomment %} {% assign contest_top10 = "" | split: "," %} {%comment %} default to regular contest, SOTY overwrites these when needed {% endcomment %} {% assign contest_1st_tag = "contest_X_winner" | replace: "X", page.contest_id %} {% assign contest_2nd_tag = "contest_X_2nd_place" | replace: "X", page.contest_id %} {% assign contest_3rd_tag = "contest_X_3rd_place" | replace: "X", page.contest_id %} {%- if page.contest_id > 2000 -%} {% assign contest_year = "" | append: page.contest_id %} {% comment %} type conversation, cant use contest_id for year check directly {% endcomment %} {% assign top10_tag = "skin_of_the_year_X_top_10" | replace: "X", page.contest_id %} {% for post in site.posts %} {% assign post_year = post.date | date : "%Y" %} {% if post_year == contest_year %} {% assign contest_skins = contest_skins | push: post %} {% endif %} {% if post.tags contains top10_tag %} {% for tag in post.tags %} {% if tag == top10_tag %} {% assign contest_top10 = contest_top10 | push: post %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% assign contest_1st_tag = "skin_of_the_year_X_winner" | replace: "X", page.contest_id %} {% assign contest_2nd_tag = "skin_of_the_year_X_2nd_place" | replace: "X", page.contest_id %} {% assign contest_3rd_tag = "skin_of_the_year_X_3rd_place" | replace: "X", page.contest_id %} {% else %} {% assign contest_tag = "contest_X_submission" | replace: "X", page.contest_id %} {% for post in site.posts %} {% for tag in post.tags %} {% if tag == contest_tag %} {% assign contest_skins = contest_skins | push: post %} {% endif %} {% endfor %} {% endfor %} {% endif %} {% comment %} get podium skins {% endcomment %} {% for post in site.posts %} {% for tag in post.tags %} {% if tag == contest_1st_tag %} {% assign contest_1st = post %} {% endif %} {% if tag == contest_2nd_tag %} {% assign contest_2nd = post %} {% endif %} {% if tag == contest_3rd_tag %} {% assign contest_3rd = post %} {% endif %} {% endfor %} {% endfor %}

{{ page.name }}

{{ content }} {% if page.results_out == true %}
Winner 2nd Place 3rd Place {%- include skin-item.html post=contest_1st -%} {%- include skin-item.html post=contest_2nd -%} {%- include skin-item.html post=contest_3rd -%}
{% if page.contest_id > 2000 %}

Top 10

{% for skin in contest_top10 %} {% include skin-item.html post=skin %} {% endfor %}
{% endif %}

To find out more about this contest please visit its {% if page.contest_id > 2000 %} newspost.

{% else %} wiki page.

{% endif %} {% endif %} {% if page.submissions_active == false %}

All Submission

{% include skin-search.html result_count = contest_skins.size order = "random" %}
{% for skin in contest_skins %} {% include skin-item.html post=skin %} {% endfor %}
{% elsif page.announce_post %}

This contest is currently accepting submissions, for more details please visit the newspost.

{% endif %}