feat: prepared for local fonts. not really working.

This commit is contained in:
Andreas Gammelgaard Damsbo 2026-03-02 20:22:09 +01:00
commit fe1609b4f6
No known key found for this signature in database
39 changed files with 215 additions and 77 deletions

View file

@ -6,6 +6,7 @@ S3method(cut_var,factor)
S3method(cut_var,hms) S3method(cut_var,hms)
S3method(plot,tbl_regression) S3method(plot,tbl_regression)
export(FreesearchR_palette) export(FreesearchR_palette)
export(FreesearchR_theme)
export(add_class_icon) export(add_class_icon)
export(add_sparkline) export(add_sparkline)
export(align_axes) export(align_axes)
@ -30,7 +31,6 @@ export(create_column_ui)
export(create_log_tics) export(create_log_tics)
export(create_overview_datagrid) export(create_overview_datagrid)
export(create_plot) export(create_plot)
export(custom_theme)
export(cut_methods) export(cut_methods)
export(cut_var) export(cut_var)
export(cut_variable_server) export(cut_variable_server)

View file

@ -1,6 +1,6 @@
# FreesearchR 26.3.1 # FreesearchR 26.3.1
*FIX* Include font files for static loading without dependency on Google. *FIX* ~~Include font files for static loading without dependency on Google.~~ Kept webfonts from google as local fonts are not working for now.
*NEW* Updated text strings to better reflect environment data availability. *NEW* Updated text strings to better reflect environment data availability.

View file

@ -1 +1 @@
hosted_version <- function()'v26.3.1-260228' hosted_version <- function()'v26.3.1-260302'

Binary file not shown.

View file

