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

{% macro itemRow(name, heads, secs) -%}
<tr>
<th class="topalign" id="{{name}}">
{{name}}
<table class="props">
{% for (key, value) in heads %}
<tr><th>{{key}}</th><td>{{value}}</td></tr>
{% endfor %}
</table>
</th>
<td class="monospace">
{% for (name, body) in secs.items() %}
{% if name %}<h4>{{ name }}</h4>{% endif %}
<span class="freeform">{{ body }}</span>
{% endfor %}
</td>
</tr>
{%- endmacro %}
{% macro itemTable(rows) -%}
<table>
{% for (name, heads, secs) in rows %}
{{ itemRow(name, heads, secs) }}
{% endfor %}
</table>
{%- endmacro %}
{% macro monsterAction(ma) -%}
<div class="action">
<span class="name">{{ ma.name }}.</span>
{% if ma.has_normal_attack_parts() %}
{% if ma.kind %}<span class="kind">{{ ma.kind }} Attack.</span>{% endif %}
{{ ma.atk_line() }}. {% if ma.damage %}<span class="onhit">Hit:</span> {{ ma.guess_expected_damage() }}.{% endif %}
{% endif %}
{% if ma.special %}{{ ma.special }}{% endif %}
</div>
{%- endmacro %}
{% macro campaign(ca, rules) -%}
<div class="campaign" id="{{ca.name}}">
<h3>{{ca.name}}</h3>
<div class="rulesContainer">
{% for kind in rules.get_kinds() %}
<h4>{{kind}}</h4>
<div class="ruleKindContainer">
<dl class="rules">
{% for rule in ca.rules %}
{% if rule.invalid or rule.kind == kind %}
<dt><a href="/rules#{{rule.name}}">{{rule.name}}</a></dd>
<dd class="freeform monospace">{{rule.content}}</dd>
{% endif %}
{% endfor %}
</dl>
</div>
{% endfor %}
</div>
<span class="freeform monospace">{{ca.content}}</span>
</div>
{%- endmacro %}
{% macro rule(ru) -%}
<div class="rule" id="{{ru.name}}">
<h3>{{ru.name}}</h3>
<span class="freeform monospace">{{ru.content}}</span>
</div>
{%- endmacro %}