Yu-Gi-Oh! Deck Building and Card Inventory Management web interface written in Common Lisp, utilizing HTMX.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

79 рядки
4.2KB

  1. {% include "pages.html" :hx-include "[name='search-form']" :hx-target "#search-results" :url "/cards/search" %}
  2. {% if cards %}
  3. <table class="table" style="overflow-x:scroll;display:block">
  4. <thead style="width:100%;max-width:100%">
  5. <tr class="w3-dark-blue">
  6. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Image" :sort "id" :form "search-form" %}
  7. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Passcode" :sort "passcode" :form "search-form" %}
  8. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Attribute" :sort "attribute" :form "search-form" %}
  9. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Name" :sort "name" :form "search-form" %}
  10. <!-- <th style="width:auto;min-width:256px;">Name</th> -->
  11. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Archetype" :sort "archetype" :form "search-form" %}
  12. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Race" :sort "race" :form "search-form" %}
  13. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Type" :sort "type" :form "search-form" %}
  14. <!-- <th style="width:auto;min-width:486px;">Card Text</th> -->
  15. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Card Text" :sort "card-text" :form "search-form" %}
  16. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "ATK" :sort "atk" :form "search-form" %}
  17. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "DEF" :sort "def" :form "search-form" %}
  18. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Level" :sort "level" :form "search-form" %}
  19. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Scale" :sort "scale" :form "search-form" %}
  20. {% include "cards/_search_result_th.html" :url "/cards/search" :hx-target "#search-results" :name "Frame" :sort "frame-type" :form "search-form" %}
  21. </tr>
  22. </thead>
  23. <tbody>
  24. {% for card in cards %}
  25. <tr class="{{ card.frame-type }}">
  26. <td>
  27. <!-- Image -->
  28. <a target="_blank" href="/cards/{{ card.id }}/view">
  29. <img class="w3-image" style="width:100px;max-width:100px;"
  30. src="/public/ygoprodeck/{{ card.passcode }}.jpg"
  31. alt="Card Image for Yu-Gi-Oh! #{{card.passcode}} - {{card.name}}">
  32. </a>
  33. </td>
  34. <td>{{ card.passcode }}</td>
  35. <td class="w3-center">{% if card.attribute %}
  36. <img
  37. class="w3-image w3-center"
  38. style="width:25px;max-width:25px;"
  39. src="/img/attribute/{{ card.attribute }}.svg" alt="{{ card.attribute }}">
  40. {% elif card.frame-type == "spell" %}
  41. <img
  42. class="w3-image w3-center"
  43. style="width:25px;max-width:25px;"
  44. src="/img/attribute/SPELL.svg" alt="Spell Card">
  45. {% elif card.frame-type == "trap" %}
  46. <img
  47. class="w3-image w3-center"
  48. style="width:25px;max-width:25px;"
  49. src="/img/attribute/TRAP.svg" alt="Spell Card">
  50. {% endif %}
  51. </td>
  52. <td style="width:auto;min-width:256px;">{{ card.name }}</td>
  53. <td>{{ card.archetype }}</td>
  54. <td>{{ card.race }}</td>
  55. <td>{{ card.type }}</td>
  56. <td style="width:auto;min-width:486px;white-space:pre-wrap;word-wrap:break-word">{{ card.desc }}</td>
  57. <td>{{ card.atk }}</td>
  58. <td>{{ card.def }}</td>
  59. <td>{{ card.level }}</td>
  60. <td>{{ card.scale }}</td>
  61. <td>{{ card.frame-type }}</td>
  62. </tr>
  63. {% endfor %}
  64. </tbody>
  65. </table>
  66. <div class="w3-container content">
  67. <p>{{ length }} result{% if length > 2 %}s{% endif %} found.</p>
  68. {% include "pages.html" :url "cards/search" :hx-target "#search-results" :hx-include "[name='search-form']" %}
  69. </div>
  70. {% else %}
  71. <div class="w3-container content">
  72. <p>Nothing to see here!</p>
  73. </div>
  74. {% endif %}