Skip to content

Quarto navbar vs sidebar #325

@zeileis

Description

@zeileis

The standard Quarto web page generated by altdoc mainly relies on the sidebar (on the left side) for the menu. However, Quarto web pages by default use the navbar (at the top) as the main menu. On a wide computer screen this does not make that much of a difference but on a mobile display it does.

As an example consider the menu at https://grantmcdermott.com/tinyplot/ when emulating a mobile device: The most notable menu is the hamburger menu in the top left corner. However, this just contains the GitHub link (left screenshot) and the real content is somewhat hidden in the smaller menu below (right screenshot).

Screenshots of altdoc page for tinyplot, emulating a mobile device

On my other altdoc pages, I work around this by manually configuring the navbar in the YAML file. As an example consider https://gamlss-dev.github.io/gamlss2/ which looks like this on a wide computer screen (left) and an emulated mobile device (right):

Screenshot of altdoc page for gamlss2 on a wide screen Screenshot of altdoc page for gamlss2 on an emulated mobile screen

The YAML is here: https://github.com/gamlss-dev/gamlss2/blob/main/altdoc/quarto_website.yml

I think that this would be a better default layout. And even if it is not the default, it would be nice if altdoc made it easier to work with this. For example by enable altdoc variables like $ALTDOC_MAN_BLOCK in the navbar as well. Currently it is limited to sidebar/contents/section, see: https://github.com/etiennebacher/altdoc/blob/main/R/settings_quarto_website.R#L106-L107

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions