Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undertale: AP Website Tracker #3493

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Added icons to most of the items and restructured the single player t…
…racker.
  • Loading branch information
Mrks committed Jun 6, 2024
commit e1b3f1f38dc58b219ee8c2dbed7473b2ec9e2ec2
46 changes: 28 additions & 18 deletions WebHostLib/static/styles/tracker__Undertale.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

/** Tracker Grid **/
.grid {
/* .grid {
background-color: black;
display: grid;
grid-template-columns: repeat(1fr, 5);
Expand All @@ -28,31 +28,31 @@
'col1 col1 col1 col1 col1'
'col2 col3 col4 col5 col6'
'col2 col3 col4 col8 col7';
}
} */

.sub-grid {
/* .sub-grid {
display: grid;
grid-template-columns: repeat(1fr, 3);
grid-template-rows: repeat(1fr, 6);
grid-column-gap: 5px;
grid-row-gap: 5px;
grid-template-areas:
'sub-col1 sub-col5 sub-col5'
'sub-col2 sub-col5 sub-col5'
'sub-col1 sub-col4 sub-col4'
'sub-col2 sub-col4 sub-col4'
'sub-col3 sub-col5 sub-col5'
'sub-col3 sub-col5 sub-col5'
'sub-col3 sub-col6 sub-col6'
'sub-col4 sub-col6 sub-col6'
'sub-col4 sub-col7 sub-col7'
'sub-col4 sub-col7 sub-col7';
}
'sub-col3 sub-col6 sub-col6';
} */

[class^='col-'], [class^='sub-col-'] {
/* [class^='col-'], [class^='sub-col-'] {
min-height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
} */

.col-1 { grid-area: col1; }
/* .col-1 { grid-area: col1; }
.col-2 { grid-area: col2; }
.col-3 { grid-area: col3; }
.col-4 { grid-area: col4; }
Expand All @@ -66,13 +66,13 @@
.sub-col-2 { grid-area: sub-col2; }
.sub-col-3 { grid-area: sub-col3; }
.sub-col-4 { grid-area: sub-col4; }
.sub-col-5 { grid-area: sub-col5; }
.sub-col-5 { grid-area: sub-col5; } */

.grid::after {
/* .grid::after {
content: "";
clear: both;
display: table;
}
} */

/** Inventory Grid ****************************************************************************************************/
.inventory-grid {
Expand All @@ -82,11 +82,21 @@
gap: 1rem;
}

.sub-col-1 .inventory-grid {
grid-template-columns: repeat(5, minmax(0, 1fr));
.inventory-grid:nth-child(1) {
grid-template-columns: repeat(6, minmax(0, 1fr));
}

.inventory-grid:nth-child(2) .item div {
color: orange;
border: 3px solid orange;
width: 100px;
padding: 3px;
text-align: center;
vertical-align: middle;
font-weight: 600;
}

.sub-col-4 .inventory-grid, .sub-col-5 .inventory-grid, .sub-col-6 .inventory-grid {
.sub-col-3 .inventory-grid, .sub-col-4 .inventory-grid, .sub-col-5 .inventory-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
}

Expand Down
39 changes: 22 additions & 17 deletions WebHostLib/templates/multitracker__Undertale.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@

{# List all tracker-relevant icons. Format: (Name, Image URL) #}
{% set icons = {
"Ruins Key" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyRuins.png?raw=true",
"Snowdin Key" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeySnowdin.png?raw=true",
"Waterfall Key" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyWaterfall.png?raw=true",
"Hotland Key" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyHotland.png?raw=true",
"Core Key" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyCore.png?raw=true",
"New Home Key" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyNewHome.png?raw=true",
"New Home Key Left" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyNewHomeLeft.png?raw=true",
"New Home Key Right" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyNewHomeRight.png?raw=true",
"Key Piece" : "https://github.com/mrkssr/ap-icons/blob/main/Undertale%20Tracker/Keys/active/KeyPiece.png?raw=true",

"IsCompleted" : "https://static.wikia.nocookie.net/undertale/images/0/0b/Annoying_Dog_sprite.gif"
} %}

Expand All @@ -26,23 +36,11 @@

{# Most have a duplicated 0th entry for when we have none of that item to still load the correct icon/name. #}
{% set progressive_order = {
"Progressive Helm" : ["Steel Helm", "Steel Helm", "Moon Helm", "Apollo Helm"],
"Progressive Armor": ["Steel Armor", "Noble Armor", "Gaia's Armor"],
"Progressive Shield": ["Steel Shield", "Steel Shield", "Venus Shield", "Aegis Shield"],
"Progressive Accessory": ["Charm", "Charm", "Magic Ring", "Cupid Locket"],
"Progressive Sword": ["Steel Sword", "Steel Sword", "Knight Sword", "Excalibur"],
"Progressive Axe": ["Axe", "Axe", "Battle Axe", "Giant's Axe"],
"Progressive Claw": ["Cat Claw", "Cat Claw", "Charm Claw", "Dragon Claw"],
"Progressive Bomb": ["Bomb", "Bomb", "Jumbo Bomb", "Mega Grenade"]

} %}

{% set allItems = {
"Weapons" : weapons,
"Armor" : armors,
"Spells" : spells,
"Key Items" : keyItems,
"Crests" : crests,
"Coins" : coins

} %}

{%- block custom_table_headers %}
Expand Down Expand Up @@ -78,11 +76,18 @@
</td>
{%- else -%}
{% if item == "New Home Key" and inventories[(team, player)]["Key Piece"] > 0 %}
<td class="center-column item-acquired">{{ inventories[(team, player)]["Key Piece"] }}</td>
<td class="center-column item-acquired">
{{ inventories[(team, player)]["Key Piece"] }}
<img class="icon-sprite" style="height: 20px;" src="{{ icons["Key Piece"] }}" alt="{{ item | e }}" title="{{ item | e }}">
</td>
{% elif item == "New Home Key" and inventories[(team, player)]["Left Home Key"] %}
<td class="center-column item-acquired">Left</td>
<td class="center-column item-acquired">
<img class="icon-sprite" style="height: 20px;" src="{{ icons["New Home Key Left"] }}" alt="{{ item | e }}" title="{{ item | e }}">
</td>
{% elif item == "New Home Key" and inventories[(team, player)]["Right Home Key"] %}
<td class="center-column item-acquired">Right</td>
<td class="center-column item-acquired">
<img class="icon-sprite" style="height: 20px;" src="{{ icons["New Home Key Right"] }}" alt="{{ item | e }}" title="{{ item | e }}">
</td>
{% else %}
<td></td>
{% endif %}
Expand Down
Loading