diff --git a/module/handlebars.mjs b/module/handlebars.mjs index a5a2ab3..de34f62 100644 --- a/module/handlebars.mjs +++ b/module/handlebars.mjs @@ -31,6 +31,12 @@ export const partials = [ `actors/char-sheet/v2/partials/inventory/items/aspect.v2.pc.hbs`, `actors/char-sheet/v2/partials/inventory/items/weapon.v2.pc.hbs`, `actors/char-sheet/v2/partials/inventory/items/pet.v2.pc.hbs`, + + // The v2 Untyped sheet partials + `items/untyped/v2/tabs/general.v2.untyped.hbs`, + `items/untyped/v2/tabs/details.v2.untyped.hbs`, + `items/untyped/v2/tabs/effects.v2.untyped.hbs`, + `items/untyped/v2/tabs/settings.v2.untyped.hbs`, ]; export const preAliasedPartials = { diff --git a/module/sheets/Items/UntypedItemSheet.mjs b/module/sheets/Items/UntypedItemSheet.mjs index f1562c9..895f8b1 100644 --- a/module/sheets/Items/UntypedItemSheet.mjs +++ b/module/sheets/Items/UntypedItemSheet.mjs @@ -5,17 +5,30 @@ export class UntypedItemSheet extends GenericItemSheet { let opts = mergeObject( super.defaultOptions, { - template: `systems/dotdungeon/templates/items/custom.hbs`, - width: 280, + template: `systems/dotdungeon/templates/items/untyped/v2/index.hbs`, + width: 300, height: 340, + tabs: [ + { + group: `page`, + navSelector: `nav.page`, + contentSelector: `.page-content`, + initial: `general`, + }, + ], } ); - opts.classes.push(`dotdungeon`); + opts.classes.push(`dotdungeon`, `style-v3`); return opts; }; async getData() { const ctx = await super.getData(); + + ctx.computed = { + showSettingsTab: ctx.isGM || this.item.isOwned, + }; + return ctx; }; }; diff --git a/styles/v3/elements/nav.scss b/styles/v3/elements/nav.scss new file mode 100644 index 0000000..b1bb248 --- /dev/null +++ b/styles/v3/elements/nav.scss @@ -0,0 +1,11 @@ +@use "../mixins/material" as material; + +.dotdungeon.style-v3 > .window-content { + nav { + display: flex; + flex-direction: row; + overflow-x: auto; + gap: 8px; + padding: 8px; + } +} diff --git a/styles/v3/index.scss b/styles/v3/index.scss index 2ccd28d..66eb9f2 100644 --- a/styles/v3/index.scss +++ b/styles/v3/index.scss @@ -1,11 +1,17 @@ +/* Themes */ +@use "./themes/material.css"; +@use "./themes/dark.css"; + /* Element-Styling */ @use "./elements/button.scss"; @use "./elements/headers.scss"; @use "./elements/hr.scss"; @use "./elements/icons.scss"; +@use "./elements/nav.scss"; /* Sheet Layouts */ @use "./layouts/datasheet.scss"; +@use "./layouts/items/untyped.scss"; /* Sheet Options */ .dotdungeon.style-v3 { @@ -26,6 +32,8 @@ > .window-content { padding: 0; + background: var(--sheet); + color: var(--on-sheet); .debug-data { opacity: 60%; diff --git a/styles/v3/layouts/items/untyped.scss b/styles/v3/layouts/items/untyped.scss new file mode 100644 index 0000000..f4c017d --- /dev/null +++ b/styles/v3/layouts/items/untyped.scss @@ -0,0 +1,23 @@ +@use "../../mixins/material"; + +.dotdungeon.style-v3 .item--untyped { + .nav-bar { + @include material.elevate(8); + position: absolute; + bottom: 0; + left: 0; + right: 6px; + + nav { + display: flex; + flex-direction: row; + gap: 8px; + padding: 8px; + } + } + + .page-content { + padding: 8px; + height: 100%; + } +} \ No newline at end of file diff --git a/styles/v3/themes/dark.css b/styles/v3/themes/dark.css new file mode 100644 index 0000000..a5cbc65 --- /dev/null +++ b/styles/v3/themes/dark.css @@ -0,0 +1,7 @@ +.dotdungeon.style-v3 { + --sheet: #0a0a0a; + --on-sheet: white; + + --surface: #121212; + --on-surface: white; +} diff --git a/styles/v3/themes/material.css b/styles/v3/themes/material.css new file mode 100644 index 0000000..7c934dc --- /dev/null +++ b/styles/v3/themes/material.css @@ -0,0 +1,27 @@ +/* +These CSS variables are all used in order to try following Material design as +best as I can. +*/ + +.dotdungeon.style-v3 { + --elevation-0dp-bg: var(--surface); + --elevation-0dp-text: var(--on-surface); + --elevation-1dp-bg: color-mix(in lab, transparent, white 5%); + --elevation-1dp-text: white; + --elevation-2dp-bg: color-mix(in lab, transparent, white 7%); + --elevation-2dp-text: white; + --elevation-3dp-bg: color-mix(in lab, transparent, white 8%); + --elevation-3dp-text: white; + --elevation-4dp-bg: color-mix(in lab, transparent, white 9%); + --elevation-4dp-text: white; + --elevation-6dp-bg: color-mix(in lab, transparent, white 11%); + --elevation-6dp-text: white; + --elevation-8dp-bg: color-mix(in lab, transparent, white 12%); + --elevation-8dp-text: white; + --elevation-12dp-bg: color-mix(in lab, transparent, white 14%); + --elevation-12dp-text: white; + --elevation-16dp-bg: color-mix(in lab, transparent, white 15%); + --elevation-16dp-text: white; + --elevation-24dp-bg: color-mix(in lab, transparent, white 16%); + --elevation-24dp-text: white; +} \ No newline at end of file diff --git a/templates/items/untyped/v2/index.hbs b/templates/items/untyped/v2/index.hbs new file mode 100644 index 0000000..d683e8b --- /dev/null +++ b/templates/items/untyped/v2/index.hbs @@ -0,0 +1,21 @@ +
diff --git a/templates/items/untyped/v2/tabs/details.v2.untyped.hbs b/templates/items/untyped/v2/tabs/details.v2.untyped.hbs new file mode 100644 index 0000000..d238b3d --- /dev/null +++ b/templates/items/untyped/v2/tabs/details.v2.untyped.hbs @@ -0,0 +1,3 @@ +