diff --git a/src/lang/de.json b/src/lang/de.json index 74b2e99c..2d37befb 100644 --- a/src/lang/de.json +++ b/src/lang/de.json @@ -121,6 +121,8 @@ "DS4.SpellMinimumLevelsSorcerer": "Zugangsstufe für Schwarzmagier", "DS4.SpellMinimumLevelsSorcererAbbr": "Zugangsstufe Sch", "DS4.SpellPrice": "Preis (Gold)", + "DS4.ActorName": "Name", + "DS4.ActorImageAltText": "Bild des Aktors", "DS4.ActorTypeCharacter": "Charakter", "DS4.ActorTypeCreature": "Kreatur", "DS4.Attribute": "Attribut", @@ -144,6 +146,14 @@ "DS4.CombatValuesRangedAttack": "Schießen", "DS4.CombatValuesSpellcasting": "Zaubern", "DS4.CombatValuesTargetedSpellcasting": "Zielzaubern", + "DS4.CombatValuesHitPointsSheet": "Lebenskraft", + "DS4.CombatValuesDefenseSheet": "Abwehr", + "DS4.CombatValuesInitiativeSheet": "Initiative", + "DS4.CombatValuesMovementSheet": "Laufen", + "DS4.CombatValuesMeleeAttackSheet": "Schlagen", + "DS4.CombatValuesRangedAttackSheet": "Schießen", + "DS4.CombatValuesSpellcastingSheet": "Zaubern", + "DS4.CombatValuesTargetedSpellcastingSheet": "Zielzaubern", "DS4.CharacterBaseInfoRace": "Volk", "DS4.CharacterBaseInfoClass": "Klasse", "DS4.CharacterBaseInfoHeroClass": "Heldenklasse", diff --git a/src/lang/en.json b/src/lang/en.json index 22a4ac0c..60f638ac 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -121,6 +121,8 @@ "DS4.SpellMinimumLevelsSorcerer": "Minimum level for Sorcerers", "DS4.SpellMinimumLevelsSorcererAbbr": "Min lvl SRC", "DS4.SpellPrice": "Price (Gold)", + "DS4.ActorName": "Name", + "DS4.ActorImageAltText": "Image of the Actor", "DS4.ActorTypeCharacter": "Character", "DS4.ActorTypeCreature": "Creature", "DS4.Attribute": "Attribute", @@ -144,6 +146,14 @@ "DS4.CombatValuesRangedAttack": "Ranged Attack", "DS4.CombatValuesSpellcasting": "Spellcasting", "DS4.CombatValuesTargetedSpellcasting": "Targeted Spellcasting", + "DS4.CombatValuesHitPointsSheet": "Hit Points", + "DS4.CombatValuesDefenseSheet": "Defense", + "DS4.CombatValuesInitiativeSheet": "Initiative", + "DS4.CombatValuesMovementSheet": "Movement", + "DS4.CombatValuesMeleeAttackSheet": "Melee Attack", + "DS4.CombatValuesRangedAttackSheet": "RAT", + "DS4.CombatValuesSpellcastingSheet": "Spellcasting", + "DS4.CombatValuesTargetedSpellcastingSheet": "TSC", "DS4.CharacterBaseInfoRace": "Race", "DS4.CharacterBaseInfoClass": "Class", "DS4.CharacterBaseInfoHeroClass": "Hero Class", diff --git a/src/module/config.ts b/src/module/config.ts index a8850b37..0c132436 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -162,6 +162,20 @@ export const DS4 = { targetedSpellcasting: "DS4.CombatValuesTargetedSpellcasting", }, + /** + * The what do display in the actor sheets for the combat value text (in some languages, abbreviations are necessary) + */ + combatValuesSheet: { + hitPoints: "DS4.CombatValuesHitPointsSheet", + defense: "DS4.CombatValuesDefenseSheet", + initiative: "DS4.CombatValuesInitiativeSheet", + movement: "DS4.CombatValuesMovementSheet", + meleeAttack: "DS4.CombatValuesMeleeAttackSheet", + rangedAttack: "DS4.CombatValuesRangedAttackSheet", + spellcasting: "DS4.CombatValuesSpellcastingSheet", + targetedSpellcasting: "DS4.CombatValuesTargetedSpellcastingSheet", + }, + /** * Define the base info of a character */ diff --git a/src/module/handlebars/handlebars-partials.ts b/src/module/handlebars/handlebars-partials.ts index 82e58e85..60067eca 100644 --- a/src/module/handlebars/handlebars-partials.ts +++ b/src/module/handlebars/handlebars-partials.ts @@ -6,14 +6,17 @@ export default async function registerHandlebarsPartials(): Promise { const templatePaths = [ + "systems/ds4/templates/sheets/actor/components/actor-header.hbs", + "systems/ds4/templates/sheets/actor/components/actor-progression.hbs", "systems/ds4/templates/sheets/actor/components/biography.hbs", - "systems/ds4/templates/sheets/actor/components/character-progression.hbs", + "systems/ds4/templates/sheets/actor/components/character-properties.hbs", "systems/ds4/templates/sheets/actor/components/check.hbs", "systems/ds4/templates/sheets/actor/components/checks.hbs", "systems/ds4/templates/sheets/actor/components/combat-value.hbs", "systems/ds4/templates/sheets/actor/components/combat-values.hbs", "systems/ds4/templates/sheets/actor/components/core-value.hbs", "systems/ds4/templates/sheets/actor/components/core-values.hbs", + "systems/ds4/templates/sheets/actor/components/creature-properties.hbs", "systems/ds4/templates/sheets/actor/components/currency.hbs", "systems/ds4/templates/sheets/actor/components/item-list-entry.hbs", "systems/ds4/templates/sheets/actor/components/item-list-header.hbs", diff --git a/src/scss/components/_actor_header.scss b/src/scss/components/_actor_header.scss new file mode 100644 index 00000000..a9828e1d --- /dev/null +++ b/src/scss/components/_actor_header.scss @@ -0,0 +1,53 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * + * SPDX-License-Identifier: MIT + */ + +@use "../utils/typography"; + +.ds4-actor-header { + display: flex; + flex-grow: 0; + flex-shrink: 0; + gap: 1em; + + &__img { + border: none; + cursor: pointer; + height: 100px; + width: 100px; + } + + &__data { + display: flex; + flex-direction: column; + } + + &__data-row { + align-content: center; + display: flex; + flex: 1; + flex-direction: row; + gap: 0.5em; + > * { + flex: 1; + } + } + + &__name { + display: flex; + align-items: center; + border-bottom: 0; + margin: 0; + } + + &__name-input { + @include typography.font-heading-upper; + background-color: transparent; + border: none; + flex: 1; + font-size: 1.25em; + height: auto; + } +} diff --git a/src/scss/components/_actor_progression.scss b/src/scss/components/_actor_progression.scss new file mode 100644 index 00000000..3d5679fd --- /dev/null +++ b/src/scss/components/_actor_progression.scss @@ -0,0 +1,49 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * SPDX-FileCopyrightText: 2021 Oliver Rümpelein + * + * SPDX-License-Identifier: MIT + */ + +@use "../utils/colors"; +@use "../utils/typography"; +@use "../utils/variables"; +@use "../utils/mixins"; + +.ds4-actor-progression { + @include mixins.mark-invalid-or-disabled-input; + display: flex; + gap: 0.5em; + + &__entry { + align-items: center; + display: flex; + flex: 1; + gap: 0.25em; + justify-content: flex-end; + } + + &__label { + @include typography.font-heading-upper; + border: none; + color: colors.$c-light-grey; + margin: 0; + padding: 0; + text-align: right; + } + + &__input { + flex: 0 0 5ch; + + &--slayer-points { + &::-webkit-inner-spin-button, + &::-webkit-outer-spin-button { + -webkit-appearance: auto; + } + &:hover, + &:focus { + -moz-appearance: auto; + } + } + } +} diff --git a/src/scss/components/_actor_properties.scss b/src/scss/components/_actor_properties.scss new file mode 100644 index 00000000..0f735047 --- /dev/null +++ b/src/scss/components/_actor_properties.scss @@ -0,0 +1,36 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * SPDX-FileCopyrightText: 2021 Oliver Rümpelein + * SPDX-FileCopyrightText: 2021 Gesina Schwalbe + * + * SPDX-License-Identifier: MIT + */ + +@use "../utils/mixins"; +@use "../utils/variables"; + +.ds4-actor-properties { + @include mixins.mark-invalid-or-disabled-input; + display: flex; + gap: 0.25em; + + &__property { + flex: 1; + } + + &__property-label { + font-size: 0.9em; + font-weight: bold; + white-space: nowrap; + } + + &__property-select { + width: 100%; + height: variables.$default-input-height; + } + + &__property-multi-input { + display: flex; + gap: 0.125em; + } +} diff --git a/src/scss/components/_character_progression.scss b/src/scss/components/_character_progression.scss deleted file mode 100644 index 8e316a81..00000000 --- a/src/scss/components/_character_progression.scss +++ /dev/null @@ -1,52 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021 Johannes Loher - * SPDX-FileCopyrightText: 2021 Oliver Rümpelein - * - * SPDX-License-Identifier: MIT - */ - -@use "../utils/colors"; -@use "../utils/typography"; -@use "../utils/variables"; -@use "../utils/mixins"; - -.progression { - .progression-entry { - @include mixins.mark-invalid-or-disabled-input; - - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: flex-end; - align-items: center; - - padding-right: 3px; - h2.progression-label { - @include typography.font-heading-upper; - display: block; - height: 50px; - padding: 0; - color: colors.$c-light-grey; - border: none; - line-height: 50px; - margin: variables.$margin-sm 0; - text-align: right; - } - input.progression-value { - margin-left: 5px; - flex: 0 0 40px; - text-align: left; - - &--slayer-points { - &::-webkit-inner-spin-button, - &::-webkit-outer-spin-button { - -webkit-appearance: auto; - } - &:hover, - &:focus { - -moz-appearance: auto; - } - } - } - } -} diff --git a/src/scss/components/_combat_value.scss b/src/scss/components/_combat_value.scss index 66b102ef..326d0f6e 100644 --- a/src/scss/components/_combat_value.scss +++ b/src/scss/components/_combat_value.scss @@ -6,13 +6,14 @@ @use "../utils/mixins"; @use "../utils/variables"; +@use "../utils/typography"; .ds4-combat-value { $size: 3.75rem; display: grid; place-items: center; - row-gap: 0.5em; + row-gap: 0.125em; &__value { $combat-values-icons-path: "#{variables.$official-icons-path}/combat-values"; @@ -51,6 +52,12 @@ } } + &__label { + @include typography.font-heading-upper; + font-size: 1.2em; + white-space: nowrap; + } + &__formula { align-items: center; justify-content: space-between; diff --git a/src/scss/components/_character_values.scss b/src/scss/components/_sheet.scss similarity index 52% rename from src/scss/components/_character_values.scss rename to src/scss/components/_sheet.scss index 5dfb4648..2308aef2 100644 --- a/src/scss/components/_character_values.scss +++ b/src/scss/components/_sheet.scss @@ -4,8 +4,8 @@ * SPDX-License-Identifier: MIT */ -header.sheet-header { - .character-values { - flex: 0 0 100%; - } +.ds4-sheet { + display: flex; + flex-direction: column; + flex-wrap: nowrap; } diff --git a/src/scss/components/_tabs.scss b/src/scss/components/_sheet_tab_nav.scss similarity index 78% rename from src/scss/components/_tabs.scss rename to src/scss/components/_sheet_tab_nav.scss index a16447aa..ed8bcdba 100644 --- a/src/scss/components/_tabs.scss +++ b/src/scss/components/_sheet_tab_nav.scss @@ -6,16 +6,13 @@ @use "../utils/variables"; -nav.tabs { - height: auto; - border-top: variables.$border-groove; +.ds4-sheet-tab-nav { border-bottom: variables.$border-groove; - .item { + border-top: variables.$border-groove; + height: auto; + + &__item { font-weight: bold; white-space: nowrap; } - - .item.active { - text-decoration: none; - } } diff --git a/src/scss/ds4.scss b/src/scss/ds4.scss index 7e33edde..a6afe386 100644 --- a/src/scss/ds4.scss +++ b/src/scss/ds4.scss @@ -20,10 +20,11 @@ /* Styles limited to ds4 sheets */ .ds4 { + @include meta.load-css("components/actor_header"); + @include meta.load-css("components/actor_progression"); + @include meta.load-css("components/actor_properties"); @include meta.load-css("components/apps"); @include meta.load-css("components/basic_property"); - @include meta.load-css("components/character_progression"); - @include meta.load-css("components/character_values"); @include meta.load-css("components/check"); @include meta.load-css("components/checks"); @include meta.load-css("components/combat_value"); @@ -36,7 +37,8 @@ @include meta.load-css("components/item_list"); @include meta.load-css("components/profile"); @include meta.load-css("components/rollable_image"); - @include meta.load-css("components/tabs"); + @include meta.load-css("components/sheet_tab_nav"); + @include meta.load-css("components/sheet"); @include meta.load-css("components/talent_rank_equation"); @include meta.load-css("tabs/biography"); } diff --git a/src/templates/sheets/actor/character-sheet.hbs b/src/templates/sheets/actor/character-sheet.hbs index 8e5eb279..99ff588c 100644 --- a/src/templates/sheets/actor/character-sheet.hbs +++ b/src/templates/sheets/actor/character-sheet.hbs @@ -6,83 +6,19 @@ SPDX-FileCopyrightText: 2021 Gesina Schwalbe SPDX-License-Identifier: MIT --}} -
- {{!-- Sheet Header --}} -
- Actor Icon -
-

- - -

- {{> systems/ds4/templates/sheets/actor/components/character-progression.hbs}} - -
-
- - -
-
- - -
-
- -
- - / - - -
-
-
- -
- - / - - -
-
-
- - -
-
- - -
-
-
-
+ + {{!-- Header --}} + {{#> systems/ds4/templates/sheets/actor/components/actor-header.hbs}} + {{> systems/ds4/templates/sheets/actor/components/character-properties.hbs}} + {{/systems/ds4/templates/sheets/actor/components/actor-header.hbs}} {{!-- Sheet Tab Navigation --}} -