Skip to content
Snippets Groups Projects

Navbar items

Merged arsenij.ustjanzew requested to merge navbar_items into master
3 files
+ 16
16
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 8
6
@@ -27,21 +27,23 @@ setMethod("assemble", "i2dashboard", function(dashboard, pages = names(dashboard
ymlthis::yml(date = F) %>%
ymlthis::yml_title(dashboard@title) %>%
ymlthis::yml_author(dashboard@author) %>%
ymlthis::yml_output(flexdashboard::flex_dashboard(theme = dashboard@theme)) %>%
{if(dashboard@interactive) ymlthis::yml_runtime(., runtime = "shiny") else .} -> yml_header
ymlthis::yml_output(flexdashboard::flex_dashboard(theme = "yeti")) -> yaml_header
# workaround, because variable "dashboard@theme" was not recognised
yaml_header$output$`flexdashboard::flex_dashboard`$theme <- dashboard@theme
if(dashboard@interactive) yaml_header <- ymlthis::yml_runtime(yaml_header, runtime = "shiny")
# add source_code to yaml_header
if(source_settings$source){
yml_header$output$`flexdashboard::flex_dashboard`$source_code <- source_settings$value
yaml_header$output$`flexdashboard::flex_dashboard`$source_code <- source_settings$value
}
# add social_links to yaml_header
if(length(dashboard@social_links) > 0){
yml_header$output$`flexdashboard::flex_dashboard`$social <- dashboard@social_links
yaml_header$output$`flexdashboard::flex_dashboard`$social <- dashboard@social_links
}
print(yml_header)
yml_header %>%
yaml_header %>%
ymlthis::use_rmarkdown(path = tmp_document, include_body = FALSE, quiet = TRUE, open_doc = FALSE)
# Add i2dash global setup
Loading