quarto-dev / quarto-cli

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

Include icons and text in navbar #1323

Closed jhelvy closed 2 years ago

jhelvy commented 2 years ago

Perhaps I am missing something, but I am unable to include an icon with text in navbar items.

In a simple rmarkdown site, I can include both icons and text like this:

- text: "Schedule"
  icon: fa fa-calendar-alt
  href: schedule.html

This looks like this when rendered

Screen Shot 2022-06-30 at 9 20 02 AM

In quarto, I can only get an icon or text to render, but not both. Is there a way to do this that I am missing, or is this not supported?

andrewpbray commented 2 years ago

I ran into this same thing. I was able to get icon + text to appear as a dropdown menu item, but not as a top level navbar link, just as in the Quarto website:

Screen Shot 2022-06-30 at 7 13 24 AM
      - text: "Blog"
        href: docs/blog/index.qmd
      - text: "Help"
        menu:
          - text: "Report an Issue"
            icon: "bug"
            href: "https://github.com/quarto-dev/quarto-cli/issues"

Perhaps that's just the way the classes are written in the bootswatch theme?

jhelvy commented 1 year ago

Hi, thanks for including this fix! It works great now.

I just started making a website with a sidebar and noticed that icons aren't supported there. Is that something that could be supported? I don't know if it's a poor design choice (I haven't seen many sites with icons in the sidebar).

dragonstyle commented 1 year ago

It isn't supported now, though it could be. Feel free to open a fresh issue to track this and we'll try to get to it!

jhelvy commented 1 year ago

It isn't supported now, though it could be. Feel free to open a fresh issue to track this and we'll try to get to it!

Thanks! I just opened up a new issue for sidebar icons #3830