internalised the create_column function from datamods for ui modifications - all variable icons are the same throughout now - added custom css

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-24 12:53:37 +02:00
commit 6a43ba7b5b
No known key found for this signature in database
12 changed files with 1322 additions and 23 deletions

View file

@ -10,7 +10,7 @@ custom_theme <- function(...,
secondary = "#FF6F61",
bootswatch = "united",
base_font = bslib::font_google("Montserrat"),
heading_font = bslib::font_google("Public Sans",wght = "700"),
heading_font = bslib::font_google("Public Sans", wght = "700"),
code_font = bslib::font_google("Open Sans")
# success = "#1E4A8F",
# info = ,
@ -22,7 +22,7 @@ custom_theme <- function(...,
# heading_font = bslib::font_google("Jost", wght = "800"),
# heading_font = bslib::font_google("Noto Serif"),
# heading_font = bslib::font_google("Alice"),
){
) {
bslib::bs_theme(
...,
"navbar-bg" = primary,
@ -36,6 +36,16 @@ custom_theme <- function(...,
)
}
compliment_colors <- function() {
c(
"#00C896",
"#FFB100",
"#8A4FFF",
"#11A0EC"
)
}
#' GGplot default theme for plotting in Shiny
#'
@ -44,16 +54,16 @@ custom_theme <- function(...,
#' @returns ggplot object
#' @export
#'
gg_theme_shiny <- function(){
ggplot2::theme(
axis.title = ggplot2::element_text(size = 18),
axis.text = ggplot2::element_text(size = 14),
strip.text = ggplot2::element_text(size = 14),
legend.title = ggplot2::element_text(size = 18),
legend.text = ggplot2::element_text(size = 14),
plot.title = ggplot2::element_text(size = 24),
plot.subtitle = ggplot2::element_text(size = 18)
)
gg_theme_shiny <- function() {
ggplot2::theme(
axis.title = ggplot2::element_text(size = 18),
axis.text = ggplot2::element_text(size = 14),
strip.text = ggplot2::element_text(size = 14),
legend.title = ggplot2::element_text(size = 18),
legend.text = ggplot2::element_text(size = 14),
plot.title = ggplot2::element_text(size = 24),
plot.subtitle = ggplot2::element_text(size = 18)
)
}
@ -64,12 +74,12 @@ gg_theme_shiny <- function(){
#' @returns ggplot object
#' @export
#'
gg_theme_export <- function(){
ggplot2::theme(
axis.title = ggplot2::element_text(size = 18),
axis.text.x = ggplot2::element_text(size = 14),
legend.title = ggplot2::element_text(size = 18),
legend.text = ggplot2::element_text(size = 14),
plot.title = ggplot2::element_text(size = 24)
)
gg_theme_export <- function() {
ggplot2::theme(
axis.title = ggplot2::element_text(size = 18),
axis.text.x = ggplot2::element_text(size = 14),
legend.title = ggplot2::element_text(size = 18),
legend.text = ggplot2::element_text(size = 14),
plot.title = ggplot2::element_text(size = 24)
)
}