diff --git a/src/module/handlebars/handlebars-partials.ts b/src/module/handlebars/handlebars-partials.ts index 82e58e85..a5f74663 100644 --- a/src/module/handlebars/handlebars-partials.ts +++ b/src/module/handlebars/handlebars-partials.ts @@ -8,6 +8,8 @@ export default async function registerHandlebarsPartials(): Promise { const templatePaths = [ "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/character-header.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", diff --git a/src/scss/components/_character_header.scss b/src/scss/components/_character_header.scss new file mode 100644 index 00000000..f69efd20 --- /dev/null +++ b/src/scss/components/_character_header.scss @@ -0,0 +1,53 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * + * SPDX-License-Identifier: MIT + */ + +@use "../utils/typography"; + +.ds4-character-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/_character_progression.scss b/src/scss/components/_character_progression.scss index 8e316a81..d1d03d84 100644 --- a/src/scss/components/_character_progression.scss +++ b/src/scss/components/_character_progression.scss @@ -10,42 +10,39 @@ @use "../utils/variables"; @use "../utils/mixins"; -.progression { - .progression-entry { - @include mixins.mark-invalid-or-disabled-input; +.ds4-character-progression { + @include mixins.mark-invalid-or-disabled-input; + display: flex; + gap: 0.5em; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: flex-end; + &__entry { align-items: center; + display: flex; + flex: 1; + gap: 0.25em; + justify-content: flex-end; + } - 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; + &__label { + @include typography.font-heading-upper; + border: none; + color: colors.$c-light-grey; + margin: 0; + padding: 0; + text-align: right; + } - &--slayer-points { - &::-webkit-inner-spin-button, - &::-webkit-outer-spin-button { - -webkit-appearance: auto; - } - &:hover, - &:focus { - -moz-appearance: auto; - } + &__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/_character_properties.scss b/src/scss/components/_character_properties.scss new file mode 100644 index 00000000..1962afd7 --- /dev/null +++ b/src/scss/components/_character_properties.scss @@ -0,0 +1,30 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * SPDX-FileCopyrightText: 2021 Oliver Rümpelein + * SPDX-FileCopyrightText: 2021 Gesina Schwalbe + * + * SPDX-License-Identifier: MIT + */ + +@use "../utils/mixins"; + +.ds4-character-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-multi-input { + display: flex; + gap: 0.125em; + } +} diff --git a/src/scss/components/_sheet.scss b/src/scss/components/_sheet.scss new file mode 100644 index 00000000..2308aef2 --- /dev/null +++ b/src/scss/components/_sheet.scss @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2021 Johannes Loher + * + * SPDX-License-Identifier: MIT + */ + +.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 70% rename from src/scss/components/_tabs.scss rename to src/scss/components/_sheet_tab_nav.scss index a16447aa..9d86fd9c 100644 --- a/src/scss/components/_tabs.scss +++ b/src/scss/components/_sheet_tab_nav.scss @@ -6,16 +6,12 @@ @use "../utils/variables"; -nav.tabs { +.ds4-sheet-tab-nav { height: auto; border-top: variables.$border-groove; border-bottom: variables.$border-groove; - .item { - font-weight: bold; - white-space: nowrap; - } - .item.active { - text-decoration: none; + &__item { + font-weight: bold; } } diff --git a/src/scss/ds4.scss b/src/scss/ds4.scss index 7e33edde..1185deff 100644 --- a/src/scss/ds4.scss +++ b/src/scss/ds4.scss @@ -23,6 +23,7 @@ @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_properties"); @include meta.load-css("components/character_values"); @include meta.load-css("components/check"); @include meta.load-css("components/checks"); @@ -33,10 +34,12 @@ @include meta.load-css("components/currency"); @include meta.load-css("components/description"); @include meta.load-css("components/forms"); + @include meta.load-css("components/character_header"); @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"); + @include meta.load-css("components/sheet_tab_nav"); @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..6fc20bca 100644 --- a/src/templates/sheets/actor/character-sheet.hbs +++ b/src/templates/sheets/actor/character-sheet.hbs @@ -6,83 +6,17 @@ SPDX-FileCopyrightText: 2021 Gesina Schwalbe SPDX-License-Identifier: MIT --}} -
- {{!-- Sheet Header --}} -
- Actor Icon -
-

- - -

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