Skip to content

Tabset linking back to first page of presentation? #1574

@giabaio

Description

@giabaio

Hi all,
I'm working on a relatively heavily customized template for a qmd revealjs presentation (see here). I think I managed to make things work more or less like I want (there's a slight issue with the logo in the version I'm sharing --- I don't understand why... But it works OK everywhere else I used it so that's not the problem).

The problem I can see with tabset is that if I use the code

include-after: |
    <style>
    .logo {
      background-image: url("assets/images/UCL-stats.png");
      background-size: 14% 7%;
      background-repeat: no-repeat;
      position: absolute;
      top:  1.9%; /* 2.65%em */
      left: 86%;
      height: 100%;
      width: 100%;
      z-index: 20; !default
    }
    </style>

    <script>
    document.querySelectorAll(
      'section.slide.level2:not(section.slide.level2.title-slide.center):not(section.slide.level2.nobar)'
    )
    .forEach(el => {
      el.innerHTML += '<div class="logo"></div>';
    });
    </script>

in my yaml, which is used to add the logo to the top-right of each slide, then, when I view the presentation on my browser (Firefox), clicking on either of the two tabs brings me back to the title page. If I remove the code above, then the tabset works OK and clicking on the tabset's title moves from one to the other.

The other slight issue (not sure whether I'm missing something obvious here, though) is whether you can use the keyboard arrows to navigate through tabsets? (I come from xaringan and there you can do that so I wondered whether that's a feature that is possible under qmd too?).

Many thanks!
Gianluca

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrevealjsIssues with the revealjs formattabsets

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions