denehyg / reveal.js-menu

Slide out menu for reveal.js
https://denehyg.github.io/reveal.js-menu
MIT License
281 stars 76 forks source link

fontawesome icons in slide list titles? #95

Closed kbvernon closed 1 year ago

kbvernon commented 1 year ago

Would it be possible to include fontawesome and other icons in slide list titles? Currently, they are being ignored. I believe this is because they are introduced as <i> tags without any text. So, they get rendered on the slide, but not in the menu.

<html>
    <head>
        <link href="libs/revealjs/dist/reveal.css" rel="stylesheet" >
        <link href="libs/fontawesome6-0.1.0/all.css" rel="stylesheet">
        <link href="libs/revealjs/plugin/reveal-menu/menu.css" rel="stylesheet">
    </head>
    <body>
        <div class="reveal">
          <div class="slides">
            <section>
              <h1>Slide 1</h1>
            </section>
            <section>
              <h1>Slide 2 <i class="fa-brands fa-r-project fa-"></i></h1>
            </section>
          </div>
        </div>
        <script src="libs/revealjs/dist/reveal.js"></script>
        <script src="libs/revealjs/plugin/reveal-menu/menu.js"></script>
        <script>
          Reveal.initialize({
            'menu': {
              "side":"left",
              "loadIcons":false,
              "openButton":true
            },
            plugins: [ RevealMenu ]
          });
        </script>
     </body>
</html>

Output:

image

I'm coming from Quarto and R, so I'm not that familiar with JS (sorry). Here's an issue I raised on the Quarto side: #3950

kbvernon commented 1 year ago

doesn't look like this is supported anymore...