Skip to content

Commit

Permalink
Merge pull request #2 from t5r7/main
Browse files Browse the repository at this point in the history
Use Jekyll collection for Players
  • Loading branch information
TheRandomMelon authored Sep 8, 2024
2 parents 169f706 + a1b7825 commit fb8e24d
Show file tree
Hide file tree
Showing 18 changed files with 125 additions and 226 deletions.
17 changes: 17 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,20 @@ plugins:
exclude:
- Gemfile
- Gemfile.lock

collections:
players:
output: true
sort_by: player_name
# it would be nice to use player_id here, but jekyll doesn't support that
# "name" is just the filename, so trm.md -> /players/trm
permalink: /players/:name

defaults:
- scope:
path: ""
type: "players"
values:
layout: "players"
# not sure what keywords is used for but it was in every player, so added here -tom
keywords: "players"
4 changes: 0 additions & 4 deletions players/awed.html → _players/awed.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/awed/
keywords: players
layout: players

player_name: awed
player_id: awed
conf_id: past
Expand Down
4 changes: 0 additions & 4 deletions players/cstro.html → _players/cstro.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/cstro/
keywords: players
layout: players

player_name: cstro
player_id: cstro
conf_id: past
Expand Down
4 changes: 0 additions & 4 deletions players/hydrogen.html → _players/hydrogen.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/hydrogen/
keywords: players
layout: players

player_name: Hydrogen
player_id: hydrogen
conf_id: chance
Expand Down
4 changes: 0 additions & 4 deletions players/inkydink.html → _players/inkydink.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/inkydink/
keywords: players
layout: players

player_name: Inkydink
player_id: inkydink
conf_id: past
Expand Down
4 changes: 0 additions & 4 deletions players/jay.html → _players/jay.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/jay/
keywords: players
layout: players

player_name: Jay
player_id: jay
conf_id: past
Expand Down
4 changes: 0 additions & 4 deletions players/josephine.html → _players/josephine.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/josephine/
keywords: players
layout: players

player_name: Josephine
player_id: josephine
conf_id: chance
Expand Down
6 changes: 1 addition & 5 deletions players/rose.html → _players/rose.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---
permalink: /players/rose/
keywords: players
layout: players

player_name: Rose
player_id: rose
conf_id: chance
conf_id: chest
conference: Chance Conference
nationality: American
activities: Music Listening and Gaming
Expand Down
4 changes: 0 additions & 4 deletions players/samuel.html → _players/samuel.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/samuel/
keywords: players
layout: players

player_name: Samuel
player_id: samuel
conf_id: chance
Expand Down
4 changes: 0 additions & 4 deletions players/scion.html → _players/scion.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/scion/
keywords: players
layout: players

player_name: Scion
player_id: scion
conf_id: chest
Expand Down
4 changes: 0 additions & 4 deletions players/snhk.html → _players/snhk.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/snhk/
keywords: players
layout: players

player_name: SNHK
player_id: snhk
conf_id: past
Expand Down
4 changes: 0 additions & 4 deletions players/tom.html → _players/tom.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/tom/
keywords: players
layout: players

player_name: Tom
player_id: tom
conf_id: chest
Expand Down
4 changes: 0 additions & 4 deletions players/triforce.html → _players/triforce.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/triforce/
keywords: players
layout: players

player_name: Triforce
player_id: triforce
conf_id: chest
Expand Down
4 changes: 0 additions & 4 deletions players/trm.html → _players/trm.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
permalink: /players/trm/
keywords: players
layout: players

player_name: TRM
player_id: trm
conf_id: chance
Expand Down
File renamed without changes.
File renamed without changes.
107 changes: 107 additions & 0 deletions players.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: Players
desc: Meet the players of Leagueopoly - an esports league based on the Monopoly clone Richup.io. Players compete to earn points based on their per-game ranking. Top two in each conference advance!
description: Meet the players of Leagueopoly - an esports league based on the Monopoly clone Richup.io. Players compete to earn points based on their per-game ranking. Top two in each conference advance!
permalink: /players/
keywords: players
layout: default
---

<div class="flex w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">
<div class="flex-auto">
<div class="box-featured p-4 rounded-2xl">
<b class="default-text-shadow text-2xl">Players</b><br>
<p class="text-lg">Meet all the talented players of Leagueopoly, past and present.</p>
</div>
</div>
</div>

<div class="flex mt-8 w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">
<div class="flex-auto">
<div class="box-chance p-4 rounded-2xl">
<b class="default-text-shadow text-xl">Chance Conference</b><br>
<p>Members of the Chance Conference.</p>
</div>
</div>
</div>

<div class="flex mt-4 w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">

{% for player in site.players %}
{% comment %} this if statement means we don't have to make a temp collection using | where {% endcomment %}
{% if player.conf_id == "chance" %}
<div class="w-full">
<a href="/players/{{ player.player_id }}">
<div class="box-{{ player.player_id }} box-player p-4 h-64 rounded-2xl">
<div class="justify-center items-end w-full h-full flex">
<b class="default-text-shadow text-2xl">{{ player.player_name }}</b>
</div>
</div>
</a>
</div>
{% endif %}
{% endfor %}
</div>

<div class="flex mt-8 w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">
<div class="flex-auto">
<div class="box-chest p-4 rounded-2xl">
<b class="default-text-shadow text-xl">Community Chest Conference</b><br>
<p>Members of the Community Chest Conference.</p>
</div>
</div>
</div>

<div class="flex mt-4 w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">
{% for player in site.players %}
{% comment %} this if statement means we don't have to make a temp collection using | where {% endcomment %}
{% if player.conf_id == "chest" %}
<div class="w-full">
<a href="/players/{{ player.player_id }}">
<div class="box-{{ player.player_id }} box-player p-4 h-64 rounded-2xl">
<div class="justify-center items-end w-full h-full flex">
<b class="default-text-shadow text-2xl">{{ player.player_name }}</b>
</div>
</div>
</a>
</div>
{% endif %}
{% endfor %}
</div>

<div class="flex mt-8 w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">
<div class="flex-auto">
<div class="box-past p-4 rounded-2xl">
<b class="default-text-shadow text-xl">Previous Players</b><br>
<p>Players from past seasons of Leagueopoly.</p>
</div>
</div>
</div>

<div class="flex mt-4 w-full sm:w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">
{% assign counted_past = 0 %}
{% for player in site.players %}

{% comment %} this if statement means we don't have to make a temp collection using | where {% endcomment %}
{% if player.conf_id == "past" %}
<div class="w-full">
<a href="/players/{{ player.player_id }}">
<div class="box-{{ player.player_id }} box-player p-4 h-64 rounded-2xl">
<div class="justify-center items-end w-full h-full flex">
<b class="default-text-shadow text-2xl">{{ player.player_name }}</b>
</div>
</div>
</a>
</div>

{% comment %} every Xth player, we start a new row, except for the first player {% endcomment %}
{% assign mod = counted_past | modulo: 5 %}
{% if mod == 0 and forloop.index0 != 0 %}
</div>
<div class="flex mt-4 w-full sm:w-full sm:space-x-4 sm:space-y-0 space-y-4 sm:flex-row flex-col">
{% endif %}

{% assign counted_past = counted_past | plus: 1 %}
{% endif %}
{% endfor %}
</div>
Loading

0 comments on commit fb8e24d

Please sign in to comment.