diff --git a/styles/root.scss b/styles/root.scss index 9d91d69..ac65ff7 100644 --- a/styles/root.scss +++ b/styles/root.scss @@ -12,7 +12,7 @@ @use "./sheets/partials/panel.scss"; @use "./sheets/actor/mvp.scss"; -@use "./sheets/actor/mob.scss"; +@use "./sheets/actor/mob/mob.scss"; @use "./sheets/actor/sync/basic.scss"; @use "./sheets/items/aspect.scss"; @use "./sheets/items/spell.scss"; diff --git a/styles/sheets/actor/mob.scss b/styles/sheets/actor/mob.scss deleted file mode 100644 index 79cd140..0000000 --- a/styles/sheets/actor/mob.scss +++ /dev/null @@ -1,10 +0,0 @@ -@use "../../vars" as *; - -.dotdungeon .actor--mob { - padding: 4px; - - textarea { - width: 100%; - resize: vertical; - } -} \ No newline at end of file diff --git a/styles/sheets/actor/mob/avatar.scss b/styles/sheets/actor/mob/avatar.scss new file mode 100644 index 0000000..9863e1a --- /dev/null +++ b/styles/sheets/actor/mob/avatar.scss @@ -0,0 +1,4 @@ +@mixin avatar { + grid-area: avatar; + background: yellowgreen +} \ No newline at end of file diff --git a/styles/sheets/actor/mob/mob.scss b/styles/sheets/actor/mob/mob.scss new file mode 100644 index 0000000..62c1f3b --- /dev/null +++ b/styles/sheets/actor/mob/mob.scss @@ -0,0 +1,119 @@ +@use "../../../vars" as *; +@use "avatar" as *; + +.dotdungeon .actor--mob { + --gap: 8px; + --avatar-size: 80px; + --row-height: calc((var(--avatar-size) - var(--gap)) / 2); + padding: var(--gap); + display: grid; + grid-template-columns: var(--avatar-size) 1fr 1fr; + grid-template-rows: repeat(6, var(--row-height)) minmax(var(--row-height), 1fr); + gap: var(--gap); + grid-template-areas: + "avatar . ." + "avatar . ." + "dice . ." + "dice . ." + "dice . ." + "dice stunts stunts" + "dice stunts stunts"; + + label, .dice { + border: 2px solid black; + border-radius: 4px; + gap: 4px; + padding: 4px; + } + + input.masked { + border: 2px solid black; + background: none; + box-shadow: none; + &:focus { + transform: scale(102%); + } + } + + label.mask-input { + display: flex; + flex-direction: row; + align-items: center; + transition: all ease-in-out 50ms; + + &:focus-within { + transform: scale(102%); + } + + input { + text-align: right; + border: none; + background: none; + &:focus, &:focus-visible { + box-shadow: none; + } + } + + input.left { + text-align: left; + } + } + + .wide { + grid-column: span 2; + } + + +// Area-specific stylings + + .name { + height: 100%; + font-size: 1.5rem; + input { + height: 100%; + } + } + + .dice { + grid-area: dice; + display: flex; + flex-direction: column; + + .die { + display: flex; + flex-direction: row; + width: 100%; + border: 2px solid black; + border-radius: 4px; + + .formula { + flex-grow: 1; + align-self: center; + } + } + } + + .stunts { + grid-area: stunts; + display: flex; + flex-direction: column; + transition: all ease-in-out 50ms; + + &:focus-within { + transform: scale(102%); + } + + textarea { + flex-grow: 1; + resize: none; + border: none; + box-shadow: none; + background: none; + } + } + + .avatar { + @include avatar; + border-radius: 4px; + } +} \ No newline at end of file diff --git a/templates/actors/mobs/main.hbs b/templates/actors/mobs/main.hbs index 222318e..3dedb74 100644 --- a/templates/actors/mobs/main.hbs +++ b/templates/actors/mobs/main.hbs @@ -1,77 +1,79 @@
-

- - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- - + class="name wide masked" + name="name" + value="{{actor.name}}" + > + + +
+ Dice: + + + +
+ +
+ + + + +
\ No newline at end of file