Fixed ability searching and made table header sticky for melding

master
Wynd 2026-01-17 00:55:22 +02:00
parent 697ab3296d
commit 472a6f8c95
4 changed files with 74 additions and 67 deletions

View File

@ -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();

View File

@ -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);

View File

@ -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 %}

View File

@ -3,11 +3,9 @@
{% 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 %}
@ -30,7 +28,7 @@
</tr> </tr>
<tr> <tr>
{% for crystal in crystals %} {% for crystal in crystals %}
<th>{{ crystal }}</th> <th class="crystal">{{ crystal }}</th>
{% endfor %} {% endfor %}
</tr> </tr>
</thead> </thead>
@ -55,7 +53,7 @@
<td class="{{ cmd.category }}">{{ cmd.name }}</td> <td class="{{ cmd.category }}">{{ cmd.name }}</td>
<td>{{ recipe.ingredients.0 }}</td> <td>{{ recipe.ingredients.0 }}</td>
<td>{{ recipe.ingredients.1 }}</td> <td>{{ recipe.ingredients.1 }}</td>
<td>{{ recipe.type }}</td> <!-- <td>{{ recipe.type }}</td> -->
<td>{{ recipe.chance }}%</td> <td>{{ recipe.chance }}%</td>
{% for crystal in crystals %} {% for crystal in crystals %}
{% let ability = recipe.get_ability(crystal) %} {% let ability = recipe.get_ability(crystal) %}