nuejs / nue

A content first web framework. Perfect for UX developers.
https://nuejs.org
MIT License
5.86k stars 171 forks source link

"draw_sections: true" results in nested sections #264

Closed Jehu closed 1 month ago

Jehu commented 1 month ago

I would expect that this takes effect only if there is no section inside of the content. But when enabled the existing sections get nested inside another section

tipiirai commented 1 month ago

So draw_sections: false is not working as expected?

Jehu commented 1 month ago

Okay, this is working. I am a bit confused how nuejs renders boxes as sections automatically. I would prefer to render them as div instead because usually i am using sections as direct children of main only.

tipiirai commented 1 month ago

I really like the idea of using sections as direct children of main only. Makes a lot of sense. I might copy that pattern. Is there any reference to that pattern out there? How do you use the article tag?

Jehu commented 1 month ago

I use section Tag if it's a section of relatet Content. Usually with a starting H2 Tag in it. A Landingpage would have multiple sections. I try to prevent nesting of sections. I am using thearticle tag when it makes sense semantically. This could be a list of blog teasers (each is an article) and the post content on the detail page is wrapped in an article tag as well (maybe with a header and footer if nescessary) . For landing pages i do not use the articletag.

I would reference this page: https://www.w3schools.com/html/html5_semantic_elements.asp as a starting point.

tipiirai commented 1 month ago

Thanks. I'm kind of in a same situation semantially. I was hoping you'd have some very strict working rules that you've found beneficial when structuring content, layout, and CSS. I mean the help on the W3 schools doc does not get me very far:

you will find HTML pages with <section> elements containing <article> elements, and <article> elements containing <section> elements.