Redesign generated characteristics and skills layout
This commit is contained in:
parent
e05d6d731c
commit
d5182fb521
10
README.md
10
README.md
|
|
@ -92,3 +92,13 @@ sauvegarde de Roll20. Dans le Custom Sheet Sandbox, charger chaque variante,
|
|||
ajouter une ligne répétable, lancer les jets, sauvegarder et rouvrir deux
|
||||
personnages. La [documentation officielle Roll20](https://help.roll20.net/hc/en-us/categories/360003756473-Sheet-Development)
|
||||
décrit l'éditeur et les limitations des feuilles personnalisées.
|
||||
|
||||
### Présentation des caractéristiques et compétences
|
||||
|
||||
La mise en page générée utilise un en-tête de personnage, des cartes de
|
||||
caractéristiques sur deux colonnes et des lignes de compétences alignées
|
||||
(nom, caractéristique, niveau, coût et jet). Les sous-compétences sont en retrait.
|
||||
Le style commun se trouve dans `templates/sheet.css`; les couleurs restent dans
|
||||
`data/themes.yaml`. Les noms d'attributs et les formules de jet n'ont pas changé
|
||||
avec cette refonte visuelle. Les fichiers dans `build/` doivent être régénérés
|
||||
avant de remplacer le HTML et le CSS dans Roll20.
|
||||
|
|
|
|||
1
TASKS.md
1
TASKS.md
|
|
@ -6,6 +6,7 @@
|
|||
- [x] Add parchment and night themes without altering rolls or stored fields.
|
||||
- [x] Test validation, generated fields, references, and both variant builds.
|
||||
- [x] Document build, use, variant differences, migration limits, and Roll20 sandbox checks.
|
||||
- [x] Replace stacked characteristic and skill controls with compact themed grids; verify both variants and themes.
|
||||
|
||||
## Live Roll20 checks after local verification
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
themes:
|
||||
parchment:
|
||||
background: '#f5eedc'
|
||||
background: '#f3ebda'
|
||||
panel: '#fffaf0'
|
||||
ink: '#30291f'
|
||||
accent: '#78522e'
|
||||
border: '#c2a778'
|
||||
ink: '#30251f'
|
||||
accent: '#7a2830'
|
||||
border: '#c9ad76'
|
||||
night:
|
||||
background: '#17212b'
|
||||
panel: '#233342'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
.sheet-d10 {
|
||||
box-sizing: border-box;
|
||||
max-width: 1080px;
|
||||
min-width: 0;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
color: var(--d10-ink);
|
||||
background: var(--d10-background);
|
||||
font: 13px/1.4 Georgia, serif;
|
||||
border: 1px solid var(--d10-border);
|
||||
}
|
||||
.sheet-d10 *, .sheet-d10 *::before, .sheet-d10 *::after { box-sizing: border-box; }
|
||||
.sheet-d10 .sheet-hero { display: grid; grid-template-columns: 60px minmax(0,1fr) 112px; gap: 16px; align-items: center; padding: 16px; background: var(--d10-panel); border: 1px solid var(--d10-border); border-left: 5px solid var(--d10-accent); }
|
||||
.sheet-d10 .sheet-hero-mark { display: grid; place-items: center; width: 54px; height: 54px; color: var(--d10-panel); background: var(--d10-accent); font: bold 18px Georgia,serif; letter-spacing: -.08em; }
|
||||
.sheet-d10 .sheet-eyebrow { display: block; color: var(--d10-accent); font: bold 10px Arial,sans-serif; letter-spacing: .14em; text-transform: uppercase; }
|
||||
.sheet-d10 h1 { margin: 2px 0 11px; color: var(--d10-ink); font: bold 26px Georgia,serif; }
|
||||
.sheet-d10 .sheet-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
||||
.sheet-d10 .sheet-identity label, .sheet-d10 .sheet-die-choice { display: grid; gap: 3px; margin: 0 !important; color: var(--d10-accent); font: bold 10px Arial,sans-serif; letter-spacing: .07em; text-transform: uppercase; }
|
||||
.sheet-d10 .sheet-die-choice { align-self: end; }
|
||||
.sheet-d10 input, .sheet-d10 select { box-sizing: border-box; width: 100%; min-width: 0; height: 30px; margin: 0 !important; padding: 3px 6px; color: var(--d10-ink); background: var(--d10-panel); border: 1px solid var(--d10-border); border-radius: 2px; box-shadow: none; font: 13px Arial,sans-serif; }
|
||||
.sheet-d10 input:focus, .sheet-d10 select:focus { outline: 2px solid var(--d10-accent); outline-offset: 1px; }
|
||||
.sheet-d10 input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--d10-accent); }
|
||||
.sheet-d10 input[type=number] { text-align: center; }
|
||||
.sheet-d10 .sheet-panel { margin: 14px 0 0; padding: 13px 15px 16px; background: var(--d10-panel); border: 1px solid var(--d10-border); }
|
||||
.sheet-d10 .sheet-section-title { display: flex; gap: 9px; align-items: baseline; padding-bottom: 6px; margin-bottom: 11px; border-bottom: 1px solid var(--d10-border); }
|
||||
.sheet-d10 .sheet-section-title span { color: var(--d10-accent); font: bold 11px Arial,sans-serif; }
|
||||
.sheet-d10 .sheet-section-title h2 { margin: 0; color: var(--d10-accent); font: bold 19px Georgia,serif; }
|
||||
.sheet-d10 .sheet-subheading { margin: 14px 0 6px; color: var(--d10-accent); font: bold 14px Georgia,serif; }
|
||||
.sheet-d10 .sheet-stat { display: grid; grid-template-columns: minmax(0,1fr) 66px 66px 42px; gap: 7px; align-items: center; }
|
||||
.sheet-d10 .sheet-stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 10px; }
|
||||
.sheet-d10 .sheet-stat { min-height: 43px; padding: 6px 9px; border: 1px solid var(--d10-border); border-left: 3px solid var(--d10-accent); background: var(--d10-background); }
|
||||
.sheet-d10 .sheet-stat strong { overflow: hidden; color: var(--d10-ink); font: bold 12px Georgia,serif; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.sheet-d10 .sheet-stat label { display: grid; gap: 2px; margin: 0 !important; color: var(--d10-accent); font: bold 9px Arial,sans-serif; text-align: center; text-transform: uppercase; }
|
||||
.sheet-d10 .sheet-resource-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
|
||||
.sheet-d10 .sheet-resource { display: grid; grid-template-columns: minmax(110px,1fr) 75px 12px 75px; gap: 6px; align-items: end; padding: 9px 11px; background: var(--d10-background); border-left: 3px solid var(--d10-accent); }
|
||||
.sheet-d10 .sheet-resource strong { align-self: center; font-size: 12px; }
|
||||
.sheet-d10 .sheet-resource label { display: grid; gap: 3px; margin: 0 !important; color: var(--d10-accent); font: bold 9px Arial,sans-serif; text-transform: uppercase; }
|
||||
.sheet-d10 .sheet-resource > span { align-self: end; text-align: center; font-size: 18px; }
|
||||
.sheet-d10 .sheet-location-head, .sheet-d10 .sheet-location { display: grid; grid-template-columns: minmax(120px,1fr) repeat(3,95px); gap: 8px; align-items: center; padding: 5px 9px; }
|
||||
.sheet-d10 .sheet-location-head { color: var(--d10-accent); font: bold 9px Arial,sans-serif; text-transform: uppercase; text-align: center; }
|
||||
.sheet-d10 .sheet-location-head span:first-child { text-align: left; }
|
||||
.sheet-d10 .sheet-location:nth-child(odd) { background: var(--d10-background); }
|
||||
.sheet-d10 .sheet-combat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
|
||||
.sheet-d10 .sheet-combat-field { display: grid; gap: 4px; margin: 0 !important; padding: 8px; color: var(--d10-accent); background: var(--d10-background); font: bold 10px Arial,sans-serif; text-transform: uppercase; }
|
||||
.sheet-d10 .sheet-combat-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px; background: var(--d10-background); }
|
||||
.sheet-d10 .sheet-combat-actions span { margin-right: auto; color: var(--d10-accent); font-weight: bold; }
|
||||
.sheet-d10 .sheet-weapon-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
|
||||
.sheet-d10 .sheet-weapon { display: grid; grid-template-columns: minmax(0,1fr) 65px 18px; gap: 5px; align-items: center; padding: 8px; background: var(--d10-background); border: 1px solid var(--d10-border); }
|
||||
.sheet-d10 .sheet-weapon span { grid-column: 1/-1; color: var(--d10-accent); font: bold 10px Arial,sans-serif; text-transform: uppercase; }
|
||||
.sheet-d10 .sheet-skill-group { margin: 9px 0 16px; border: 1px solid var(--d10-border); }
|
||||
.sheet-d10 .sheet-skill-group h4 { margin: 0; padding: 7px 10px; color: var(--d10-panel); background: var(--d10-accent); font: bold 13px Georgia,serif; }
|
||||
.sheet-d10 .sheet-skill-head, .sheet-d10 .sheet-skill-row { display: grid; grid-template-columns: minmax(170px,1fr) 110px 60px 60px 42px; gap: 8px; align-items: center; padding: 5px 10px; }
|
||||
.sheet-d10 .sheet-skill-head { color: var(--d10-accent); font: bold 9px Arial,sans-serif; letter-spacing: .05em; text-transform: uppercase; text-align: center; border-bottom: 1px solid var(--d10-border); }
|
||||
.sheet-d10 .sheet-skill-head span:first-child { text-align: left; }
|
||||
.sheet-d10 .sheet-skill-row { min-height: 38px; }
|
||||
.sheet-d10 .sheet-skill-row:nth-child(even) { background: var(--d10-background); }
|
||||
.sheet-d10 .sheet-skill-name { overflow: hidden; font-weight: bold; text-overflow: ellipsis; }
|
||||
.sheet-d10 .sheet-subskill .sheet-skill-name { padding-left: 16px; font-weight: normal; }
|
||||
.sheet-d10 .sheet-subskill .sheet-skill-name::before { content: '↳ '; color: var(--d10-accent); }
|
||||
.sheet-d10 button[type=roll].sheet-roll { display: inline-grid; place-items: center; width: 34px; min-width: 34px; height: 30px; margin: 0 !important; padding: 0 !important; color: var(--d10-panel); background: var(--d10-accent); border: 1px solid var(--d10-accent); border-radius: 2px; box-shadow: none; font: bold 10px Arial,sans-serif; line-height: 1; text-shadow: none; }
|
||||
.sheet-d10 button[type=roll].sheet-roll::before { content: none !important; display: none !important; }
|
||||
.sheet-d10 button[type=roll].sheet-roll:hover, .sheet-d10 button[type=roll].sheet-roll:focus { filter: brightness(1.15); outline: 2px solid var(--d10-border); }
|
||||
.sheet-d10 details { margin: 8px 0; border: 1px solid var(--d10-border); }
|
||||
.sheet-d10 summary { padding: 7px 10px; color: var(--d10-accent); background: var(--d10-background); font-weight: bold; cursor: pointer; }
|
||||
.sheet-d10 fieldset { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px; border: 0; }
|
||||
.sheet-d10 fieldset label { display: grid; gap: 3px; margin: 0 !important; color: var(--d10-accent); font: bold 9px Arial,sans-serif; text-transform: uppercase; }
|
||||
.sheet-rolltemplate-d10skillcheck { padding: 7px 9px; color: var(--d10-ink); background: var(--d10-panel); border: 1px solid var(--d10-border); border-left: 4px solid var(--d10-accent); font: 12px Georgia,serif; }
|
||||
@media (max-width: 760px) {
|
||||
.sheet-d10 { padding: 9px; }
|
||||
.sheet-d10 .sheet-stat-grid, .sheet-d10 .sheet-resource-grid, .sheet-d10 .sheet-weapon-grid { grid-template-columns: 1fr; }
|
||||
.sheet-d10 .sheet-hero { grid-template-columns: 45px minmax(0,1fr); gap: 9px; }
|
||||
.sheet-d10 .sheet-hero-mark { width: 42px; height: 42px; font-size: 14px; }
|
||||
.sheet-d10 .sheet-die-choice { grid-column: 2; }
|
||||
.sheet-d10 .sheet-skill-head, .sheet-d10 .sheet-skill-row { grid-template-columns: minmax(110px,1fr) 72px 48px 48px 36px; gap: 4px; padding: 4px; }
|
||||
.sheet-d10 .sheet-location-head, .sheet-d10 .sheet-location { grid-template-columns: minmax(75px,1fr) repeat(3,60px); gap: 4px; }
|
||||
}
|
||||
|
|
@ -21,6 +21,11 @@ class BuildTests(unittest.TestCase):
|
|||
self.assertGreater(info['skills'], 10)
|
||||
self.assertIn('repeating_', files['sheet.html'])
|
||||
self.assertIn('sheet-rolltemplate-d10skillcheck', files['sheet.html'])
|
||||
self.assertIn('class="sheet-stat-grid"', files['sheet.html'])
|
||||
self.assertIn('class="sheet-skill-head"', files['sheet.html'])
|
||||
self.assertEqual(files['sheet.html'].count('class="sheet-skill-row'), info['skills'])
|
||||
self.assertIn('.sheet-d10 .sheet-stat-grid { display: grid;', files['sheet.css'])
|
||||
self.assertIn('.sheet-d10 .sheet-skill-head, .sheet-d10 .sheet-skill-row { display: grid;', files['sheet.css'])
|
||||
self.assertNotIn('Ravenous', files['sheet.html'])
|
||||
self.assertIn('--d10-accent:', files['sheet.css'])
|
||||
self.assertEqual(files, build.build(variant, theme, Path(tmp)))
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ def roll(label, threshold):
|
|||
'{{dice_name=@{dice}}} '
|
||||
f'{{{{threshold=[[{threshold}]]}}}} '
|
||||
f'{{{{result=[[{expression}]]}}}}')
|
||||
return f'<button type="roll" value="{esc(value)}">Jet</button>'
|
||||
return f'<button type="roll" class="sheet-roll" value="{esc(value)}" title="Lancer {esc(label)}">Jet</button>'
|
||||
|
||||
|
||||
def render_skill(group, skill, variant):
|
||||
|
|
@ -109,61 +109,70 @@ def render_skill(group, skill, variant):
|
|||
('Chance', 'Chn')]
|
||||
selector = f'skill_{prefix}_attribute_select_{skill["id"]}'
|
||||
choices = ''.join(f'<option value="@{{base-{key}}}+@{{exal-{key}}}">{esc(short)}</option>' for key, short in options)
|
||||
return (f'<div class="sheet-skill"><label>{esc(name_field)}</label>'
|
||||
f'<input type="number" name="attr_{stem}" value="0" min="0">'
|
||||
depth = ' sheet-subskill' if skill.get('parent') else ''
|
||||
return (f'<div class="sheet-skill-row{depth}"><span class="sheet-skill-name">{esc(name_field)}</span>'
|
||||
f'<select name="attr_{selector}" title="Caractéristique">{choices}</select>'
|
||||
f'<input type="number" name="attr_{stem}" value="0" min="0" title="Niveau">'
|
||||
f'<input type="number" name="attr_{prefix}_skillcost_{skill["id"]}" value="0" min="0" title="Coût">'
|
||||
f'<select name="attr_{selector}">{choices}</select>'
|
||||
f'{roll(esc(name_field), threshold)}</div>')
|
||||
f'{roll(name_field, threshold)}</div>')
|
||||
|
||||
|
||||
def render(model, skills, variant, theme_name, theme):
|
||||
parts = [f'<div class="sheet-d10 sheet-theme-{esc(theme_name)}">',
|
||||
f'<h1>{esc(model["title"])}</h1>',
|
||||
'<label>Nom <input type="text" name="attr_character_name"></label>',
|
||||
'<label>Origine <input type="text" name="attr_character_race"></label>',
|
||||
'<label>Dé <select name="attr_dice">' + ''.join(
|
||||
'<header class="sheet-hero"><div class="sheet-hero-mark">D10</div>',
|
||||
f'<div class="sheet-hero-main"><span class="sheet-eyebrow">Feuille de personnage</span><h1>{esc(model["title"])}</h1>',
|
||||
'<div class="sheet-identity"><label>Nom <input type="text" name="attr_character_name"></label>',
|
||||
'<label>Origine <input type="text" name="attr_character_race"></label></div></div>',
|
||||
'<label class="sheet-die-choice">Dé de jeu <select name="attr_dice">' + ''.join(
|
||||
f'<option value="{n}"{" selected" if n == 10 else ""}>d{n}</option>'
|
||||
for n in (4, 6, 8, 10, 12, 20)) + '</select></label>',
|
||||
'<section><h2>Caractéristiques</h2>']
|
||||
for n in (4, 6, 8, 10, 12, 20)) + '</select></label></header>',
|
||||
'<section class="sheet-panel"><div class="sheet-section-title"><span>01</span><h2>Caractéristiques</h2></div>',
|
||||
'<div class="sheet-stat-grid">']
|
||||
for item in model['attributes']:
|
||||
key = item['id']
|
||||
threshold = f'(@{{base-{key}}}+@{{exal-{key}}})*2'
|
||||
parts.append(f'<div class="sheet-stat"><label>{esc(item["name"])}</label>'
|
||||
f'<input type="number" name="attr_base-{key}" value="0" title="Base">'
|
||||
f'<input type="number" name="attr_exal-{key}" value="0" title="Bonus">'
|
||||
f'{roll(esc(item["name"]), threshold)}</div>')
|
||||
parts.append('</section><section><h2>Ressources</h2>')
|
||||
parts.append(f'<div class="sheet-stat"><strong>{esc(item["name"])}</strong>'
|
||||
f'<label>Base<input type="number" name="attr_base-{key}" value="0" title="Base"></label>'
|
||||
f'<label>Bonus<input type="number" name="attr_exal-{key}" value="0" title="Bonus"></label>'
|
||||
f'{roll(item["name"], threshold)}</div>')
|
||||
parts.append('</div></section><section class="sheet-panel"><div class="sheet-section-title"><span>02</span><h2>Ressources</h2></div><div class="sheet-resource-grid">')
|
||||
for item in model['resources']:
|
||||
key = item['id']
|
||||
parts.append(f'<div class="sheet-stat"><label>{esc(item["name"])}</label>'
|
||||
f'<input type="number" name="attr_{key}" value="0" title="Actuel">'
|
||||
f'<input type="number" name="attr_{key}_maximum" value="0" title="Maximum"></div>')
|
||||
parts.append(f'<div class="sheet-resource"><strong>{esc(item["name"])}</strong>'
|
||||
f'<label>Actuel<input type="number" name="attr_{key}" value="0" title="Actuel"></label>'
|
||||
f'<span>/</span><label>Maximum<input type="number" name="attr_{key}_maximum" value="0" title="Maximum"></label></div>')
|
||||
if model.get('health_locations'):
|
||||
parts.append('<h3>Localisations</h3>')
|
||||
parts.append('</div><h3 class="sheet-subheading">Localisations</h3><div class="sheet-location-head"><span>Zone</span><span>PV</span><span>Protection</span><span>Intégrité</span></div><div class="sheet-locations">')
|
||||
for location in model['health_locations']:
|
||||
parts.append(f'<div class="sheet-stat"><label>{esc(location.replace("_", " "))}</label>'
|
||||
parts.append(f'<div class="sheet-location"><strong>{esc(location.replace("_", " "))}</strong>'
|
||||
f'<input type="number" name="attr_Life_Points_{location}" value="0" title="PV">'
|
||||
f'<input type="number" name="attr_Armor_Protection_Points_{location}" value="0" title="Protection">'
|
||||
f'<input type="number" name="attr_Armor_Integrity_Points_{location}" value="0" title="Intégrité"></div>')
|
||||
parts.append('</section><section><h2>Combat</h2>')
|
||||
parts.append('</div>')
|
||||
else:
|
||||
parts.append('</div>')
|
||||
parts.append('</section><section class="sheet-panel"><div class="sheet-section-title"><span>03</span><h2>Combat</h2></div><div class="sheet-combat-grid">')
|
||||
for item in model.get('combat', []):
|
||||
parts.append(f'<div class="sheet-stat"><label>{esc(item["name"])}</label>'
|
||||
f'<input type="number" name="attr_{esc(item["id"])}" value="0"></div>')
|
||||
parts.append(f'<label class="sheet-combat-field">{esc(item["name"])}'
|
||||
f'<input type="number" name="attr_{esc(item["id"])}" value="0"></label>')
|
||||
parts.append('</div><div class="sheet-combat-actions"><span>Jets de combat</span>')
|
||||
parts.append(roll('Initiative', '@{base-Agilite}+@{exal-Agilite}+@{Initiative}'))
|
||||
parts.append(roll('Attaque', '@{general_attack_threshold}'))
|
||||
parts.append('</div><h3 class="sheet-subheading">Armes équipées</h3><div class="sheet-weapon-grid">')
|
||||
for number in range(1, model.get('weapons', 0) + 1):
|
||||
parts.append(f'<div class="sheet-stat"><label>Arme {number}</label>'
|
||||
f'<input type="text" name="attr_general_item_weapon{number}_name">'
|
||||
parts.append(f'<div class="sheet-weapon"><span>Arme {number}</span>'
|
||||
f'<input type="text" name="attr_general_item_weapon{number}_name" title="Nom">'
|
||||
f'<input type="number" name="attr_general_item_weapon{number}" value="0" title="Dégâts">'
|
||||
f'<input type="checkbox" name="attr_item_weapon{number}_activation" value="1" title="Équipée"></div>')
|
||||
parts.append('</section><section><h2>Compétences</h2>')
|
||||
parts.append('</div></section><section class="sheet-panel"><div class="sheet-section-title"><span>04</span><h2>Compétences</h2></div>')
|
||||
for section in skills['sections']:
|
||||
parts.append(f'<h3>{esc(section["name"])}</h3>')
|
||||
parts.append(f'<h3 class="sheet-subheading">{esc(section["name"])}</h3>')
|
||||
for group in section['groups']:
|
||||
parts.append(f'<details open><summary>{esc(group["name"])}</summary>')
|
||||
parts.append(f'<div class="sheet-skill-group"><h4>{esc(group["name"])}</h4>'
|
||||
'<div class="sheet-skill-head"><span>Compétence</span><span>Carac.</span><span>Niveau</span><span>Coût</span><span>Jet</span></div>')
|
||||
parts.extend(render_skill(group, skill, variant) for skill in group.get('skills', []))
|
||||
parts.append('</details>')
|
||||
parts.append('</section><section><h2>Autres</h2>')
|
||||
parts.append('</div>')
|
||||
parts.append('</section><section class="sheet-panel"><div class="sheet-section-title"><span>05</span><h2>Autres</h2></div>')
|
||||
for block in model['repeating']:
|
||||
parts.append(f'<details><summary>{esc(block["name"])}</summary>'
|
||||
f'<fieldset class="repeating_{esc(block["id"])}">')
|
||||
|
|
@ -179,19 +188,9 @@ def render(model, skills, variant, theme_name, theme):
|
|||
parts.append('</fieldset></details>')
|
||||
parts.append('</section></div>')
|
||||
html_text = '\n'.join(parts) + '\n'
|
||||
css = '.sheet-d10 {\n' + '\n'.join(
|
||||
f' --d10-{key}: {value};' for key, value in theme.items()) + '''
|
||||
background: var(--d10-background); color: var(--d10-ink);
|
||||
padding: 1rem; font-family: sans-serif;
|
||||
}
|
||||
.sheet-d10 section, .sheet-d10 details { background: var(--d10-panel); border: 1px solid var(--d10-border); padding: .6rem; margin: .5rem 0; }
|
||||
.sheet-d10 h1, .sheet-d10 h2, .sheet-d10 h3 { color: var(--d10-accent); }
|
||||
.sheet-d10 .sheet-stat, .sheet-d10 .sheet-skill { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .3rem 0; }
|
||||
.sheet-d10 .sheet-stat label, .sheet-d10 .sheet-skill label { min-width: 9rem; }
|
||||
.sheet-d10 input[type=number] { width: 4rem; }
|
||||
.sheet-d10 button { background: var(--d10-accent); color: var(--d10-panel); border: 0; padding: .3rem .7rem; }
|
||||
.sheet-rolltemplate-d10skillcheck { background: var(--d10-panel); color: var(--d10-ink); border: 1px solid var(--d10-border); padding: .5rem; }
|
||||
'''
|
||||
css = '.sheet-d10, .sheet-rolltemplate-d10skillcheck {\n' + '\n'.join(
|
||||
f' --d10-{key}: {value};' for key, value in theme.items()) + '\n}\n'
|
||||
css += (ROOT / 'templates' / 'sheet.css').read_text(encoding='utf-8')
|
||||
html_text += '''<rolltemplate class="sheet-rolltemplate-d10skillcheck">
|
||||
<div><strong>{{name}}</strong> — {{roll_name}}</div>
|
||||
<div>Seuil: {{threshold}} · Résultat: {{result}}</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue