From ca66f548f774cafa7c7fcc1fe5ed4f08f6a7f761 Mon Sep 17 00:00:00 2001 From: Stexinator Date: Tue, 16 Aug 2022 16:22:29 +0200 Subject: [PATCH] [TheWitcher] fix some css issues and rework background tab --- TheWitcher/witchersheet.css | 97 ++++++------------ TheWitcher/witchersheet.html | 187 ++++++++++++++++++----------------- 2 files changed, 129 insertions(+), 155 deletions(-) diff --git a/TheWitcher/witchersheet.css b/TheWitcher/witchersheet.css index 6bda720edc..02a97bfe4c 100644 --- a/TheWitcher/witchersheet.css +++ b/TheWitcher/witchersheet.css @@ -1675,6 +1675,7 @@ input[type="checkbox"].brawling-dropdown { outline: none; border: none; box-shadow: none; + background-color: transparent; } input[type="checkbox"].spell_casting-dropdown::after, @@ -2197,7 +2198,7 @@ textarea.notes-text { /* QUICK WEAPON BUTTONS */ input.quickweap-title { - width: 175px; + width: 165px; font-weight: bold; text-align: right; font-size: 11px; @@ -5436,42 +5437,6 @@ textarea.repeating_hex_lift { /* BACKGROUND */ -input[type="checkbox"].life-events-toggle, -input[type="checkbox"].friends-toggle { - opacity: 0; - width: 16px; - height: 16px; - left: 15px; - margin-left: -50px; - position: relative; - cursor: pointer; - z-index: 1; -} - -input[type="checkbox"].life-events-toggle + span::before, -input[type="checkbox"].friends-toggle + span::before { - line-height: 14px; - text-align: center; - display: inline-block; - vertical-align: middle; - content: "▼"; - width: 14px; - height: 14px; - font-size: 20px; - color: #FFF; -} - -input[type="checkbox"].life-events-toggle:checked + span::before, -input[type="checkbox"].friends-toggle:checked + span::before { - content: "►"; - color: #FFF; -} - -input.life-events-toggle:checked ~ div.events-container, -input.friends-toggle:checked ~ div.friends-container { - display: none; -} - /* ---- */ .witcher-standard, @@ -5528,6 +5493,10 @@ input[type="checkbox"].witcher-switch:checked + span::before { /* Background sections */ +summary{ + display:list-item; +} + span.background-span { display: inline-block; width: 480px; @@ -5539,13 +5508,13 @@ span.background-span { border-radius: 20px; } -span.background2-span { +span.background-span-summary { display: inline-block; - width: 405px; + width: 480px; margin-bottom: 5px; - padding-right: 100px; + padding-right: 26px; background: #444444; - height: 26px; + height: 22px; color: #FFF; border-radius: 20px; } @@ -5644,32 +5613,26 @@ textarea.style2-text { box-shadow: inset 0px 0px 5px 1px #232323; } -label.style-element { - display: inline-block; - width: 400px; - margin-bottom: 8px; - padding-left: 12px; - padding-right: 4px; - padding-top: 4px; - padding-bottom: 4px; - font-weight: 1; - font-size: 12px; - color: #FFF; - margin-bottom: 2px; -} - -label.style2-element { - display: inline-block; - width: 300px; - margin-bottom: 8px; - padding-left: 12px; - padding-right: 4px; - padding-top: 4px; - padding-bottom: 4px; - font-weight: 1; - font-size: 12px; - color: #FFF; - margin-bottom: 2px; +textarea.standalone-text { + width: 480px; + height: 60px; + resize: vertical; + padding-right: 10px; + padding-left: 10px; + padding-top: 5px; + padding-bottom: 5px; + font-size: 11px; + margin-left: 5px; + margin-top: 8px; + margin-bottom: 5px; + text-align: left; + border: 1px solid #000; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + border-bottom-left-radius: 15px; + border-bottom-right-radius: 15px; + background-color: #eaeaea; + box-shadow: inset 0px 0px 5px 1px #232323; } .summary-header { diff --git a/TheWitcher/witchersheet.html b/TheWitcher/witchersheet.html index 380fb5a1a0..3b7dc2625c 100644 --- a/TheWitcher/witchersheet.html +++ b/TheWitcher/witchersheet.html @@ -128,7 +128,7 @@

- +
@@ -2119,7 +2119,7 @@ -
+
@@ -3188,75 +3188,84 @@
- CAMPAIGN INFO + CAMPAIGN INFO - +
- -
-
- - - - - - -
-
- - - - - - -
-
- - - - - -
-
-
- - - - -
-
- - - - -
-
- - -
-
-
-
- - - - -
-
- - - - -
-
- - -
- - - -
-
+
+ + STYLE, APPEARANCE & OUTLOOK + +
+
+ + + + + + +
+
+ + + + + + +
+
+ + +
+
+ + EARLY LIFE + + + +
+
+
+ + + + +
+
+ + + + +
+
+ + +
+
+
+
+ + + + +
+
+ + + + +
+
+ + +
+
+
+ + SIBLINGS, RIVALS & FRIENDS + +
+
-
-
+
+
+ - - -
-
+
+ + LIFE EVENTS + +
+
-
-
+
+
+
@@ -4284,14 +4297,17 @@ on('clicked:roll', async (event) => { ); }); -on('clicked:roll_spellcasting_detailed', async (event) => { +on('clicked:repeating_finearts:roll clicked:repeating_performance:roll clicked:repeating_npcskill:roll', async (event) => { - let rollBase = "@{whisper}&{template:singleroll} {{title=SPELL CASTING}} {{name=@{character_name}}} {{roll=[[1d10!+@{will}[STAT]+@{spell_casting_total}[SKILL]?{EXTRA ACTION|No,+0|Yes,-3}[EXTRA ACTION]?{TARGET LOCATION |None/Random,+0|Head,-6|Torso,-1|Arm/Limb,-3|Leg/Tail/Wing,-2}[LOCATION]+?{ADDITIONAL MODS? (Bright Light, No Vision, Terrain etc)|0}[MOD]]]}}{{fumble=[[1d10!]]}}{{fumble2=[[1d10!]]}}{{rolllocation=[[0]]}}"; + // prefix gets an empty string for normal attributes, and repeating_section_ID_ for repeating attributes + var trigger = event.triggerName.slice(8); // this always starts with 'clicked:' + var prefix = trigger.split('_').slice(0,3).join('_') + '_' + + let rollBase = event.htmlAttributes.value.replaceAll('prefix-', `${prefix}`) + "{{fumble=[[1d10!]]}}{{fumble2=[[1d10!]]}}"; let rollResult = await startRoll(rollBase); let computedValues = await resolveChecks( - checkFumble(rollResult), - checkLocation(rollResult) + checkFumble(rollResult) ); finishRoll( @@ -4300,14 +4316,9 @@ on('clicked:roll_spellcasting_detailed', async (event) => { ); }); +on('clicked:roll_spellcasting_detailed', async (event) => { -on('clicked:repeating_finearts:roll clicked:repeating_performance:roll clicked:repeating_npcskill:roll', async (event) => { - - // prefix gets an empty string for normal attributes, and repeating_section_ID_ for repeating attributes - var trigger = event.triggerName.slice(8); // this always starts with 'clicked:' - var prefix = trigger.split('_').slice(0,3).join('_') + '_' - - let rollBase = event.htmlAttributes.value.replaceAll('prefix-', `${prefix}`) + "{{fumble=[[1d10!]]}}{{fumble2=[[1d10!]]}}"; + let rollBase = "@{whisper}&{template:singleroll} {{title=SPELL CASTING}} {{name=@{character_name}}} {{roll=[[1d10!+@{will}[STAT]+@{spell_casting_total}[SKILL]?{EXTRA ACTION|No,+0|Yes,-3}[EXTRA ACTION]?{TARGET LOCATION |None/Random,+0|Head,-6|Torso,-1|Arm/Limb,-3|Leg/Tail/Wing,-2}[LOCATION]+?{ADDITIONAL MODS? (Bright Light, No Vision, Terrain etc)|0}[MOD]]]}}{{fumble=[[1d10!]]}}{{fumble2=[[1d10!]]}}{{rolllocation=[[0]]}}"; let rollResult = await startRoll(rollBase); let computedValues = await resolveChecks(