pietroppeter / nimib

nimib 🐳 - nim 👑 driven ⛵ publishing ✍
https://pietroppeter.github.io/nimib/
MIT License
175 stars 10 forks source link

New nbDetails block? #205

Open neroist opened 1 year ago

neroist commented 1 year ago

It would be cool to have a block using the <summary> and <details> html tags like this:

<details>
  <summary>

      summary

   </summary>

  details
</details>

This could be used in a Q&A section, long blobs of text, etc...

pietroppeter commented 1 year ago

indeed we showed how to produce a simple implementation of that in our latest nimib presentation: https://github.com/pietroppeter/nimconf22-nimib/blob/bb874c6f2d2fcb77c7bd4fbffbe906a8df95ebdc/pietros_slides.nim#L343 (in principle you could see the slides here but I do not know how to link to a specific slides in nimislides).

ideally an improved version would make use of the container block concept (still not available) to support multiple mixed blocks (code + text + images + ...) inside the details.

Not sure if we want already to put the simple implementation inside nimib or not...

neroist commented 1 year ago

The simple implementation looks fine to me!