From 472a6f8c95445b0827a38ac2d135bd441a2831ca Mon Sep 17 00:00:00 2001 From: Wynd Date: Sat, 17 Jan 2026 00:55:22 +0200 Subject: [PATCH] Fixed ability searching and made table header sticky for melding --- public/scripts/bbs/melding.js | 2 +- public/styles/bbs/melding.css | 11 ++- templates/layouts/base.html | 2 +- templates/pages/bbs/melding.html | 126 +++++++++++++++---------------- 4 files changed, 74 insertions(+), 67 deletions(-) diff --git a/public/scripts/bbs/melding.js b/public/scripts/bbs/melding.js index 9bef01c..098d2b5 100644 --- a/public/scripts/bbs/melding.js +++ b/public/scripts/bbs/melding.js @@ -77,7 +77,7 @@ function filter() { } } else if (searchType === "abilities") { // Abilities - hasLine = false; + var hasLine = false; for (let i = 0; i < 7; i++) { const id = i + 6; const ablName = tds[id].innerText.toLowerCase(); diff --git a/public/styles/bbs/melding.css b/public/styles/bbs/melding.css index 7cc8e9c..21ad32d 100644 --- a/public/styles/bbs/melding.css +++ b/public/styles/bbs/melding.css @@ -1,4 +1,13 @@ table { + th { + position: sticky; + top: 0; + + &.crystal { + top: 3.3vh; + } + } + .charlist { display: inline-grid; grid-template-columns: repeat(3, 1fr); @@ -32,4 +41,4 @@ table { flex: 0 1 100px; } } -} +} \ No newline at end of file diff --git a/templates/layouts/base.html b/templates/layouts/base.html index 428b3e0..d133685 100644 --- a/templates/layouts/base.html +++ b/templates/layouts/base.html @@ -2,7 +2,7 @@ {% block title %}{% endblock %} - + {% block head %}{% endblock %} diff --git a/templates/pages/bbs/melding.html b/templates/pages/bbs/melding.html index 21c8bf1..54db709 100644 --- a/templates/pages/bbs/melding.html +++ b/templates/pages/bbs/melding.html @@ -3,73 +3,71 @@ {% block title %}BBS - Command Melding{% endblock %} {% block head %} - - + + + {% endblock %} {% block content %} -
- {% include "components/bbs/search.html" %} -
{% include "components/bbs/type-filters.html" %}
-
{% include "components/bbs/char-filters.html" %}
-
+
+ {% include "components/bbs/search.html" %} +
{% include "components/bbs/type-filters.html" %}
+
{% include "components/bbs/char-filters.html" %}
+
- - - - - - - - - - - - - {% for crystal in crystals %} - - {% endfor %} - - - - {% for cmd in commands %} - {% for recipe in cmd.recipes %} - - - - - - - - {% for crystal in crystals %} - {% let ability = recipe.get_ability(crystal) %} - - {% endfor %} - - {% endfor %} +
CharacterCommandIngredient AIngredient BTypeChanceAbilities
{{ crystal }}
-
- - - {% if recipe.can_unlock(Character::Terra) %}T{% endif %} - - - {% if recipe.can_unlock(Character::Ventus) %}V{% endif %} - - - {% if recipe.can_unlock(Character::Aqua) %}A{% endif %} - -
-
{{ cmd.name }}{{ recipe.ingredients.0 }}{{ recipe.ingredients.1 }}{{ recipe.type }}{{ recipe.chance }}% - {% if ability.is_some() %} - {{ ability.unwrap().name }} - {% else %} - - - {% endif %} -
+ + + + + + + + + + + + {% for crystal in crystals %} + {% endfor %} - -
CharacterCommandIngredient AIngredient BTypeChanceAbilities
{{ crystal }}
+ + + + {% for cmd in commands %} + {% for recipe in cmd.recipes %} + + +
+ + + {% if recipe.can_unlock(Character::Terra) %}T{% endif %} + + + {% if recipe.can_unlock(Character::Ventus) %}V{% endif %} + + + {% if recipe.can_unlock(Character::Aqua) %}A{% endif %} + +
+ + {{ cmd.name }} + {{ recipe.ingredients.0 }} + {{ recipe.ingredients.1 }} + + {{ recipe.chance }}% + {% for crystal in crystals %} + {% let ability = recipe.get_ability(crystal) %} + + {% if ability.is_some() %} + {{ ability.unwrap().name }} + {% else %} + - + {% endif %} + + {% endfor %} + + {% endfor %} + {% endfor %} + + {% endblock %}