diff --git a/package.json b/package.json index 88da6b1..44dcd09 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "private": true, "type": "module", "scripts": { - "dev": "vite build --watch", - "build": "vite build", + "build": "sass src/styles/M6.scss dist/M6.css --style=expanded --no-source-map", + "watch": "sass src/styles/M6.scss dist/M6.css --style=expanded --source-map --watch", "typecheck": "tsc --noEmit", "lint": "eslint .", "lint:fix": "eslint . --fix", diff --git a/src/assets/svg/plain-square.svg b/src/assets/svg/plain-square.svg new file mode 100644 index 0000000..6fc3dae --- /dev/null +++ b/src/assets/svg/plain-square.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/sheets/character-sheet.mjs b/src/sheets/character-sheet.mjs index b3a83cc..b0cdaf5 100644 --- a/src/sheets/character-sheet.mjs +++ b/src/sheets/character-sheet.mjs @@ -54,15 +54,15 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe /** @inheritdoc */ static PARTS = { + tabs: { + template: systemPath("templates/actor/nav.hbs") + }, header: { template: systemPath("templates/actor/header.hbs") }, stats: { template: systemPath("templates/actor/stats.hbs") }, - tabs: { - template: "templates/generic/tab-navigation.hbs" - }, properties: { template: systemPath("templates/shared/properties.hbs"), scrollable: [""] @@ -111,6 +111,7 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe /** @inheritdoc */ async _preparePartContext(partId, context) { + console.warn(context); switch (partId) { case "stats": context.fields = await this._getResources(); @@ -198,7 +199,6 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe fieldSets.push({ outer: { field, value: foundry.utils.getProperty(source, path) } }); } } - console.warn(fieldSets); return fieldSets; } diff --git a/M6.css b/src/styles/M6.scss similarity index 60% rename from M6.css rename to src/styles/M6.scss index ede0539..ce0e84c 100644 --- a/M6.css +++ b/src/styles/M6.scss @@ -4,9 +4,13 @@ --M6-background-white: #fdfeff; --M6-text-grey: #595d5f; --M6-text-brown: #be7742; + --mask-square: url("src/assets/svg/plain-square.svg"); } -.application.sheet.M6 { - background-color: var(--M6-background-grey); +.application { + overflow: visible; +} +.application.sheet.M6.actor.character { + background-color: var(--M6-background-white); color: var(--M6-text-grey); section { @@ -14,9 +18,9 @@ margin-top: 8px; img { position: absolute; - top: 8px; - left: 44%; - background-color: var(--M6-background-grey); + top: 24px; + left: calc(50% - 50px); + background-color: var(--M6-background-white); &:hover { cursor: pointer; } @@ -27,6 +31,15 @@ border: none; } } + div { + padding: 8px; + background-color: var(--M6-background-grey); + } + } + &.window-content { + backdrop-filter: blur(0rem); + overflow: visible; + min-height: 0; } } input { @@ -37,6 +50,7 @@ max-width: 2rem; text-align: center; margin-left: 0.5rem; + height: 24px; } &.attribut { max-width: 2rem; @@ -55,16 +69,73 @@ } } fieldset { - background-color: var(--M6-background-brown); + background-color: var(--M6-background-grey); legend { color: var(--M6-text-brown); + font-size: 24px; } + gap: 0px; + } + + .tabs { + background-color: var(--M6-background-grey); + .sheet-stack { + display: flex; + flex-direction: column; + align-items: center; + color: var(--M6-text-grey); + div { + .container { + position: relative; + text-align: center; + } + &.active { + width: 38px; + height: 36px; + text-shadow: 0 0 10px var(--M6-text-brown); + } + &.background { + position: absolute; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + mask: var(--mask-square) no-repeat center; + background-color: var(--M6-background-grey); + } + &.border { + position: absolute; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + background-color: var(--M6-background-grey); + mask: var(--mask-square) no-repeat center; + } + span { + &.value { + position: relative; + font-family: var(--cosmere-font-header); + font-weight: 600; + color: var(--M6-text-brown); + z-index: 1; + } + } + } + } + border: none; + position: absolute; + flex-direction: column; + align-items: flex-start; + gap: 0.625rem; + left: calc(100% + 3px); + top: 20%; } .sheet-header { img { border-radius: 0 0 50% 50%; - border: solid 16px var(--M6-background-grey); + border: solid 8px var(--M6-background-grey); border-top: none; flex: 0 0 100px; object-fit: fill; @@ -138,7 +209,7 @@ } .application.dialog { - background-color: var(--M6-background-grey); + background-color: var(--M6-background-white); color: var(--M6-text-grey); section { @@ -172,9 +243,10 @@ } } fieldset { - background-color: var(--M6-background-brown); + background-color: var(--M6-background-grey); legend { color: var(--M6-text-brown); + font-size: 20px; } } i { diff --git a/src/templates/actor/nav.hbs b/src/templates/actor/nav.hbs new file mode 100644 index 0000000..41ef669 --- /dev/null +++ b/src/templates/actor/nav.hbs @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/style.css b/style.css deleted file mode 100644 index 85ad3c9..0000000 --- a/style.css +++ /dev/null @@ -1,103 +0,0 @@ -.application.sheet.M6.actor.character { - background-color: red; - - section { - > .sheet-header { - } - } -} - -input { - color: green; - background-color: green; -} - -.application.sheet.M6 { - max-height: 90%; - - &.actor, - &.item { - .window-content { - padding-top: 0; - } - } - - .sheet-header { - background-color: red; - color: red; - img { - border: none; - flex: 0 0 100px; - object-fit: contain; - } - input[name="name"] { - height: 2.5em; - font-size: 2rem; - } - } - .tab { - height: 100%; - padding-top: 10px; - } - .tab[data-tab="items"] { - ul { - list-style: none; - padding-left: 5px; - } - .itemHeader { - border-bottom: 1px solid var(--color-border-light-primary); - .type-label { - font-size: 20px; - } - .document-controls { - flex: 0 0 100px; - } - } - .item { - img { - border: none; - flex: 0 0 30px; - padding-right: 5px; - } - .document-controls { - flex: 0 0 50px; - } - } - } - .tab[data-tab="effects"] { - ul { - list-style: none; - padding-left: 5px; - margin-top: 0; - margin-bottom: 0; - } - .effects-header { - font-size: 16px; - border-bottom: 1px solid var(--color-border-light-primary); - .document-controls { - flex: 0 0 100px; - } - } - .effect { - .effect-label { - img { - border: none; - flex: 0 0 30px; - padding-right: 5px; - } - .effect-name { - line-height: 24px; - } - } - .effect-duration { - flex: 0 0 130px; - } - .document-controls { - flex: 0 0 80px; - } - } - .effect-label { - flex: 2; - } - } -} diff --git a/system.json b/system.json index 1948dcd..cc09bfa 100644 --- a/system.json +++ b/system.json @@ -8,12 +8,12 @@ "authors": [ { "name": "Byroks", - "url": "https://git.byroks.com", + "url": "https://git.byroks.de", "flags": {} } ], "esmodules": ["dist/system.mjs"], - "styles": ["dist/style.css", "M6.css"], + "styles": ["dist/M6.css"], "languages": [ { "lang": "de", @@ -48,8 +48,8 @@ }, "flags": { "hotReload": { - "extensions": ["css", "html", "hbs", "json"], - "paths": ["M6.css", "templates", "lang"] + "extensions": ["scss", "html", "hbs", "json"], + "paths": ["src/styles/M6.scss", "templates", "lang", "src"] } } }