Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groups in layout are not generated correctly in the HTML #173

Closed
freohr opened this issue Apr 16, 2023 · 2 comments
Closed

Groups in layout are not generated correctly in the HTML #173

freohr opened this issue Apr 16, 2023 · 2 comments

Comments

@freohr
Copy link
Contributor

freohr commented Apr 16, 2023

Hello,

I've been working on creating a statblock layout for 13th Age using this module (I'll check how to submit it as a PR when I'm done 🙂), but I've run into some inconsistencies in how the HTML was organized based in the layout, which made writing the CSS difficult

My issues

  1. [Red block and caption] I've made a first block with the Initiative value and a JS block to concatenate the monster's level, role, size and type, and I wanted to add spacing around this block to mimic the official book stat-blocks.
    • However the generator creates an empty div with the group-container class, then puts the javascript-container and property-container after this div, instead of inside it as childrens.
  2. [Blue block and caption] I've made a group block with 3 traits group (Attack, Abilities and "Nastier Specials") inside it.
    • The HTML is "correctly" generating a group-container with my 3 traits-container inside, but then there are 3 additional traits-container generated just after the group-container and the traits declared in the YAML are put in those instead of the ones inside the group-container

Here's my base layout in the editor in the Obsidian Settings

Screenshot_1_20230416-180202

Here's a screen capture of the generated HTML from the dev-tools

Screenshot_1_20230416-180303-caption

Appendices

In addition, here's a JSON export of the WIP layout that correctly shows the expected grouping (Init + Level, and Attacks + Abilities + Nastiers): https://gist.github.com/freohr/d876ea368dfb7519b6ed91f8e79bc0f4

and here's the YAML I'm currently using as the data for the statblock

```statblock
name: Dire Rat
flavor-text: From age to age, dire rats vary in size. In this age, they’re only half as big as they sometimes get, but they’re also twice as vicious.
level: 1st
role: mook
type: Beast
initiative: \+2
ac: 15
pd: 15
md: 10
hp: 10 (mook)
attack:
    - name: Infected bite +5 vs. AC
      desc: 4 ongoing damage
special:
    - name: Mook
      desc: Kill one rat for every 10 damage inflicted to the mob
nastier-special:
    - name: Squealing pack attack
      desc: This creature gains a +1 attack bonus
```

and the current render (with WIP CSS)

Screenshot_1_20230416-180245

@valentine195
Copy link
Member

Hi, this is an unfortunate side effect of allowing the plugin to cascade items into other columns. Nesting inside groups would mean only the entire group would be allowed to move to a new column.

@freohr
Copy link
Contributor Author

freohr commented Apr 16, 2023

Hi, this is an unfortunate side effect of allowing the plugin to cascade items into other columns. Nesting inside groups would mean only the entire group would be allowed to move to a new column.

I understand. That's unfortunate, but I'll find a way to handle it with CSS selectors. Thank you for your reply 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants