adding sand strider, fixing statblock css

This commit is contained in:
evilchili
2023-12-15 20:20:24 -08:00
parent 7f07990f58
commit 1bd9dee29d
8 changed files with 146 additions and 142 deletions
@@ -706,13 +706,19 @@ a.disabled:hover {
text-transform: capitalize;
text-align: left;
margin: 0;
margin-bottom: 1em;
}
.statblock table {
margin: 0;
margin: 2em 0;
}
.statblock table.stats {
border: 1px solid #000;
}
.statblock table tr, .statblock table tr td {
text-align: center;
background: inherit;
}
.statblock table tr th,
@@ -720,17 +726,22 @@ a.disabled:hover {
vertical-align: top;
padding-right: 2em;
}
.statblock table tr td:first-of-type {
font-weight: bold;
white-space: nowrap;
}
.statblock table tr td:first-of-type:last-of-type {
font-weight: normal;
white-space: wrap;
.statblock table.properties td {
text-align: left
}
.statblock table tr:last-child,
.statblock table tr:last-child {
.statblock table.properties tr td:first-of-type {
font-weight: bold;
width: 10%;
white-space: nowrap;
}
.statblock table.properties tr td:first-of-type:last-of-type {
font-weight: normal;
}
.statblock table.properties tr:last-child,
.statblock table.properties tr:last-child {
padding-right: 1em;
}
.statblock table tr:nth-child(even) {
@@ -740,8 +751,6 @@ a.disabled:hover {
background: rgba(255,255,255, 0.3);
}
.statblock dl {
display: flex;
flex-flow: row;
@@ -22,117 +22,7 @@
{% set target = article.title.replace(' ', '_') %}
{% if self.is_dm() or article.show_dm_content %}
<div class='statblock monster'>
<h3>{{ article.title }}</h3>
<div class='monster-type'>
<em>
{{m.size}} {{m.type}}{% if m.alignment %}, {{m.alignment}}{%endif%}
</em>
</div>
<hr>
<div class='stat'>
Armor Class <span class='value'>{{ m.AC }}</span>
</div>
<div class='stat'>
Hit Points <span class='value'>{{ m.HP }}</span>
</div>
<div class='stat'>
Speed <span class='value'>{{ m.speed }}</span>
</div>
<hr>
<table>
<tr>
<th>STR</th><th>DEX</th><th>CON</th><th>INT</th><th>WIS</th><th>CHA</th>
</tr>
<tr>
<td>{{ m.STR }}</td>
<td>{{ m.DEX }}</td>
<td>{{ m.CON }}</td>
<td>{{ m.INT }}</td>
<td>{{ m.WIS }}</td>
<td>{{ m.CHA }}</td>
</tr>
</table>
<hr>
{% if m.saving_throws %}
<div class='stat'>
Saving Throws <span class='value'>{{ m.saving_throws }}</span>
</div>
{% endif %}
{% if m.skills %}
<div class='stat'>
Skills <span class='value'>{{ m.skills }}</span>
</div>
{% endif %}
{% if m.resistances %}
<div class='stat'>
Damage Resistances <span class='value'>{{ m.resistances }}</span>
</div>
{% endif %}
{% if m.vulnerabilities %}
<div class='stat'>
Damage Vulnerabilities <span class='value'>{{ m.vulnerabilities }}</span>
</div>
{% endif %}
{% if m.damage_immunities %}
<div class='stat'>
Damage Immunities <span class='value'>{{ m.damage_immunities }}</span>
</div>
{% endif %}
{% if m.condition_immunities %}
<div class='stat'>
Condition Immunities <span class='value'>{{ m.condition_immunities }}</span>
</div>
{% endif %}
{% if m.saving_throws %}
<div class='stat'>
Senses <span class='value'>{{ m.senses }}</span>
</div>
{% endif %}
{% if m.languages %}
<div class='stat'>
Languages <span class='value'>{{ m.languages }}</span>
</div>
{% endif %}
{% if m.cr %}
<div class='stat'>
Challenge <span class='value'>{{ m.cr }}</span>
</div>
{% endif %}
<hr>
{% for (attr_name, attr_desc) in m.attributes.items() %}
<div class='stat'>{{ attr_name }}. <span class='value'>{{attr_desc}}</span></div>
{% endfor %}
{% for section in ('Actions', 'Reactions', 'Legendary Actions', 'Legendary Reactions', 'Lair and Actions') %}
{% if section in m.traits %}
{% set trait = m.traits[section] %}
{% if 'attributes' in trait or 'options' in trait %}
<h4>{{ section }}</h4>
{% if trait.attributes %}
{% for (attr_name, attr_desc) in trait.attributes.items() %}
<div class='stat'>{{ attr_name }}. <span class='value'>{{attr_desc}}</span></div>
{% endfor %}
{% endif %}
{% if trait.options %}
{% for (attr_name, attr_desc) in trait.options.items() %}
<div class='stat'>{{ attr_name }}. <span class='value'>{{attr_desc}}</span></div>
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% include "statblock.html" %}
</div>
{% endif %}
@@ -0,0 +1,63 @@
{% set stats = ['STR', 'DEX', 'CON', 'INT', 'WIS', 'CHA'] %}
<h3>{{ article.title }}</h3>
<div class='monster-type'>
<em>
{{m.size}} {{m.type}}{% if m.alignment %}, {{m.alignment}}{%endif%}
</em>
</div>
<hr>
<table class='stats'>
<tr>
{% for stat in stats %}
<th>{{ stat }} </th>
{% endfor %}
</tr>
<tr>
{% for stat in ['STR', 'DEX', 'CON', 'INT', 'WIS', 'CHA'] %}
{% set score, bonus = m[stat].split(',') %}
<td><b>{{score}}</b><br>{{bonus}}</td>
{% endfor %}
</tr>
</table>
<table class='properties'>
<tr><td>Armor Class</td><td>{{ m.AC }}</td></tr>
<tr><td>Hit Points</td><td>{{ m.HP }}</td></tr>
<tr><td>Speed</td><td>{{ m.speed }}</td></tr>
{% if m.skills %}<tr><td>Skills</td><td>{{ m.skills }}</td></tr>{% endif %}
{% if m.saving_throws %}<tr><td>Saving Throws</td><td>{{ m.saving_throws }}</td></tr>{% endif %}
{% if m.resistances %}<tr><td>Resistances</td><td>{{ m.resistances }}</td></tr>{% endif %}
{% if m.vulnerabilities %}<tr><td>Vulnerabilities</td><td>{{ m.vulnerabilities }}</td></tr>{% endif %}
{% if m.damage_immunities %}<tr><td>Damage Immunities</td><td>{{ m.damage_immunities }}</td></tr>{% endif %}
{% if m.condition_immunities %}<tr><td>Condition Immunities</td><td>{{ m.condition_immunities }}</td></tr>{% endif %}
{% if m.senses %}<tr><td>Senses</td><td>{{ m.senses }}</td></tr>{% endif %}
{% if m.languages %}<tr><td>Languages</td><td>{{ m.languages }}</td></tr>{% endif %}
{% if m.cr %}<tr><td>Challenge Rating</td><td>{{ m.cr }}</td></tr>{% endif %}
</table>
<hr>
{% for (attr_name, attr_desc) in m.attributes.items() %}
<div class='stat'>{{ attr_name }}. <span class='value'>{{attr_desc}}</span></div>
{% endfor %}
{% for section in ('Actions', 'Reactions', 'Legendary Actions', 'Legendary Reactions', 'Lair and Actions') %}
{% if section in m.traits %}
{% set trait = m.traits[section] %}
{% if 'attributes' in trait or 'options' in trait %}
<h4>{{ section }}</h4>
{% if trait.attributes %}
{% for (attr_name, attr_desc) in trait.attributes.items() %}
<div class='stat'>{{ attr_name }}. <span class='value'>{{attr_desc}}</span></div>
{% endfor %}
{% endif %}
{% if trait.options %}
{% for (attr_name, attr_desc) in trait.options.items() %}
<div class='stat'>{{ attr_name }}. <span class='value'>{{attr_desc}}</span></div>
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}