quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.88k stars 318 forks source link

Expand the web site, then move to the left side #1137

Open eitsupi opened 2 years ago

eitsupi commented 2 years ago

Bug description

When I widen the browser, the page follows the left side instead of being centered as shown in the attached screenshot. I do not understand under what conditions this occurs, as it does not happen in my other projects.

image

Source: https://github.com/rocker-org/website/blob/9e36976f182639fefb1921cb472b5410e17c2fbc/images/index.md

$ quarto check

[✓] Checking Quarto installation......OK
      Version: 0.9.577
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      Path: /usr/bin/python3
      Jupyter: 4.10.0
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.0
      Path: /usr/local/lib/R
      LibPaths:
        - /usr/local/lib/R/site-library
        - /usr/local/lib/R/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK

Checklist

dragonstyle commented 2 years ago

So the sidebar in _quarto.yml has the style style: docked, which does dock the sidebar to the left side. You could switch this to style: floating and the content will float to the center with the sidebar following it towards the center. Only pages with sidebars are getting the 'docked' treatment- we found that even in websites with docked sidebars, if you ended up on a page without a sidebar, it didn't look great to have the content floating the left side when no sidebar was present...

eitsupi commented 2 years ago

So the sidebar in _quarto.yml has the style style: docked, which does dock the sidebar to the left side. You could switch this to style: floating and the content will float to the center with the sidebar following it towards the center.

Thank you for your prompt attention. I had forgotten I had done this setup. I will change this to style: floating for now to get around it.

dragonstyle commented 2 years ago

Right now, we believe that this is by design- perhaps it is worth more discussion, but we found pages without a sidebar seemed a little unusual looking when the content was either pushed all the way to the left or pushed to the position it would be if the sidebar were present.