daggerheart/templates/sheets/actors/character/header.hbs
joaquinpereyra98 b8930b18a4
Bug/103 enrich htmlfield content before its used in applications (#369)
* FIX: Add enritch to HTMLField
FIX: Remove no-HTMLField from Manifest
FIX: Convert Scar's HTMLField to StringField
FIX: Remove unused HTMLField

* REMOVE unused hanldebars helpers

* FEAT: add inventory-fieldset-items-V2 and inventory-item-V2  partials for Actors

* FIX showLabels to hideTags

* FEAT: add template to items sheet

* FEAT: add effects tabs on ItemSheet

* FEAT: add context menus for all inventory-items

* FEAT: add resources to inventory-item template

* FEAT: add enritch on inventory-item description
FEAT: add extensible behavior on inventory-item-content
FEAT: add fade effect on item-img to roll-itmg

* FEAT: add eritch to NPC description
FIX: missing htmlFieldss on manfiest
FIX: add misisng localizations

* FIX_ minor fixes

* Little resource fix. Noone will notice ._.

* FIX: remove default list styles
FIX: .extended css reduce max-height, shorten animation duration to 0.5s, and set overflow to auto.
FIX: set enriched=notes.enriche on notes.hbs
FIX: set experience.value on sidebar.hbs
FIX: move tooltip from item-img to img-portrait on inventory-item-V2.hbs
REMOVE: unused files

---------

Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
Co-authored-by: WBHarry <williambjrklund@gmail.com>
2025-07-19 22:21:46 +02:00

129 lines
No EOL
6.7 KiB
Handlebars

4<header class="character-header-sheet">
<line-div></line-div>
<div class="name-row">
<h1 class='actor-name'>
<input
type='text'
name='name'
value='{{document.name}}'
placeholder='Actor Name'
/>
</h1>
<div class='level-div'>
<h3 class='label'>
{{#if (or document.system.needsCharacterSetup document.system.levelData.canLevelUp)}}
<button
type="button"
class="level-button glow" data-tooltip="{{#if document.system.needsCharacterSetup}}{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.buttonTitle"}}{{else}}{{localize "DAGGERHEART.ACTORS.Character.levelUp"}}{{/if}}"
data-action="levelManagement"
>
<i class="fa-solid fa-triangle-exclamation"></i>
</button>
{{/if}}
{{localize 'DAGGERHEART.GENERAL.level'}}
<input type="text" data-dtype="Number" class="level-value" value={{#if document.system.needsCharacterSetup}}0{{else}}{{document.system.levelData.level.changed}}{{/if}} {{#if document.system.needsCharacterSetup}}disabled{{/if}} />
</h3>
</div>
</div>
<div class="character-details">
<div>
{{#if document.system.class.value}}
<span data-action="editDoc" data-item-uuid="{{document.system.class.value.uuid}}">{{document.system.class.value.name}}</span>
{{else}}
<span data-action="openPack" data-key="daggerheart.classes">{{localize 'TYPES.Item.class'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.class.subclass}}
<span data-action="editDoc" data-item-uuid="{{document.system.class.subclass.uuid}}">{{document.system.class.subclass.name}}</span>
{{else}}
<span data-action="openPack" data-key="daggerheart.subclass">{{localize 'TYPES.Item.subclass'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.community}}
<span data-action="editDoc" data-item-uuid="{{document.system.community.uuid}}">{{document.system.community.name}}</span>
{{else}}
<span data-action="openPack" data-key="daggerheart.community">{{localize 'TYPES.Item.community'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.ancestry}}
<span data-action="editDoc" data-item-uuid="{{document.system.ancestry.uuid}}">{{document.system.ancestry.name}}</span>
{{else}}
<span data-action="openPack" data-key="daggerheart.ancestry">{{localize 'TYPES.Item.ancestry'}}</span>
{{/if}}
</div>
{{#if document.system.multiclass.value}}
<div class="multiclass">
{{#if document.system.multiclass.value}}
<span data-action="editDoc"data-item-uuid="{{document.system.multiclass.value.uuid}}">{{document.system.multiclass.value.name}}</span>
{{else}}
<span data-action="openPack" data-key="daggerheart.classes">{{localize 'DAGGERHEART.GENERAL.multiclass'}}</span>
{{/if}}
<span class="dot">•</span>
{{#if document.system.multiclass.subclass}}
<span data-action="editDoc" data-item-uuid="{{document.system.multiclass.subclass.uuid}}">{{document.system.multiclass.subclass.name}}</span>
{{else}}
<span data-action="openPack" data-key="daggerheart.subclass">{{localize 'TYPES.Item.subclass'}}</span>
{{/if}}
</div>
{{/if}}
</div>
<div class="character-row">
<div class="hope-section">
<h4>{{localize "DAGGERHEART.GENERAL.hope"}}</h4>
{{#times document.system.resources.hope.max}}
<span class='hope-value' data-action='toggleHope' data-value="{{add this 1}}">
{{#if (gte ../document.system.resources.hope.value (add this 1))}}
<i class='fa-solid fa-diamond'></i>
{{else}}
<i class='fa-regular fa-circle'></i>
{{/if}}
</span>
{{/times}}
</div>
<div class="threshold-section">
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.minor"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.major}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.major"}}</h4>
<h4 class="threshold-value">{{document.system.damageThresholds.severe}}</h4>
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.severe"}}</h4>
</div>
</div>
<div class="character-traits">
{{#each this.attributes as |attribute key|}}
<div class="trait" data-tooltip="{{#each attribute.verbs}}{{this}}<br>{{/each}}" data-action="rollAttribute" data-attribute="{{key}}" data-value="{{attribute.value}}">
<div class="trait-name">
<span>{{localize (concat 'DAGGERHEART.CONFIG.Traits.' key '.short')}}</span>
{{#if attribute.tierMarked}}
<i class='fa-solid fa-circle'></i>
{{else}}
<i class='fa-regular fa-circle'></i>
{{/if}}
</div>
<div class="trait-value">
{{#if (gt attribute.value 0)}}
<span>+{{attribute.value}}</span>
{{else}}
<span>{{attribute.value}}</span>
{{/if}}
</div>
</div>
{{/each}}
</div>
{{#> 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
<div class="character-downtime-container">
<button data-action="useDowntime" data-type="shortRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}">
<i class="fa-solid fa-chair"></i>
</button>
<button data-action="useDowntime" data-type="longRest" data-tooltip="{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}">
<i class="fa-solid fa-bed"></i>
</button>
</div>
{{/'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs'}}
</header>