Skip to content

Commit

Permalink
feat(actor-sheet and templates): added, deleted and renamed some file…
Browse files Browse the repository at this point in the history
…s related to templates

all new templates and tabs still in basic version, they need more work in this point, but they work
:D
  • Loading branch information
SouOWendel committed Oct 6, 2023
1 parent c130755 commit c4bd784
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 31 deletions.
7 changes: 4 additions & 3 deletions module/helpers/templates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export const preloadHandlebarsTemplates = async function() {
return loadTemplates([

// Actor partials.
'systems/ordemparanormal/templates/actor/parts/actor-features.html',
'systems/ordemparanormal/templates/actor/parts/actor-items.html',
'systems/ordemparanormal/templates/actor/parts/actor-spells.html',
'systems/ordemparanormal/templates/actor/parts/actor-skills.html',
'systems/ordemparanormal/templates/actor/parts/actor-inventory.html',
'systems/ordemparanormal/templates/actor/parts/actor-rituals.html',
'systems/ordemparanormal/templates/actor/parts/actor-effects.html',
'systems/ordemparanormal/templates/actor/parts/actor-habilities.html',
]);
};
1 change: 1 addition & 0 deletions module/sheets/item-sheet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export class OrdemItemSheet extends ItemSheet {
classes: ['ordemparanormal', 'sheet', 'item'],
width: 520,
height: 480,
template: 'systems/ordemparanormal/templates/itemn/item-sheet.html',
tabs: [{ navSelector: '.sheet-tabs', contentSelector: '.sheet-body', initial: 'description' }]
});
}
Expand Down
54 changes: 26 additions & 28 deletions templates/actor/actor-agent-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,18 @@ <h1 class="charname">
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
{{!-- Default tab is specified in actor-sheet.mjs --}}
<a class="item" data-tab="features">Features</a>
<a class="item" data-tab="description">Description</a>
<a class="item" data-tab="items">Items</a>
<a class="item" data-tab="spells">Spells</a>
<a class="item" data-tab="effects">Effects</a>
<a class="item" data-tab="skills">{{localize 'ordemparanormal.tab.skills'}}</a>
<a class="item" data-tab="inventory">{{localize 'ordemparanormal.tab.inventory'}}</a>
<a class="item" data-tab="habilities">{{localize 'ordemparanormal.tab.habilities'}}</a>
<a class="item" data-tab="rituals">{{localize 'ordemparanormal.tab.rituals'}}</a>
<a class="item" data-tab="biography">{{localize 'ordemparanormal.tab.biography'}}</a>
<a class="item" data-tab="effects">{{localize 'ordemparanormal.tab.effects'}}</a>
</nav>

{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Owned Features Tab --}}
<div class="tab features" data-group="primary" data-tab="features">
{{!-- Owned skills Tab --}}
<div class="tab skills" data-group="primary" data-tab="skills">
<section class="grid grid-2col">
<aside class="sidebar">
{{!-- The grid classes are defined in
Expand Down Expand Up @@ -341,45 +342,42 @@ <h1 class="charname">
</div>
</aside>

{{!-- For the main features list, span the right two columns
{{!-- For the main skills list, span the right two columns
--}}
<section class="main grid-span-1">
{{!-- This is a Handlebars partial. They're stored in the
`/parts` folder next to this sheet, and defined in module/helpers/templates.mjs --}}
{{>"systems/ordemparanormal/templates/actor/parts/actor-features.html"}}
{{>"systems/ordemparanormal/templates/actor/parts/actor-skills.html"}}
</section>
</section>
</div>

{{!-- Biography Tab --}}
<div class="tab biography" data-group="primary" data-tab="description">
<div class="tab biography" data-group="primary" data-tab="biography">
{{!-- If you want TinyMCE editors to output inline rolls when
rendered, you need to pass the actor's roll data to the rollData
property. --}} {{editor content=data.biography
target="data.biography" rollData=rollData button=true owner=owner
editable=editable}}
property. --}}
{{editor content=data.biography target="data.biography" rollData=rollData button=true owner=owner editable=editable}}
</div>

{{!-- Owned Items Tab --}}
<div class="tab items" data-group="primary" data-tab="items">
{{>
"systems/ordemparanormal/templates/actor/parts/actor-items.html"}}
{{!-- Owned inventory Tab --}}
<div class="tab inventory" data-group="primary" data-tab="inventory">
{{>"systems/ordemparanormal/templates/actor/parts/actor-inventory.html"}}
</div>

{{!-- Owned Spells Tab --}}
<div class="tab spells" data-group="primary" data-tab="spells">
{{>
"systems/ordemparanormal/templates/actor/parts/actor-spells.html"}}
{{!-- Owned rituals Tab --}}
<div class="tab rituals" data-group="primary" data-tab="rituals">
{{>"systems/ordemparanormal/templates/actor/parts/actor-rituals.html"}}
</div>

{{!-- Active Effects Tab --}}
<div
class="tab effects flexcol"
data-group="primary"
data-tab="effects"
>
{{>
"systems/ordemparanormal/templates/actor/parts/actor-effects.html"}}
<div class="tab effects flexcol" data-group="primary" data-tab="effects">
{{>"systems/ordemparanormal/templates/actor/parts/actor-effects.html"}}
</div>

{{!-- Active habilities Tab --}}
<div class="tab habilities flexcol" data-group="primary" data-tab="habilities">
{{>"systems/ordemparanormal/templates/actor/parts/actor-habilities.html"}}
</div>
</section>
</form>
File renamed without changes.
57 changes: 57 additions & 0 deletions templates/actor/parts/actor-inventory.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<section class="grid grid-2col">
<aside class="sidebar">
<ol class="items-list">
<li class="item flexrow items-header">
<div class="item-name">Name</div>
<div class="item-formula">Roll Formula</div>
<div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add item</a>
</div>
</li>
{{#each gear as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-name">
<div class="item-image">
<a class="rollable" data-roll-type="item"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></a>
</div>
<h4>{{item.name}}</h4>
</div>
<div class="item-formula item-prop">{{item.data.formula}}</div>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</aside>
<section class="main grid-span-1">

{{>"systems/ordemparanormal/templates/actor/parts/actor-skills.html"}}

<ol class="items-list">
<li class="item flexrow items-header">
<div class="item-name">Name</div>
<div class="item-formula">Roll Formula</div>
<div class="item-controls">
<a class="item-control item-create" title="Create item" data-type="item"><i class="fas fa-plus"></i> Add item</a>
</div>
</li>
{{#each protection as |item id|}}
<li class="item flexrow" data-item-id="{{item._id}}">
<div class="item-name">
<div class="item-image">
<a class="rollable" data-roll-type="item"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></a>
</div>
<h4>{{item.name}}</h4>
</div>
<div class="item-formula item-prop">{{item.data.formula}}</div>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ol>
</section>
</section>
File renamed without changes.
File renamed without changes.

0 comments on commit c4bd784

Please sign in to comment.