FreesearchR/R/theme.R

37 lines
1.3 KiB
R
Raw Normal View History

2024-12-18 10:37:37 +01:00
#' Custom theme based on unity
#'
#' @param ... everything passed on to bslib::bs_theme()
#'
#' @returns theme list
#' @export
2024-12-19 11:32:32 +01:00
custom_theme <- function(...,
version = 5,
primary = "#1E4A8F",
secondary = "#FF6F61",
2025-01-16 12:23:39 +01:00
bootswatch = "united",
base_font = bslib::font_google("Montserrat"),
heading_font = bslib::font_google("Public Sans",wght = "700"),
code_font = bslib::font_google("Open Sans")
2024-12-19 11:32:32 +01:00
# success = "#1E4A8F",
# info = ,
# warning = ,
# danger = ,
# fg = "#000",
# bg="#fff",
# base_font = bslib::font_google("Alice"),
# heading_font = bslib::font_google("Jost", wght = "800"),
# heading_font = bslib::font_google("Noto Serif"),
# heading_font = bslib::font_google("Alice"),
2025-01-16 12:23:39 +01:00
){
2024-12-18 10:37:37 +01:00
bslib::bs_theme(
...,
2024-12-19 11:32:32 +01:00
version = version,
primary = primary,
secondary = secondary,
bootswatch = bootswatch,
base_font = base_font,
heading_font = heading_font,
code_font = code_font
2024-12-18 10:37:37 +01:00
)
}