removed code duplication in item templates
Item templates now all use a common body.
This commit is contained in:
parent
9cf248754c
commit
e7df21426b
7 changed files with 33 additions and 100 deletions
|
@ -35,6 +35,7 @@ async function registerHandlebarsPartials() {
|
|||
"systems/ds4/templates/item/partials/description.hbs",
|
||||
"systems/ds4/templates/item/partials/details.hbs",
|
||||
"systems/ds4/templates/item/partials/effects.hbs",
|
||||
"systems/ds4/templates/item/partials/body.hbs",
|
||||
];
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
|
|
@ -34,24 +34,6 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.Effects"}}</a>
|
||||
<a class="item" data-tab="details">{{localize "DS4.Details"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/description.hbs}}
|
||||
|
||||
{{!-- Details Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/details.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/effects.hbs}}
|
||||
|
||||
</section>
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
|
@ -7,24 +7,6 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.Effects"}}</a>
|
||||
<a class="item" data-tab="details">{{localize "DS4.Details"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/description.hbs}}
|
||||
|
||||
{{!-- Details Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/details.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/effects.hbs}}
|
||||
|
||||
</section>
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
22
src/templates/item/partials/body.hbs
Normal file
22
src/templates/item/partials/body.hbs
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{!-- Template for the common body (navigation & body sections) of all items. --}}
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.Effects"}}</a>
|
||||
<a class="item" data-tab="details">{{localize "DS4.Details"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/description.hbs}}
|
||||
|
||||
{{!-- Details Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/details.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/effects.hbs}}
|
||||
|
||||
</section>
|
|
@ -14,24 +14,6 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.Effects"}}</a>
|
||||
<a class="item" data-tab="details">{{localize "DS4.Details"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/description.hbs}}
|
||||
|
||||
{{!-- Details Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/details.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/effects.hbs}}
|
||||
|
||||
</section>
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
|
@ -7,24 +7,6 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.Effects"}}</a>
|
||||
<a class="item" data-tab="details">{{localize "DS4.Details"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/description.hbs}}
|
||||
|
||||
{{!-- Details Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/details.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/effects.hbs}}
|
||||
|
||||
</section>
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
|
@ -29,24 +29,6 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="description">{{localize "DS4.Description"}}</a>
|
||||
<a class="item" data-tab="effects">{{localize "DS4.Effects"}}</a>
|
||||
<a class="item" data-tab="details">{{localize "DS4.Details"}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{!-- Description Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/description.hbs}}
|
||||
|
||||
{{!-- Details Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/details.hbs}}
|
||||
|
||||
{{!-- Effects Tab --}}
|
||||
{{> systems/ds4/templates/item/partials/effects.hbs}}
|
||||
|
||||
</section>
|
||||
{{!-- Common Item body --}}
|
||||
{{> systems/ds4/templates/item/partials/body.hbs}}
|
||||
</form>
|
Loading…
Reference in a new issue