@ -4,26 +4,68 @@
#' #'
#' @returns theme list #' @returns theme list
#' @export #' @export
custom_theme <- function(..., #'
#' @examples
#' if (interactive()) {
#' bs_theme_preview(FreesearchR_theme)
#' }
#'
FreesearchR_theme <- function(...,
version = 5, version = 5,
primary = FreesearchR_colors("primary"), primary = FreesearchR_colors("primary"),
secondary = FreesearchR_colors("secondary"), secondary = FreesearchR_colors("secondary"),
bootswatch = "united", bootswatch = "united",
# base_font = bslib::font_google("Montserrat"), base_font = bslib::font_google("Montserrat"),
base_font = bslib::font_face( # base_font = bslib::font_face(
family = "Montserrat", # family = "Montserrat",
src = "url('/fonts/Montserrat-Regular.ttf') format('truetype')" # src = "url('/fonts/Montserrat-VariableFont_wght.ttf') format('truetype')"
), # ),
# heading_font = bslib::font_google("Public Sans", wght = "700"), # base_font = bslib::font_face(
heading_font = bslib::font_face( # family = "Montserrat",
family = "PublicSans", # src = list(
src = "url('/fonts/PublicSans-Bold.ttf') format('truetype')" # file = c(
), # "fonts/montserrat/regular.ttf",
# code_font = bslib::font_google("Open Sans"), # # "fonts/montserrat/italic.ttf",
code_font = bslib::font_face( # "fonts/montserrat/bold.ttf"
family = "OpenSans", # # "fonts/montserrat/bolditalic.ttf"
src = "url('/fonts/OpenSans-Regular.ttf') format('truetype')" # )
), # ),
# weight = c(400, 700)
# ),
heading_font = bslib::font_google("Public Sans", wght = "700"),
# heading_font = bslib::font_face(
# family = "PublicSans",
# src = "url('/fonts/PublicSans-VariableFont_wght.ttf') format('truetype')"
# ),
# heading_font = bslib::font_face(
# family = "PublicSans",
# src = list(
# file = c(
# "fonts/publicsans/regular.ttf",
# # "fonts/montserrat/italic.ttf",
# "fonts/publicsans/bold.ttf"
# # "fonts/montserrat/bolditalic.ttf"
# )
# ),
# weight = c(400, 700)
# ),
code_font = bslib::font_google("Open Sans"),
# code_font = bslib::font_face(
# family = "OpenSans",
# src = "url('/fonts/OpenSans-VariableFont_wght.ttf') format('truetype')"
# ),
# code_font = bslib::font_face(
# family = "OpenSans",
# src = list(
# file = c(
# "fonts/opensans/regular.ttf",
# # "fonts/montserrat/italic.ttf",
# "fonts/opensans/bold.ttf"
# # "fonts/montserrat/bolditalic.ttf"
# )
# ),
# weight = c(400, 700)
# ),
success = FreesearchR_colors("success"), success = FreesearchR_colors("success"),
info = FreesearchR_colors("info"), info = FreesearchR_colors("info"),
warning = FreesearchR_colors("warning"), warning = FreesearchR_colors("warning"),
@ -53,6 +95,8 @@ custom_theme <- function(...,
} }
FreesearchR_colors <- function(choose = NULL) { FreesearchR_colors <- function(choose = NULL) {
out <- c( out <- c(
primary = "#1E4A8F", primary = "#1E4A8F",

View file

@ -11,11 +11,11 @@
|collate |en_US.UTF-8 | |collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 | |ctype |en_US.UTF-8 |
|tz |Europe/Copenhagen | |tz |Europe/Copenhagen |
|date |2026-02-28 | |date |2026-03-02 |
|rstudio |2026.01.1+403 Apple Blossom (desktop) | |rstudio |2026.01.1+403 Apple Blossom (desktop) |
|pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) | |pandoc |3.6.4 @ /opt/homebrew/bin/ (via rmarkdown) |
|quarto |1.7.30 @ /usr/local/bin/quarto | |quarto |1.7.30 @ /usr/local/bin/quarto |
|FreesearchR |26.3.1.260228 | |FreesearchR |26.3.1.260302 |
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -44,6 +44,7 @@
|cardx |0.3.2 |2026-02-05 |CRAN (R 4.5.2) | |cardx |0.3.2 |2026-02-05 |CRAN (R 4.5.2) |
|caTools |1.18.3 |2024-09-04 |CRAN (R 4.5.0) | |caTools |1.18.3 |2024-09-04 |CRAN (R 4.5.0) |
|cellranger |1.1.0 |2016-07-27 |CRAN (R 4.5.0) | |cellranger |1.1.0 |2016-07-27 |CRAN (R 4.5.0) |
|cffr |1.2.1 |2026-01-12 |CRAN (R 4.5.2) |
|checkmate |2.3.4 |2026-02-03 |CRAN (R 4.5.2) | |checkmate |2.3.4 |2026-02-03 |CRAN (R 4.5.2) |
|class |7.3-23 |2025-01-01 |CRAN (R 4.5.2) | |class |7.3-23 |2025-01-01 |CRAN (R 4.5.2) |
|classInt |0.4-11 |2025-01-08 |CRAN (R 4.5.0) | |classInt |0.4-11 |2025-01-08 |CRAN (R 4.5.0) |
@ -53,7 +54,6 @@
|colorspace |2.1-2 |2025-09-22 |CRAN (R 4.5.0) | |colorspace |2.1-2 |2025-09-22 |CRAN (R 4.5.0) |
|commonmark |2.0.0 |2025-07-07 |CRAN (R 4.5.0) | |commonmark |2.0.0 |2025-07-07 |CRAN (R 4.5.0) |
|crayon |1.5.3 |2024-06-20 |CRAN (R 4.5.0) | |crayon |1.5.3 |2024-06-20 |CRAN (R 4.5.0) |
|crul |1.6.0 |NA |NA |
|curl |7.0.0 |2025-08-19 |CRAN (R 4.5.0) | |curl |7.0.0 |2025-08-19 |CRAN (R 4.5.0) |
|data.table |1.18.2.1 |2026-01-27 |CRAN (R 4.5.2) | |data.table |1.18.2.1 |2026-01-27 |CRAN (R 4.5.2) |
|datamods |1.5.3 |2024-10-02 |CRAN (R 4.5.0) | |datamods |1.5.3 |2024-10-02 |CRAN (R 4.5.0) |
@ -89,7 +89,6 @@
|fs |1.6.6 |2025-04-12 |CRAN (R 4.5.0) | |fs |1.6.6 |2025-04-12 |CRAN (R 4.5.0) |
|gdtools |0.5.0 |2026-02-09 |CRAN (R 4.5.2) | |gdtools |0.5.0 |2026-02-09 |CRAN (R 4.5.2) |
|generics |0.1.4 |2025-05-09 |CRAN (R 4.5.0) | |generics |0.1.4 |2025-05-09 |CRAN (R 4.5.0) |
|gfonts |0.2.0 |NA |NA |
|ggalluvial |0.12.5 |2023-02-22 |CRAN (R 4.5.0) | |ggalluvial |0.12.5 |2023-02-22 |CRAN (R 4.5.0) |
|ggcorrplot |0.1.4.1 |2023-09-05 |CRAN (R 4.5.0) | |ggcorrplot |0.1.4.1 |2023-09-05 |CRAN (R 4.5.0) |
|ggforce |0.5.0 |2025-06-18 |CRAN (R 4.5.0) | |ggforce |0.5.0 |2025-06-18 |CRAN (R 4.5.0) |
@ -108,17 +107,16 @@
|htmlTable |2.4.3 |2024-07-21 |CRAN (R 4.5.0) | |htmlTable |2.4.3 |2024-07-21 |CRAN (R 4.5.0) |
|htmltools |0.5.9 |2025-12-04 |CRAN (R 4.5.2) | |htmltools |0.5.9 |2025-12-04 |CRAN (R 4.5.2) |
|htmlwidgets |1.6.4 |2023-12-06 |CRAN (R 4.5.0) | |htmlwidgets |1.6.4 |2023-12-06 |CRAN (R 4.5.0) |
|httpcode |0.3.0 |NA |NA |
|httpuv |1.6.16 |2025-04-16 |CRAN (R 4.5.0) | |httpuv |1.6.16 |2025-04-16 |CRAN (R 4.5.0) |
|IDEAFilter |0.2.1 |2025-07-29 |CRAN (R 4.5.0) | |IDEAFilter |0.2.1 |2025-07-29 |CRAN (R 4.5.0) |
|insight |1.4.6 |2026-02-04 |CRAN (R 4.5.2) | |insight |1.4.6 |2026-02-04 |CRAN (R 4.5.2) |
|iterators |1.0.14 |2022-02-05 |CRAN (R 4.5.0) | |iterators |1.0.14 |2022-02-05 |CRAN (R 4.5.0) |
|jquerylib |0.1.4 |2021-04-26 |CRAN (R 4.5.0) | |jquerylib |0.1.4 |2021-04-26 |CRAN (R 4.5.0) |
|jsonlite |2.0.0 |2025-03-27 |CRAN (R 4.5.0) | |jsonlite |2.0.0 |2025-03-27 |CRAN (R 4.5.0) |
|jsonvalidate |1.5.0 |2025-02-07 |CRAN (R 4.5.0) |
|KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.5.2) | |KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.5.2) |
|keyring |1.4.1 |2025-06-15 |CRAN (R 4.5.0) | |keyring |1.4.1 |2025-06-15 |CRAN (R 4.5.0) |
|knitr |1.51 |2025-12-20 |CRAN (R 4.5.2) | |knitr |1.51 |2025-12-20 |CRAN (R 4.5.2) |
|labeling |0.4.3 |2023-08-29 |CRAN (R 4.5.0) |
|later |1.4.6 |2026-02-13 |CRAN (R 4.5.2) | |later |1.4.6 |2026-02-13 |CRAN (R 4.5.2) |
|lattice |0.22-7 |2025-04-02 |CRAN (R 4.5.2) | |lattice |0.22-7 |2025-04-02 |CRAN (R 4.5.2) |
|lifecycle |1.0.5 |2026-01-08 |CRAN (R 4.5.2) | |lifecycle |1.0.5 |2026-01-08 |CRAN (R 4.5.2) |
@ -140,7 +138,6 @@
|openssl |2.3.4 |2025-09-30 |CRAN (R 4.5.0) | |openssl |2.3.4 |2025-09-30 |CRAN (R 4.5.0) |
|openxlsx2 |1.23.1 |2026-01-19 |CRAN (R 4.5.2) | |openxlsx2 |1.23.1 |2026-01-19 |CRAN (R 4.5.2) |
|otel |0.2.0 |2025-08-29 |CRAN (R 4.5.0) | |otel |0.2.0 |2025-08-29 |CRAN (R 4.5.0) |
|pak |0.9.2 |2025-12-22 |CRAN (R 4.5.2) |
|parameters |0.28.3 |2025-11-25 |CRAN (R 4.5.2) | |parameters |0.28.3 |2025-11-25 |CRAN (R 4.5.2) |
|patchwork |1.3.2 |2025-08-25 |CRAN (R 4.5.0) | |patchwork |1.3.2 |2025-08-25 |CRAN (R 4.5.0) |
|pbmcapply |1.5.1 |2022-04-28 |CRAN (R 4.5.0) | |pbmcapply |1.5.1 |2022-04-28 |CRAN (R 4.5.0) |
@ -164,6 +161,7 @@
|R6 |2.6.1 |2025-02-15 |CRAN (R 4.5.0) | |R6 |2.6.1 |2025-02-15 |CRAN (R 4.5.0) |
|ragg |1.5.0 |2025-09-02 |CRAN (R 4.5.0) | |ragg |1.5.0 |2025-09-02 |CRAN (R 4.5.0) |
|rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.5.0) | |rankinPlot |1.1.0 |2023-01-30 |CRAN (R 4.5.0) |
|rappdirs |0.3.4 |2026-01-17 |CRAN (R 4.5.2) |
|rbibutils |2.4.1 |2026-01-21 |CRAN (R 4.5.2) | |rbibutils |2.4.1 |2026-01-21 |CRAN (R 4.5.2) |
|RColorBrewer |1.1-3 |2022-04-03 |CRAN (R 4.5.0) | |RColorBrewer |1.1-3 |2022-04-03 |CRAN (R 4.5.0) |
|Rcpp |1.1.1 |2026-01-10 |CRAN (R 4.5.2) | |Rcpp |1.1.1 |2026-01-10 |CRAN (R 4.5.2) |
@ -213,13 +211,12 @@
|tidyselect |1.2.1 |2024-03-11 |CRAN (R 4.5.0) | |tidyselect |1.2.1 |2024-03-11 |CRAN (R 4.5.0) |
|timechange |0.4.0 |2026-01-29 |CRAN (R 4.5.2) | |timechange |0.4.0 |2026-01-29 |CRAN (R 4.5.2) |
|toastui |0.4.0 |2025-04-03 |CRAN (R 4.5.0) | |toastui |0.4.0 |2025-04-03 |CRAN (R 4.5.0) |
|triebeard |0.4.1 |NA |NA |
|tweenr |2.0.3 |2024-02-26 |CRAN (R 4.5.0) | |tweenr |2.0.3 |2024-02-26 |CRAN (R 4.5.0) |
|twosamples |2.0.1 |2023-06-23 |CRAN (R 4.5.0) | |twosamples |2.0.1 |2023-06-23 |CRAN (R 4.5.0) |
|tzdb |0.5.0 |2025-03-15 |CRAN (R 4.5.0) | |tzdb |0.5.0 |2025-03-15 |CRAN (R 4.5.0) |
|urltools |1.7.3.1 |NA |NA |
|usethis |3.2.1 |2025-09-06 |CRAN (R 4.5.0) | |usethis |3.2.1 |2025-09-06 |CRAN (R 4.5.0) |
|uuid |1.2-2 |2026-01-23 |CRAN (R 4.5.2) | |uuid |1.2-2 |2026-01-23 |CRAN (R 4.5.2) |
|V8 |8.0.1 |2025-10-10 |CRAN (R 4.5.0) |
|vctrs |0.7.1 |2026-01-23 |CRAN (R 4.5.2) | |vctrs |0.7.1 |2026-01-23 |CRAN (R 4.5.2) |
|viridis |0.6.5 |2024-01-29 |CRAN (R 4.5.0) | |viridis |0.6.5 |2024-01-29 |CRAN (R 4.5.0) |
|viridisLite |0.4.3 |2026-02-04 |CRAN (R 4.5.2) | |viridisLite |0.4.3 |2026-02-04 |CRAN (R 4.5.2) |

View file

@ -1,7 +1,7 @@
######## ########
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpDLoQCo/file14ced11821c07.R #### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpxB1KWR/file173c96fd4c8c9.R
######## ########
i18n_path <- here::here("translations") i18n_path <- here::here("translations")
@ -45,6 +45,9 @@ library(rlang)
library(shiny.i18n) library(shiny.i18n)
library(fontawesome) library(fontawesome)
print(list.files("www/fonts/montserrat", full.names = TRUE))
## Translation init ## Translation init
i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path) i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path)
@ -4524,7 +4527,7 @@ data_types <- function() {
#### Current file: /Users/au301842/FreesearchR/R//hosted_version.R #### Current file: /Users/au301842/FreesearchR/R//hosted_version.R
######## ########
hosted_version <- function()'v26.3.1-260228' hosted_version <- function()'v26.3.1-260302'
######## ########
@ -10464,26 +10467,68 @@ table_download_demo <- function() {
#' #'
#' @returns theme list #' @returns theme list
#' @export #' @export
custom_theme <- function(..., #'
#' @examples
#' if (interactive()) {
#' bs_theme_preview(FreesearchR_theme)
#' }
#'
FreesearchR_theme <- function(...,
version = 5, version = 5,
primary = FreesearchR_colors("primary"), primary = FreesearchR_colors("primary"),
secondary = FreesearchR_colors("secondary"), secondary = FreesearchR_colors("secondary"),
bootswatch = "united", bootswatch = "united",
# base_font = bslib::font_google("Montserrat"), base_font = bslib::font_google("Montserrat"),
base_font = bslib::font_face( # base_font = bslib::font_face(
family = "Montserrat", # family = "Montserrat",
src = "url('/fonts/Montserrat-Regular.ttf') format('truetype')" # src = "url('/fonts/Montserrat-VariableFont_wght.ttf') format('truetype')"
), # ),
# heading_font = bslib::font_google("Public Sans", wght = "700"), # base_font = bslib::font_face(
heading_font = bslib::font_face( # family = "Montserrat",
family = "PublicSans", # src = list(
src = "url('/fonts/PublicSans-Bold.ttf') format('truetype')" # file = c(
), # "fonts/montserrat/regular.ttf",
# code_font = bslib::font_google("Open Sans"), # # "fonts/montserrat/italic.ttf",
code_font = bslib::font_face( # "fonts/montserrat/bold.ttf"
family = "OpenSans", # # "fonts/montserrat/bolditalic.ttf"
src = "url('/fonts/OpenSans-Regular.ttf') format('truetype')" # )
), # ),
# weight = c(400, 700)
# ),
heading_font = bslib::font_google("Public Sans", wght = "700"),
# heading_font = bslib::font_face(
# family = "PublicSans",
# src = "url('/fonts/PublicSans-VariableFont_wght.ttf') format('truetype')"
# ),
# heading_font = bslib::font_face(
# family = "PublicSans",
# src = list(
# file = c(
# "fonts/publicsans/regular.ttf",
# # "fonts/montserrat/italic.ttf",
# "fonts/publicsans/bold.ttf"
# # "fonts/montserrat/bolditalic.ttf"
# )
# ),
# weight = c(400, 700)
# ),
code_font = bslib::font_google("Open Sans"),
# code_font = bslib::font_face(
# family = "OpenSans",
# src = "url('/fonts/OpenSans-VariableFont_wght.ttf') format('truetype')"
# ),
# code_font = bslib::font_face(
# family = "OpenSans",
# src = list(
# file = c(
# "fonts/opensans/regular.ttf",
# # "fonts/montserrat/italic.ttf",
# "fonts/opensans/bold.ttf"
# # "fonts/montserrat/bolditalic.ttf"
# )
# ),
# weight = c(400, 700)
# ),
success = FreesearchR_colors("success"), success = FreesearchR_colors("success"),
info = FreesearchR_colors("info"), info = FreesearchR_colors("info"),
warning = FreesearchR_colors("warning"), warning = FreesearchR_colors("warning"),
@ -10513,6 +10558,8 @@ custom_theme <- function(...,
} }
FreesearchR_colors <- function(choose = NULL) { FreesearchR_colors <- function(choose = NULL) {
out <- c( out <- c(
primary = "#1E4A8F", primary = "#1E4A8F",
@ -13453,8 +13500,8 @@ dev_banner <- function(){
# Initial attempt at creating light and dark versions # Initial attempt at creating light and dark versions
light <- custom_theme() light <- FreesearchR_theme()
dark <- custom_theme( dark <- FreesearchR_theme(
bg = "#000", bg = "#000",
fg = "#fff" fg = "#fff"
) )

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,7 +1,7 @@
######## ########
#### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpDLoQCo/file14ced66223522.R #### Current file: /var/folders/9l/xbc19wxx0g79jdd2sf_0v291mhwh7f/T//RtmpxB1KWR/file173c92887da27.R
######## ########
i18n_path <- system.file("translations", package = "FreesearchR") i18n_path <- system.file("translations", package = "FreesearchR")
@ -45,6 +45,9 @@ library(rlang)
library(shiny.i18n) library(shiny.i18n)
library(fontawesome) library(fontawesome)
print(list.files("www/fonts/montserrat", full.names = TRUE))
## Translation init ## Translation init
i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path) i18n <- shiny.i18n::Translator$new(translation_csvs_path = i18n_path)
@ -4524,7 +4527,7 @@ data_types <- function() {
#### Current file: /Users/au301842/FreesearchR/R//hosted_version.R #### Current file: /Users/au301842/FreesearchR/R//hosted_version.R
######## ########
hosted_version <- function()'v26.3.1-260228' hosted_version <- function()'v26.3.1-260302'
######## ########
@ -10464,26 +10467,68 @@ table_download_demo <- function() {
#' #'
#' @returns theme list #' @returns theme list
#' @export #' @export
custom_theme <- function(..., #'
#' @examples
#' if (interactive()) {
#' bs_theme_preview(FreesearchR_theme)
#' }
#'
FreesearchR_theme <- function(...,
version = 5, version = 5,
primary = FreesearchR_colors("primary"), primary = FreesearchR_colors("primary"),
secondary = FreesearchR_colors("secondary"), secondary = FreesearchR_colors("secondary"),
bootswatch = "united", bootswatch = "united",
# base_font = bslib::font_google("Montserrat"), base_font = bslib::font_google("Montserrat"),
base_font = bslib::font_face( # base_font = bslib::font_face(
family = "Montserrat", # family = "Montserrat",
src = "url('/fonts/Montserrat-Regular.ttf') format('truetype')" # src = "url('/fonts/Montserrat-VariableFont_wght.ttf') format('truetype')"
), # ),
# heading_font = bslib::font_google("Public Sans", wght = "700"), # base_font = bslib::font_face(
heading_font = bslib::font_face( # family = "Montserrat",
family = "PublicSans", # src = list(
src = "url('/fonts/PublicSans-Bold.ttf') format('truetype')" # file = c(
), # "fonts/montserrat/regular.ttf",
# code_font = bslib::font_google("Open Sans"), # # "fonts/montserrat/italic.ttf",
code_font = bslib::font_face( # "fonts/montserrat/bold.ttf"
family = "OpenSans", # # "fonts/montserrat/bolditalic.ttf"
src = "url('/fonts/OpenSans-Regular.ttf') format('truetype')" # )
), # ),
# weight = c(400, 700)
# ),
heading_font = bslib::font_google("Public Sans", wght = "700"),
# heading_font = bslib::font_face(
# family = "PublicSans",
# src = "url('/fonts/PublicSans-VariableFont_wght.ttf') format('truetype')"
# ),
# heading_font = bslib::font_face(
# family = "PublicSans",
# src = list(
# file = c(
# "fonts/publicsans/regular.ttf",
# # "fonts/montserrat/italic.ttf",
# "fonts/publicsans/bold.ttf"
# # "fonts/montserrat/bolditalic.ttf"
# )
# ),
# weight = c(400, 700)
# ),
code_font = bslib::font_google("Open Sans"),
# code_font = bslib::font_face(
# family = "OpenSans",
# src = "url('/fonts/OpenSans-VariableFont_wght.ttf') format('truetype')"
# ),
# code_font = bslib::font_face(
# family = "OpenSans",
# src = list(
# file = c(
# "fonts/opensans/regular.ttf",
# # "fonts/montserrat/italic.ttf",
# "fonts/opensans/bold.ttf"
# # "fonts/montserrat/bolditalic.ttf"
# )
# ),
# weight = c(400, 700)
# ),
success = FreesearchR_colors("success"), success = FreesearchR_colors("success"),
info = FreesearchR_colors("info"), info = FreesearchR_colors("info"),
warning = FreesearchR_colors("warning"), warning = FreesearchR_colors("warning"),
@ -10513,6 +10558,8 @@ custom_theme <- function(...,
} }
FreesearchR_colors <- function(choose = NULL) { FreesearchR_colors <- function(choose = NULL) {
out <- c( out <- c(
primary = "#1E4A8F", primary = "#1E4A8F",
@ -13453,8 +13500,8 @@ dev_banner <- function(){
# Initial attempt at creating light and dark versions # Initial attempt at creating light and dark versions
light <- custom_theme() light <- FreesearchR_theme()
dark <- custom_theme( dark <- FreesearchR_theme(
bg = "#000", bg = "#000",
fg = "#fff" fg = "#fff"
) )

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,21 +1,18 @@
% Generated by roxygen2: do not edit by hand % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme.R % Please edit documentation in R/theme.R
\name{custom_theme} \name{FreesearchR_theme}
\alias{custom_theme} \alias{FreesearchR_theme}
\title{Custom theme based on unity} \title{Custom theme based on unity}
\usage{ \usage{
custom_theme( FreesearchR_theme(
..., ...,
version = 5, version = 5,
primary = FreesearchR_colors("primary"), primary = FreesearchR_colors("primary"),
secondary = FreesearchR_colors("secondary"), secondary = FreesearchR_colors("secondary"),
bootswatch = "united", bootswatch = "united",
base_font = bslib::font_face(family = "Montserrat", src = base_font = bslib::font_google("Montserrat"),
"url('/fonts/Montserrat-Regular.ttf') format('truetype')"), heading_font = bslib::font_google("Public Sans", wght = "700"),
heading_font = bslib::font_face(family = "PublicSans", src = code_font = bslib::font_google("Open Sans"),
"url('/fonts/PublicSans-Bold.ttf') format('truetype')"),
code_font = bslib::font_face(family = "OpenSans", src =
"url('/fonts/OpenSans-Regular.ttf') format('truetype')"),
success = FreesearchR_colors("success"), success = FreesearchR_colors("success"),
info = FreesearchR_colors("info"), info = FreesearchR_colors("info"),
warning = FreesearchR_colors("warning"), warning = FreesearchR_colors("warning"),
@ -31,3 +28,9 @@ theme list
\description{ \description{
Custom theme based on unity Custom theme based on unity
} }
\examples{
if (interactive()) {
bs_theme_preview(FreesearchR_theme)
}
}