via llvm-dev
2019-Sep-12 22:40 UTC
[llvm-dev] Docs: Setting up two-column layout on docs homepage
Quick update. I've decided to scratch the idea of using the raw directive to add html to the docs homepage. I realized today that in order to accomplish what I want (add two-column layout with links to individual topics), I would have to use hyperlinks. That seems undesirable given that it would make it easier to break the URL links if the LLVM docs site were ever moved/updated. I spent a few hours today trying to determine if there was a possible workaround. It doesn't look like there is. So for now I'll continue with my efforts using a single-column layout. -DeForest -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190912/e7279acd/attachment.html>
Michael Spencer via llvm-dev
2019-Sep-12 23:22 UTC
[llvm-dev] Docs: Setting up two-column layout on docs homepage
On Thu, Sep 12, 2019 at 3:40 PM via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Quick update. I've decided to scratch the idea of using the raw directive > to add html to the docs homepage. I realized today that in order to > accomplish what I want (add two-column layout with links to individual > topics), I would have to use hyperlinks. That seems undesirable given that > it would make it easier to break the URL links if the LLVM docs site were > ever moved/updated. > > I spent a few hours today trying to determine if there was a possible > workaround. It doesn't look like there is. So for now I'll continue with my > efforts using a single-column layout. > > -DeForest >Can you not use css for this? div.body { column-count: 2; } You'll need some other cleanups to make it pretty, but it works. There's also flexbox and grid stuff you can do. Flexbox works on all modern browsers, and grid works on the major 4. - Michael Spencer -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190912/aae563a0/attachment.html>
via llvm-dev
2019-Sep-13 10:33 UTC
[llvm-dev] Docs: Setting up two-column layout on docs homepage
Thanks for the suggestion, I don't know why it didn't occur to me to just modify the existing CSS. I guess I'm still getting up to speed as to what I can do with Sphinx. Setting the column count on div.body doesn't quite work... but setting it on dl.docutils does. Of course, if I do that, I'm setting two columns on all sections. Which wasn't my original intention (to set two columns for all sections), but I can definitely work with it as a compromise. The Reference section is a good example of what I'm trying to accomplish. The section would be titled 'Reference' and would have a brief introductory sentence. Below that would be two sub-sections w/links, displayed in a two-column format: one column for LLVM Reference and another for API Reference. I haven't used Flexbox before so I'll be sure to check it out. -DeForest On Thu, Sep 12, 2019 at 5:29 PM Michael Spencer <bigcheesegs at gmail.com> wrote:> On Thu, Sep 12, 2019 at 3:40 PM via llvm-dev <llvm-dev at lists.llvm.org> > wrote: > >> Quick update. I've decided to scratch the idea of using the raw directive >> to add html to the docs homepage. I realized today that in order to >> accomplish what I want (add two-column layout with links to individual >> topics), I would have to use hyperlinks. That seems undesirable given that >> it would make it easier to break the URL links if the LLVM docs site were >> ever moved/updated. >> >> I spent a few hours today trying to determine if there was a possible >> workaround. It doesn't look like there is. So for now I'll continue with my >> efforts using a single-column layout. >> >> -DeForest >> > > Can you not use css for this? > > div.body { > column-count: 2; > } > > You'll need some other cleanups to make it pretty, but it works. There's > also flexbox and grid stuff you can do. Flexbox works on all modern > browsers, and grid works on the major 4. > > - Michael Spencer >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190913/7881b58c/attachment.html>