removed code duplication in item templates

Item templates now all use a common body.
This commit is contained in:
Gesina Schwalbe 2020-12-28 18:58:01 +01:00
parent 9cf248754c
commit e7df21426b
7 changed files with 33 additions and 100 deletions

View file

@ -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);
}

View file

@ -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>

View file

@ -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>

View 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>

View file

@ -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>

View file

@ -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>

View file

@ -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>