Contact me to be added to this repository. Push the creations you make for D&D, and they will be displayed in a nice website. See the website for how to contribute.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7 KiB

  1. {% macro itemRow(name, heads, secs) -%}
  2. <tr>
  3. <th class="topalign" id="{{name}}">
  4. {{name}}
  5. <table class="props">
  6. {% for (key, value) in heads %}
  7. <tr><th>{{key}}</th><td>{{value}}</td></tr>
  8. {% endfor %}
  9. </table>
  10. </th>
  11. <td class="monospace">
  12. {% for (name, body) in secs.items() %}
  13. {% if name %}<h4>{{ name }}</h4>{% endif %}
  14. <span class="freeform">{{ body }}</span>
  15. {% endfor %}
  16. </td>
  17. </tr>
  18. {%- endmacro %}
  19. {% macro itemTable(rows) -%}
  20. <table>
  21. {% for (name, heads, secs) in rows %}
  22. {{ itemRow(name, heads, secs) }}
  23. {% endfor %}
  24. </table>
  25. {%- endmacro %}
  26. {% macro monsterAction(ma) -%}
  27. <div class="action">
  28. <span class="name">{{ ma.name }}.</span>
  29. {% if ma.has_normal_attack_parts() %}
  30. {% if ma.kind %}<span class="kind">{{ ma.kind }} Attack.</span>{% endif %}
  31. {{ ma.atk_line() }}. {% if ma.damage %}<span class="onhit">Hit:</span> {{ ma.guess_expected_damage() }}.{% endif %}
  32. {% endif %}
  33. {% if ma.special %}{{ ma.special }}{% endif %}
  34. </div>
  35. {%- endmacro %}
  36. {% macro campaign(ca, rules) -%}
  37. <div class="campaign" id="{{ca.name}}">
  38. <h3>{{ca.name}}</h3>
  39. <div class="rulesContainer">
  40. {% for kind in rules.get_kinds() %}
  41. <h4>{{kind}}</h4>
  42. <div class="ruleKindContainer">
  43. <dl class="rules">
  44. {% for rule in ca.rules %}
  45. {% if rule.invalid or rule.kind == kind %}
  46. <dt><a href="/rules#{{rule.name}}">{{rule.name}}</a></dd>
  47. <dd class="freeform monospace">{{rule.content}}</dd>
  48. {% endif %}
  49. {% endfor %}
  50. </dl>
  51. </div>
  52. {% endfor %}
  53. </div>
  54. <span class="freeform monospace">{{ca.content}}</span>
  55. </div>
  56. {%- endmacro %}
  57. {% macro rule(ru) -%}
  58. <div class="rule" id="{{ru.name}}">
  59. <h3>{{ru.name}}</h3>
  60. <span class="freeform monospace">{{ru.content}}</span>
  61. </div>
  62. {%- endmacro %}