Combine biography and profile tabs
This commit is contained in:
parent
70a4a57f51
commit
b744e53f94
15 changed files with 108 additions and 45 deletions
|
@ -9,8 +9,8 @@ SPDX-License-Identifier: MIT
|
|||
<form class="{{cssClass}} flexcol" autocomplete="off">
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" alt="Actor Icon" title="{{data.name}}"
|
||||
height="100" width="100" />
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" alt="Actor Icon" title="{{data.name}}" height="100"
|
||||
width="100" />
|
||||
<div class="header-fields flexrow">
|
||||
<h1 class="charname">
|
||||
<label for="name" class="hidden">Name</label>
|
||||
|
@ -81,8 +81,7 @@ SPDX-License-Identifier: MIT
|
|||
<a class="item" data-tab="values">{{localize 'DS4.HeadingValues'}}</a>
|
||||
<a class="item" data-tab="inventory">{{localize 'DS4.HeadingInventory'}}</a>
|
||||
<a class="item" data-tab="spells">{{localize 'DS4.HeadingSpells'}}</a>
|
||||
<a class="item" data-tab="talents-abilities">{{localize 'DS4.HeadingTalentsAbilities'}}</a>
|
||||
<a class="item" data-tab="profile">{{localize "DS4.HeadingProfile"}}</a>
|
||||
<a class="item" data-tab="abilities">{{localize 'DS4.HeadingAbilities'}}</a>
|
||||
<a class="item" data-tab="biography">{{localize 'DS4.HeadingBiography'}}</a>
|
||||
</nav>
|
||||
|
||||
|
@ -99,11 +98,8 @@ SPDX-License-Identifier: MIT
|
|||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/spells.hbs}}
|
||||
|
||||
{{!-- Talents Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/talents-abilities.hbs}}
|
||||
|
||||
{{! Profile Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/profile.hbs}}
|
||||
{{!-- Abilities Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/abilities.hbs}}
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
{{> systems/ds4/templates/sheets/actor/tabs/biography.hbs}}
|
||||
|
|
10
src/templates/sheets/actor/components/biography.hbs
Normal file
10
src/templates/sheets/actor/components/biography.hbs
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-biography">
|
||||
{{editor content=data.data.profile.biography target="data.profile.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
29
src/templates/sheets/actor/components/profile.hbs
Normal file
29
src/templates/sheets/actor/components/profile.hbs
Normal file
|
@ -0,0 +1,29 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="ds4-profile">
|
||||
{{#each data.data.profile as |profile-data-value profile-data-key|}}
|
||||
{{#if (and (ne profile-data-key 'biography') (ne profile-data-key 'specialCharacteristics'))}}
|
||||
<div class="ds4-profile__entry">
|
||||
<label class="ds4-profile__entry-label" for="data.profile.{{profile-data-key}}">
|
||||
{{lookup ../config.i18n.characterProfile profile-data-key}}
|
||||
</label>
|
||||
<input class="ds4-profile__entry-input" type="text" name="data.profile.{{profile-data-key}}"
|
||||
value="{{profile-data-value}}"
|
||||
data-dtype="{{lookup ../config.i18n.characterProfileDTypes profile-data-key}}" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div class="ds4-profile__entry">
|
||||
<label class="ds4-profile__entry-label" for="data.profile.specialCharacteristics">
|
||||
{{lookup config.i18n.characterProfile 'specialCharacteristics'}}
|
||||
</label>
|
||||
<textarea class="ds4-profile__entry-input ds4-profile__entry-input--multiline"
|
||||
name="data.profile.specialCharacteristics" data-dtype="String"
|
||||
rows="4">{{data.data.profile.specialCharacteristics}}</textarea>
|
||||
</div>
|
||||
</div>
|
|
@ -5,7 +5,7 @@ SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
|||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="tab talents-abilities" data-group="primary" data-tab="talents-abilities">
|
||||
<div class="tab abilities" data-group="primary" data-tab="abilities">
|
||||
{{!-- TALENT --}}
|
||||
<h4 class="ds4-item-list-title">{{localize 'DS4.ItemTypeTalentPlural'}}</h4>
|
||||
{{#unless (isEmpty itemsByType.talent)}}
|
|
@ -5,6 +5,13 @@ SPDX-License-Identifier: MIT
|
|||
--}}
|
||||
|
||||
<div class="tab biography" data-group="primary" data-tab="biography">
|
||||
{{editor content=data.data.profile.biography target="data.profile.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
<div class="ds4-biography-tab-content">
|
||||
<!-- beautify ignore:start -->
|
||||
<!-- prettier-ignore-start -->
|
||||
{{!-- remove indentation to avoid annoying Handlebars auto-indent --}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/profile.hbs}}
|
||||
{{> systems/ds4/templates/sheets/actor/components/biography.hbs}}
|
||||
<!-- beautify ignore:end -->
|
||||
<!-- prettier-ignore-end -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
{{!--
|
||||
SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
|
||||
SPDX-License-Identifier: MIT
|
||||
--}}
|
||||
|
||||
<div class="tab profile" data-group="primary" data-tab="profile">
|
||||
<div class="grid grid-2col">
|
||||
{{#each data.data.profile as |profile-data-value profile-data-key|}}
|
||||
{{#if (and (ne profile-data-key 'biography') (ne profile-data-key 'specialCharacteristics'))}}
|
||||
<div class="profile-entry">
|
||||
<label for="data.profile.{{profile-data-key}}">
|
||||
{{lookup ../config.i18n.characterProfile profile-data-key}}
|
||||
</label>
|
||||
<input type="text" name="data.profile.{{profile-data-key}}" value="{{profile-data-value}}"
|
||||
data-dtype="{{lookup ../config.i18n.characterProfileDTypes profile-data-key}}" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div>
|
||||
<label for="data.profile.specialCharacteristics">
|
||||
{{lookup config.i18n.characterProfile 'specialCharacteristics'}}
|
||||
</label>
|
||||
<textarea name="data.profile.specialCharacteristics" data-dtype="String"
|
||||
rows="4">{{data.data.profile.specialCharacteristics}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue