Improve chat roll result readability

This commit is contained in:
Dandaedre 2026-09-19 00:48:04 +02:00
parent 607e339e8d
commit 7f63b437cc
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
4 changed files with 14 additions and 3 deletions

View File

@ -20,6 +20,7 @@
- [x] Allow Jenkins agents without Node.js to publish after the Python checks; keep the JavaScript tab check when Node.js is available.
- [x] Mirror Ravenous Jenkins publication by deploying successful master artifacts to /mnt/books/RPG/d10_character_sheet/.
- [x] Link the published body images in generated cyberpunk HTML by default, with a local preview override.
- [x] Improve roll result contrast and spacing in the chat template across light and dark themes.
## Live Roll20 checks after local verification

View File

@ -114,7 +114,13 @@
.sheet-d10 .sheet-repeater .sheet-repeater-skilllevel, .sheet-d10 .sheet-repeater .sheet-repeater-skillcost, .sheet-d10 .sheet-repeater .sheet-repeater-quantity, .sheet-d10 .sheet-repeater .sheet-repeater-damage { flex: 0 1 70px; }
.sheet-d10 .sheet-repeater .sheet-repeater-attribute { flex: 1 1 130px; }
.sheet-d10 .sheet-repeater .sheet-roll { flex: 0 0 34px; }
.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; }
.sheet-rolltemplate-d10skillcheck { overflow: hidden; 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; }
.sheet-rolltemplate-d10skillcheck .sheet-roll-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; padding: 7px 9px; border-bottom: 1px solid var(--d10-border); }
.sheet-rolltemplate-d10skillcheck .sheet-roll-title strong { font-size: 14px; }
.sheet-rolltemplate-d10skillcheck .sheet-roll-title span { opacity: .85; }
.sheet-rolltemplate-d10skillcheck .sheet-roll-values { display: grid; grid-template-columns: auto minmax(36px,auto) auto minmax(36px,auto); gap: 6px; align-items: center; justify-content: start; padding: 8px 9px; }
.sheet-rolltemplate-d10skillcheck .sheet-roll-value { min-width: 30px; text-align: center; }
.sheet-rolltemplate-d10skillcheck .inlinerollresult { display: inline-block; min-width: 28px; padding: 2px 5px; color: #20242b !important; background: #ffffff !important; border: 1px solid #68717d !important; border-radius: 3px; font-weight: bold; text-align: center; text-shadow: none !important; }
@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; }

View File

@ -21,6 +21,10 @@ 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-roll-values"', files['sheet.html'])
self.assertIn('class="sheet-roll-value">{{result}}', files['sheet.html'])
self.assertIn('.sheet-rolltemplate-d10skillcheck .inlinerollresult', files['sheet.css'])
self.assertIn('color: #20242b !important; background: #ffffff !important', files['sheet.css'])
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-page sheet-page-'), 2 if variant == 'base' else 3)

View File

@ -337,8 +337,8 @@ def render(model, skills, variant, theme_name, theme, themes, asset_base_url='')
f'.sheet-d10 .sheet-category-tab-state[value="{section["id"]}"] ~ .sheet-category-tab-nav .sheet-category-tab-{section["id"]} {{ color: var(--d10-panel); background: var(--d10-accent); border-color: var(--d10-accent); }}\n'
for section in skills['sections'] if any(group.get('skills') for group in section['groups']))
html_text += '''<rolltemplate class="sheet-rolltemplate-d10skillcheck">
<div><strong>{{name}}</strong> — {{roll_name}}</div>
<div>Seuil: {{threshold}} · Résultat: {{result}}</div>
<div class="sheet-roll-title"><strong>{{name}}</strong><span>{{roll_name}}</span></div>
<div class="sheet-roll-values"><span>Seuil</span><span class="sheet-roll-value">{{threshold}}</span><span>Résultat</span><span class="sheet-roll-value">{{result}}</span></div>
</rolltemplate>
'''
html_text += '<script type="text/worker">\n'