Fixed ability searching and made table header sticky for melding
parent
697ab3296d
commit
472a6f8c95
|
|
@ -77,7 +77,7 @@ function filter() {
|
||||||
}
|
}
|
||||||
} else if (searchType === "abilities") {
|
} else if (searchType === "abilities") {
|
||||||
// Abilities
|
// Abilities
|
||||||
hasLine = false;
|
var hasLine = false;
|
||||||
for (let i = 0; i < 7; i++) {
|
for (let i = 0; i < 7; i++) {
|
||||||
const id = i + 6;
|
const id = i + 6;
|
||||||
const ablName = tds[id].innerText.toLowerCase();
|
const ablName = tds[id].innerText.toLowerCase();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,13 @@
|
||||||
table {
|
table {
|
||||||
|
th {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
|
&.crystal {
|
||||||
|
top: 3.3vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.charlist {
|
.charlist {
|
||||||
display: inline-grid;
|
display: inline-grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>{% block title %}{% endblock %}</title>
|
<title>{% block title %}{% endblock %}</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0" />
|
||||||
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/common/base.css") }}"></link>
|
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/common/base.css") }}"></link>
|
||||||
|
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -3,73 +3,71 @@
|
||||||
{% block title %}BBS - Command Melding{% endblock %}
|
{% block title %}BBS - Command Melding{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/bbs/melding.css") }}"></link>
|
<link rel="stylesheet" href="{{ crate::find_hash("/public/styles/bbs/melding.css") }}">
|
||||||
<script
|
</link>
|
||||||
type="module"
|
<script type="module" src="{{ crate::find_hash("/public/scripts/bbs/melding.js") }}"></script>
|
||||||
src="{{ crate::find_hash("/public/scripts/bbs/melding.js") }}"
|
|
||||||
></script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="filters">
|
<div class="filters">
|
||||||
{% include "components/bbs/search.html" %}
|
{% include "components/bbs/search.html" %}
|
||||||
<div class="row">{% include "components/bbs/type-filters.html" %}</div>
|
<div class="row">{% include "components/bbs/type-filters.html" %}</div>
|
||||||
<div class="row">{% include "components/bbs/char-filters.html" %}</div>
|
<div class="row">{% include "components/bbs/char-filters.html" %}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">Character</th>
|
<th rowspan="2">Character</th>
|
||||||
<th rowspan="2">Command</th>
|
<th rowspan="2">Command</th>
|
||||||
<th rowspan="2">Ingredient A</th>
|
<th rowspan="2">Ingredient A</th>
|
||||||
<th rowspan="2">Ingredient B</th>
|
<th rowspan="2">Ingredient B</th>
|
||||||
<th rowspan="2">Type</th>
|
<th rowspan="2">Type</th>
|
||||||
<th rowspan="2">Chance</th>
|
<th rowspan="2">Chance</th>
|
||||||
<th colspan="7">Abilities</th>
|
<th colspan="7">Abilities</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
{% for crystal in crystals %}
|
{% for crystal in crystals %}
|
||||||
<th>{{ crystal }}</th>
|
<th class="crystal">{{ crystal }}</th>
|
||||||
{% endfor %}
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for cmd in commands %}
|
|
||||||
{% for recipe in cmd.recipes %}
|
|
||||||
<tr class="{{ recipe.get_unlock_chars() }}">
|
|
||||||
<td>
|
|
||||||
<div class="charlist">
|
|
||||||
<!-- RGB moment -->
|
|
||||||
<span class="terra">
|
|
||||||
{% if recipe.can_unlock(Character::Terra) %}T{% endif %}
|
|
||||||
</span>
|
|
||||||
<span class="ventus">
|
|
||||||
{% if recipe.can_unlock(Character::Ventus) %}V{% endif %}
|
|
||||||
</span>
|
|
||||||
<span class="aqua">
|
|
||||||
{% if recipe.can_unlock(Character::Aqua) %}A{% endif %}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="{{ cmd.category }}">{{ cmd.name }}</td>
|
|
||||||
<td>{{ recipe.ingredients.0 }}</td>
|
|
||||||
<td>{{ recipe.ingredients.1 }}</td>
|
|
||||||
<td>{{ recipe.type }}</td>
|
|
||||||
<td>{{ recipe.chance }}%</td>
|
|
||||||
{% for crystal in crystals %}
|
|
||||||
{% let ability = recipe.get_ability(crystal) %}
|
|
||||||
<td>
|
|
||||||
{% if ability.is_some() %}
|
|
||||||
{{ ability.unwrap().name }}
|
|
||||||
{% else %}
|
|
||||||
-
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
{% endfor %}
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tr>
|
||||||
</table>
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for cmd in commands %}
|
||||||
|
{% for recipe in cmd.recipes %}
|
||||||
|
<tr class="{{ recipe.get_unlock_chars() }}">
|
||||||
|
<td>
|
||||||
|
<div class="charlist">
|
||||||
|
<!-- RGB moment -->
|
||||||
|
<span class="terra">
|
||||||
|
{% if recipe.can_unlock(Character::Terra) %}T{% endif %}
|
||||||
|
</span>
|
||||||
|
<span class="ventus">
|
||||||
|
{% if recipe.can_unlock(Character::Ventus) %}V{% endif %}
|
||||||
|
</span>
|
||||||
|
<span class="aqua">
|
||||||
|
{% if recipe.can_unlock(Character::Aqua) %}A{% endif %}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="{{ cmd.category }}">{{ cmd.name }}</td>
|
||||||
|
<td>{{ recipe.ingredients.0 }}</td>
|
||||||
|
<td>{{ recipe.ingredients.1 }}</td>
|
||||||
|
<!-- <td>{{ recipe.type }}</td> -->
|
||||||
|
<td>{{ recipe.chance }}%</td>
|
||||||
|
{% for crystal in crystals %}
|
||||||
|
{% let ability = recipe.get_ability(crystal) %}
|
||||||
|
<td>
|
||||||
|
{% if ability.is_some() %}
|
||||||
|
{{ ability.unwrap().name }}
|
||||||
|
{% else %}
|
||||||
|
-
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
{% endfor %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue