Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/new-script
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-y authored Nov 15, 2024
2 parents 36d2cec + d684a07 commit daf7c96
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/phsshinyapp.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ phsshinyapp <- function(path, author = Sys.info()[["user"]], app_name = "WRITE A

# Getting app preamble
app_preamble <- shiny_app_template(app_name = app_name, author = author)
app_code <- paste(app_preamble, app_code, collapse = "\n")
app_code <- paste0(app_preamble, app_code, collapse = "\n")


# Write to index file
Expand Down
5 changes: 3 additions & 2 deletions R/shiny_app_template.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ shiny_app_template <- function(app_name = "WRITE APP NAME HERE",
"# UI",
"ui <- fluidPage(",
"tagList(",
'tags$html(lang = "en"), # Set the language of the page - important for accessibility',
"# Specify most recent fontawesome library - change version as needed",
'tags$style("@import url(https://use.fontawesome.com/releases/v6.1.2/css/all.css);"),',
'tags$style("@import url(https://use.fontawesome.com/releases/v6.6.0/css/all.css);"),',
"navbarPage(",
' id = "intabset", # id used for jumping between tabs',
" title = div(",
Expand All @@ -31,7 +32,7 @@ shiny_app_template <- function(app_name = "WRITE APP NAME HERE",
paste0(" windowTitle = ", '"', app_name, '"', ",", "# Title for browser tab"),
' header = tags$head(includeCSS("www/styles.css"), # CSS stylesheet',
' tags$link(rel = "shortcut icon", href = "favicon_phs.ico") # Icon for browser tab',
"),"
"),\n"
)

r_code <- paste(r_code, collapse = "\n")
Expand Down
2 changes: 1 addition & 1 deletion inst/text/shiny/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ server <- function(input, output, session) {
}

# Run the application
shinyApp(ui=ui, server=server)
shinyApp(ui = ui, server = server)

### END OF SCRIPT ###

0 comments on commit daf7c96

Please sign in to comment.