Skip to content

Commit

Permalink
CRAN ready
Browse files Browse the repository at this point in the history
  • Loading branch information
“rafal.urn” committed Aug 20, 2024
1 parent 0266596 commit 0addd8f
Show file tree
Hide file tree
Showing 84 changed files with 52 additions and 34 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION → ShinyWizard/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Package: ShinyWizard
Title: ShinyWizard : an interactive presentation of any R package
Title: ShinyWizard - an interactive presentation of any R package
Version: 1.0.3.36
Authors@R:
person("Rafal", "Urniaz", , "rafal.urniaz@cantab.net", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-0192-2165"))
Description: Shiny wizard to build an interactive presentation of any R package
Description: Shiny wizard to build an interactive presentation of any R package.
License: GPL (>= 3)
Encoding: UTF-8
Imports:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#' Run ShinyWizard app
#' ShinyWizzardIncludeCSSAndTheme
#'
#' @param name the theme name to be applied. None argument provided returns all available themes.
#'
# @export

ShinyWizzardIncludeCSSAndTheme <- function(){

if(config$ShinyWizzardTheme != ""){
includeCSS(ShinyWizzardTheme(config$ShinyWizzardTheme))
}else{cat("no tempate")}
}else{cat("config$ShinyWizzardTheme is empty!")}


}
13 changes: 11 additions & 2 deletions R/ShinyWizzardTheme.R → ShinyWizard/R/ShinyWizzardTheme.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#' ShinyWizzardTheme
#'
#' @description
#' Return dir / show available ShinyWizard templates
#'
#' @param name the theme name to be applied. None argument provided returns all available themes.
Expand All @@ -20,10 +23,10 @@ ShinyWizzardTheme <- function(name = ""){
}
}

#' @title ShinyWizzardThemeSelector
#' ShinyWizzardThemeSelector
#'
#' @description
#' A short description...
#' Shiny selector for themes, generate the code
#'
#' @export

Expand Down Expand Up @@ -66,6 +69,12 @@ ShinyWizzardThemeSelector <- function() {

}

#' allThemes
#'
#' @description
#' List all available themes
#'

allThemes <- function() {
themes <- dir(system.file("shinythemes/css", package = "shinythemes"),
".+\\.min.css")
Expand Down
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions ShinyWizard/inst/source/core/server/load_config.yaml.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#' Save config.yaml

load_config.yaml <- function(input, output, session){

# Save config
# - Load configuration file from Temp Proj Dir
temp_config <- yaml::yaml.load_file(paste0(config$TempProjPath,'config.yaml'))

# - Update original variables

shinyjs::alert(paste0(temp_config))

shinyjs::runjs(paste0("document.getElementById('tab2-AppTitleInput').value = '",temp_config$AppTitle,"'"))
shinyjs::runjs(paste0("document.getElementById('tab2-AppSubTitleInput').value = '",temp_config$AppSubTitle,"'"))
shinyjs::runjs(paste0("document.getElementById('tab2-LogoFilePathInput').value = '",temp_config$LogoFilePath,"'"))
shinyjs::runjs(paste0("document.getElementById('tab2-FooterTextInput').value = '",temp_config$FooterText,"'"))
shinyjs::runjs(paste0("document.getElementById('tab2-shinytheme-selector').value = '",temp_config$ShinyWizzardTheme,"'"))

}


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' Generate Title Panel

GenTitlePanel <- function(){
titlePanel(windowTitle = if (config$AppTitle != ""){ config$AppTitle }else{ "ShinyWizard App" },
titlePanel(windowTitle = if (config$AppTitle != ""){ config$AppTitle }else{ "ShinyWizard" },
fluidRow(
column(11,
tags$div(id = "AppTitle", config$AppTitle),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions ShinyWizard/man/allThemes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions inst/source/core/server/load_config.yaml.R

This file was deleted.

0 comments on commit 0addd8f

Please sign in to comment.