mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-07 13:15:53 +02:00
Tweaked the style sheets for fancy decorations in epub.
This commit is contained in:
@@ -12,6 +12,7 @@ from dungeonsheets import (
|
||||
armor,
|
||||
background,
|
||||
classes,
|
||||
exceptions,
|
||||
features,
|
||||
infusions,
|
||||
magic_items,
|
||||
@@ -270,7 +271,7 @@ class Character(Entity):
|
||||
self._race = find_content(newrace, valid_classes=[race.Race])(
|
||||
owner=self
|
||||
)
|
||||
except AttributeError:
|
||||
except exceptions.ContentNotFound:
|
||||
msg = f'Race "{newrace}" not defined. Please add it to ``race.py``'
|
||||
self._race = race.Race(owner=self)
|
||||
warnings.warn(msg)
|
||||
@@ -293,7 +294,7 @@ class Character(Entity):
|
||||
self._background = find_content(
|
||||
bg, valid_classes=[background.Background]
|
||||
)(owner=self)
|
||||
except AttributeError:
|
||||
except exceptions.ContentNotFound:
|
||||
msg = (
|
||||
f'Background "{bg}" not defined. Please add it to ``background.py``'
|
||||
)
|
||||
@@ -693,9 +694,9 @@ class Character(Entity):
|
||||
@proficiencies_text.setter
|
||||
def proficiencies_text(self, val):
|
||||
try:
|
||||
profs = profiencies_text.split(",")
|
||||
profs = val.split(",")
|
||||
except AttributeError:
|
||||
profs = proficiencies_text
|
||||
profs = val
|
||||
self._proficiencies_text = profs
|
||||
|
||||
@property
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
[% for shape in character.all_wild_shapes|sort(attribute='challenge_rating') %]
|
||||
|
||||
<div class="[% if not character.can_assume_shape(shape) %]known-beast-disabled[% endif %]">
|
||||
<div class="stat-block[% if not character.can_assume_shape(shape) %] known-beast-disabled[% endif %]">
|
||||
|
||||
<h2 id="known-beasts-[[ shape.name | to_heading_id ]]">[[ shape.name ]]</h2>
|
||||
[% if shape.description %]
|
||||
<p>[[ shape.description ]]</p>
|
||||
<p class="creature-description">[[ shape.description ]]</p>
|
||||
[% endif %]
|
||||
|
||||
<table>
|
||||
|
||||
@@ -5,18 +5,33 @@ h1, h2, h3, h4, h5, h6 {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
body {
|
||||
background: #ECDDB4;
|
||||
background: #f4ecdb;
|
||||
}
|
||||
table {
|
||||
background: #ECEEE3;
|
||||
/* background: #ECEEE3; */
|
||||
border-spacing: 0px;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background: #CDD290;
|
||||
background: #E0E5C1;
|
||||
}
|
||||
th {
|
||||
font-family: sans-serif
|
||||
.stat-block {
|
||||
background: #FDF1DC;
|
||||
border-color: #E69A28;
|
||||
border-width: 8px 0px;
|
||||
border-style: solid;
|
||||
margin: 16px 0px;
|
||||
padding: 8px;
|
||||
}
|
||||
.stat-block .details {
|
||||
color: #58180d;
|
||||
}
|
||||
.stat-block h2 {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.stat-block .creature-description {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
|
||||
[% else %]
|
||||
/* Without Fancy decorations */
|
||||
@@ -62,11 +77,18 @@ dl.monster-spell-list a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
.creature-description {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Spell descriptions */
|
||||
.spell-school {
|
||||
margin-top: 0px;
|
||||
font-style: italic;
|
||||
}
|
||||
.spell-block h2 {
|
||||
margin-block: 0px;
|
||||
}
|
||||
|
||||
/* Dictionary lists for showing stats, etc */
|
||||
dl.details dt {
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<h1 id="gm-monsters">Monsters</h1>
|
||||
|
||||
[% for monster in monsters|sort(attribute='name') %]
|
||||
<div class="stat-block">
|
||||
<h2 id="gm-monsters-[[ monster.name|to_heading_id ]]">[[ monster.name ]]</h2>
|
||||
|
||||
[% if monster.description %]
|
||||
<h3>[[ monster.description ]]</h3>
|
||||
<p class="creature-description">[[ monster.description ]]</p>
|
||||
[% endif %]
|
||||
|
||||
<!-- Basic properties -->
|
||||
<table>
|
||||
<table class="details">
|
||||
<tr>
|
||||
<th>Armor Class</th>
|
||||
<th>Hit Points</th>
|
||||
@@ -25,7 +26,7 @@
|
||||
</table>
|
||||
|
||||
<!-- Attributes -->
|
||||
<table>
|
||||
<table class="details">
|
||||
<tr>
|
||||
<th>STR</th>
|
||||
<th>DEX</th>
|
||||
@@ -78,8 +79,7 @@
|
||||
|
||||
[[ monster.__doc__ | rst_to_html(top_heading_level=2) ]]
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
[% endfor %]
|
||||
|
||||
<h1 id="monster-spells">Monster Spells</h1>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[% macro spellblock(spell, id_base="spells", heading_level=2) -%]
|
||||
|
||||
<div class="spell-block">
|
||||
<h[[ heading_level ]] id="[[ id_base ]]-[[ spell.name | to_heading_id ]]">[[ spell.name ]]</h[[ heading_level ]]>
|
||||
|
||||
<p class="spell-school">
|
||||
<!-- Spell school and level -->
|
||||
[% if spell.level > 0 %]
|
||||
@@ -34,5 +34,5 @@
|
||||
<div class="spell-description">
|
||||
[[ spell.__doc__ | rst_to_html(top_heading_level=1) ]]
|
||||
</div>
|
||||
|
||||
</div>
|
||||
[%- endmacro %]
|
||||
|
||||
Reference in New Issue
Block a user