gadenbuie / xaringanExtra

:ferris_wheel: A playground of enhancements and extensions for xaringan slides.
https://pkg.garrickadenbuie.com/xaringanExtra
Other
448 stars 36 forks source link

`use_logo(exclude_class = )` for partial classes #79

Closed pat-s closed 3 years ago

pat-s commented 3 years ago

Hi Garrick,

after a long time I finally dive into {xaringanExtra} - blown away after the first minutes 🚀

I noticed a little glitch in use_logo(): When specifying partial classes only in the exclude_class argument, these are not honored. For example to include the logo in the title slide, I set exclude_class = c("inverse", "hide_logo")) but the logo did not appear on the title slide.

Instead, exclude_class = NULL worked. But this then also applies to the other two classes for which the logo should not appear.

I haven't looked into the code yet so check what is going on due to time constraints but I wanted to drop this issue at the very least :)

gadenbuie commented 3 years ago

Thank @pat-s, I'm glad to hear you're enjoying xaringanExtra!

If you're using the default settings in xaringan, the title slide gets both .title-slide and .inverse classes. The exclude_class argument would still cause the logo not to appear on the title if you remove .title-slide but not the .inverse class. You can customize nature: titleSlideClass in your slides YAML header if you want to remove the .inverse class from the title slide.

gadenbuie commented 3 years ago

Another approach: you can set exclude_class = NULL and then manually hide the logo from any slides by giving them a .hide_logo class.

pat-s commented 3 years ago

Ah yeah! I remember the two-class assignments back from my xaringan hacking days.

Thanks for outlining all the solutions, this might also be helpful for future readers.

pat-s commented 3 years ago

Adding only class: .hide_logo has no effect with exclude_class = NULL.

I now use exclude_class = "hide_logo" and then class: hide_logo for the specific slide.