Add Templates Html + Gulp Sass + Css + Basic Tree and Files

- Add Templates Html
- Gulp Sass
- Css
- Basic Tree and Files
This commit is contained in:
Mandar
2020-12-04 20:17:51 +01:00
parent 9332985ec7
commit a0a99eb08c
60 changed files with 7771 additions and 34 deletions

View File

@@ -0,0 +1,51 @@
import { L5RItemSheet } from "./item-sheet.js";
/**
* @extends {ItemSheet}
*/
export class L5RFeatSheet extends L5RItemSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r", "sheet", "feat"],
template: "systems/l5r/templates/item/feat-sheet.html",
width: 520,
height: 480,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
});
}
/** @override */
getData() {
const sheetData = super.getData();
sheetData.data.dtypes = ["String", "Number", "Boolean"];
sheetData.data.isFeat = true;
sheetData.data.isEquipment = false;
return sheetData;
}
/**
* Subscribe to events from the sheet.
* @param html HTML content of the sheet.
*/
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
}
/**
* Update feat with the data from the sheet.
* @param event
* @param formData
*/
_updateObject(event, formData) {
// Update the Item
return this.object.update(formData);
}
}

View File

@@ -0,0 +1,47 @@
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
export class L5RItemSheet extends ItemSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r", "sheet", "item"],
template: "systems/l5r/templates/item/item-sheet.html",
width: 520,
height: 480,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
});
}
getData() {
const sheetData = super.getData();
sheetData.data.dtypes = ["String", "Number", "Boolean"];
sheetData.data.isEquipment = true;
return sheetData;
}
/**
* Subscribe to events from the sheet.
* @param html HTML content of the sheet.
*/
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
}
/**
* Update the item with data from the sheet.
* @param event
* @param formData
*/
_updateObject(event, formData) {
return this.object.update(formData);
}
}

View File

@@ -0,0 +1,4 @@
export class L5RItem extends Item {
}

View File

@@ -0,0 +1,48 @@
import { L5RItemSheet } from "./item-sheet.js";
/**
* @extends {ItemSheet}
*/
export class L5RWeaponSheet extends L5RItemSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r", "sheet", "weapon"],
template: "systems/l5r/templates/item/weapon-sheet.html",
width: 520,
height: 480,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
});
}
getData() {
const sheetData = super.getData();
sheetData.data.dtypes = ["String", "Number", "Boolean"];
sheetData.data.isWeapon = true;
sheetData.data.isEquipment = true;
return sheetData;
}
/**
* Subscribe to events from the sheet.
* @param html HTML content of the sheet.
*/
activateListeners(html) {
super.activateListeners(html);
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
}
/**
* Update item with values from the sheet.
* @param event
* @param formData
*/
_updateObject(event, formData) {
return this.object.update(formData);
}
}