gadenbuie / xaringanExtra

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

xaringanExtras::style_banner arguments not reflected in slides #188

Closed danswart closed 8 months ago

danswart commented 9 months ago

Dear Mr. Aiden-Buie: From: Dan Swart, danswartcpa@gmail.com

Any help you can offer is greatly appreciated. After I cut and paste your example code banners appear as specified. If I make no attempt to change the style_banner() parameters, banners appear (smaller than I want and I'd like to change colors). If I attempt to change the text_color, or any other parameters in the style_banner() call, the banners go away completely. In the HTML they seem to be 'greyed out.' Strangely, the banners do not appear in either configuration if I include the use_banner() call along with all the other xariganExtras. They do work if I put them in their own code block. I must be doing something wrong! Here is my rmarkdown code from the YAML to the use_banner() call that includes style_banner().


title: .f1.char[It Pays...] .f1[to RENAME skeleton.Rmd file to] subtitle: .f-6.dsb[index.Rmd] author: .f2[by .dsb[Dan Swart,] .i.o[Company Developer]] institute: .f3[("Part of the .i.char[It Pays...]  series")] date: output: xaringan::moon_reader: css: [xaringan-themer.css, swart.css] lib_dir: libs self_contained: true

chakra: libs/remark-latest.min.js

nature:
  slideNumberFormat: "%current%"
  highlightStyle: Base16/Bright
  highlightLines: true
  countIncrementalSlides: false
  ratio: 16:9
pandoc_options:
  latex_engine: xelatex # Use XeLaTeX for better font support
  slide_level: 2 # Control slide levels

classoption: aspectratio=169 # Set aspect ratio for PDF output geometry: margin=1in # Set PDF page margins


class: middle center

library(xaringanthemer) # Custom 'xaringan' CSS Themes 
style_duo_accent(
  colors = c(
    red = "red",
    purple = "#3e2f5b",
    lightpurple = "#DCD0FF",
    lavender = "#967bb6",
    violet = "#8A2BE2",
    periwinkle = "#ccccff",
    orange = "#FF5733", # Orange - Innovation and Excitement
    green = "#136f63", # Teal - Creativity and Growth
    white = "#FFFFFF",
    yellow = "yellow", # Yellow - Optimism and Energy:
    gold = "gold",
    turquoise = "#00C5CD", # Turquoise - Balance and Clarity:
    aquamarine = "#7FFFD4",
    teal = "#2c8475",
    darkgreen = "#006400",
    forestgreen = "forestgreen",
    firebrick = "firebrick",
    lightcoral = "lightcoral",
    black = "black",
    charcoal = "#36454F",
    purple = "#7030A0", # Purple (#7030A0) - Imagination and Open-mindedness
    blue = "#0070C0", #Blue - Persuasion and Trust:
    cornflowerblue = "cornflowerblue",
    deepskyblue = "deepskyblue",
    dodgerblue = "dodgerblue",
    steelblue = "steelblue",
    royalblue = "royalblue"),
  primary_color = "black",  
  secondary_color = "#FFFFFF",
  # secondary_color = "yellow",
  black_color = "#000004",
  white_color = "#FFFFFF",
  base_font_size = "20px",
  text_font_family = "Jost",
  text_font_url = "https://indestructibletype.com/fonts/Jost.css",
  header_font_google = google_font("Roboto Slab", "400", "700"),
  header_font_weight = "400",
  inverse_background_color = "black",
  # inverse_header_color = "#eaeaea",
  inverse_header_color = "#FFFFFF",
  title_slide_text_color = "#FFFFFF",
  text_slide_number_color = "#FFFFFF",
  text_bold_color = "#FF5733",
  code_inline_color = "#FFFFFF",
  code_highlight_color = "transparent",
  link_color = "lightcoral",
  text_color = "#FFFFFF",
  header_color = "#FFFFFF",
  background_color = "black",
  blockquote_left_border_color = "steelblue",
  # table_row_even_background_color = lighten_color("white", 0.9),
  extra_fonts = list(
    "https://indestructibletype.com/fonts/Jost.css",
    google_font("Amatic SC", "400"))

)
####
library(ggplot2) 
library(tibble) 
library(tidyr) 
library(readr) 
library(purrr) 
library(dplyr) 
library(stringr) 
library(forcats) 
library(lubridate) 
####
library(xaringan) 
library(xaringanExtra) 
library(xaringanthemer) 
library(countdown) 
library(htmltools) 
library(htmlwidgets) 
library(here) 
library(knitr) 
library(kableExtra) 
library(DT) 
library(shrtcts) 
library(xaringanmediacalls)
library(renderthis)
xaringanExtra::use_animate_css()
xaringanExtra::use_animate_all("fade")
xaringanExtra::use_clipboard()
xaringanExtra::use_editable(expires = 1)
xaringanExtra::use_extra_styles()
xaringanExtra::use_fit_screen()
xaringanExtra::use_freezeframe()
xaringanExtra::use_panelset()
xaringanExtra::use_progress_bar()
xaringanExtra::use_scribble()
xaringanExtra::use_search()
xaringanExtra::use_share_again()
# xaringanExtra::use_slide_tone()  # not yet a feature I like
xaringanExtra::use_tile_view()
xaringanExtra::use_webcam()
xaringanExtra::use_tachyons()
xaringanExtra::use_banner(
  top_left = "My Awesome Talk Title",
  top_right = "Mr. Fancy Pants",
  bottom_left = "bit.ly/my-awesome-talk",
  exclude = "title-slide",
xaringanExtra::style_banner(
    text_color = NULL,
    background_color = NULL,
    padding_horizontal = NULL,
    padding_vertical = NULL,
    height = NULL,
    width = NULL,
    font_size = NULL,
    font_family = NULL,
    z_index = NULL,
    selector = NULL
  )
)

Thank you.