rstudio / distill

Distill for R Markdown
https://rstudio.github.io/distill/
Apache License 2.0
422 stars 57 forks source link

Possible to have a two column-layout? #299

Open etiennebacher opened 3 years ago

etiennebacher commented 3 years ago

Hi, thanks for this nice package!

I'm trying to reproduce my blogdown website (Academic theme) with distill, and I am wondering if it is possible to have a two-column-layout. More specifically, I have a "Projects" tab and I would prefer displaying each project/package as cards on two (or more) columns, rather than as a list of posts/articles.

I can make a solution a bit hacky with raw HTML but I would prefer having a more robust way to do that. Is it something that will be implemented?

jhelvy commented 3 years ago

I'm trying to do the same thing, but I can't seem to even get this to work with raw html. Can you show how you've done it with html?

etiennebacher commented 3 years ago

@jhelvy I turned my raw html in two small functions that you can see here. I used these two functions here. The CSS for the cards is here. However, I couldn't find how to create more than two columns.

jhelvy commented 3 years ago

Very clever way to generate the html, many thanks!

apreshill commented 3 years ago

Noting here: one possible solution here is to offer a different listing page layout. The default is a simple list, but another layout option could be grid (with 2 columns, since we'll still have the right sidebar). Something like list-grid from the Hugo Apéro theme: https://hugo-apero-docs.netlify.app/start/section-config/#lists-of-pages