refactor: resturcture files so that lincensing info can be bundled properly
This commit is contained in:
parent
699ba74840
commit
1aa284311f
484 changed files with 119 additions and 179 deletions
16
src/handlebars/handlebars-helpers.ts
Normal file
16
src/handlebars/handlebars-helpers.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
export default function registerHandlebarsHelpers(): void {
|
||||
Handlebars.registerHelper(helpers);
|
||||
}
|
||||
|
||||
const helpers = {
|
||||
htmlToPlainText: (input: string | null | undefined): string | null | undefined => {
|
||||
if (!input) return;
|
||||
return $(input).text();
|
||||
},
|
||||
|
||||
isEmpty: (input: Array<unknown> | null | undefined): boolean => (input?.length ?? 0) === 0,
|
||||
};
|
56
src/handlebars/handlebars-partials.ts
Normal file
56
src/handlebars/handlebars-partials.ts
Normal file
|
@ -0,0 +1,56 @@
|
|||
// SPDX-FileCopyrightText: 2021 Johannes Loher
|
||||
// SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
||||
// SPDX-FileCopyrightText: 2021 Gesina Schwalbe
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
export default async function registerHandlebarsPartials(): Promise<void> {
|
||||
const templatePaths = [
|
||||
"systems/ds4/templates/sheets/actor/components/actor-header.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/actor-progression.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/biography.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/character-properties.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/check.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/checks.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/combat-value.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/combat-values.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/core-value.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/core-values.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/creature-properties.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/currency.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/effect-list-entry.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/effect-list-header.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/item-list-entry.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/item-list-header.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/items-overview.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/profile.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/talent-rank-equation.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/biography.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/character-abilities.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/character-inventory.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/creature-abilities.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/creature-inventory.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/description.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/effects.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/spells.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/values.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/effect-list-entry.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/effect-list-header.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/item-header.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/armor.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/equipable.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/physical.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/protective.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/talent.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/special-creature-ability.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/spell.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/properties/weapon.hbs",
|
||||
"systems/ds4/templates/sheets/item/tabs/description.hbs",
|
||||
"systems/ds4/templates/sheets/item/tabs/effects.hbs",
|
||||
"systems/ds4/templates/sheets/item/tabs/properties.hbs",
|
||||
"systems/ds4/templates/sheets/shared/components/add-button.hbs",
|
||||
"systems/ds4/templates/sheets/shared/components/control-button-group.hbs",
|
||||
"systems/ds4/templates/sheets/shared/components/rollable-image.hbs",
|
||||
];
|
||||
await loadTemplates(templatePaths);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue