distill icon indicating copy to clipboard operation
distill copied to clipboard

Possible to have a two column-layout?

Open etiennebacher opened this issue 4 years ago • 4 comments

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?

etiennebacher avatar Jan 24 '21 17:01 etiennebacher

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?

jhelvy avatar Mar 05 '21 15:03 jhelvy

@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.

etiennebacher avatar Mar 05 '21 15:03 etiennebacher

Very clever way to generate the html, many thanks!

jhelvy avatar Mar 05 '21 15:03 jhelvy

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

apreshill avatar Jun 11 '21 15:06 apreshill