R/app_ui.R

Defines functions app_ui golem_add_external_resources

#' @import shiny
app_ui <- function() {
  tagList(
    # Leave this function for adding external resources
    golem_add_external_resources(),
    # List the first level UI elements here 
    fluidPage(
      h1("shinytestexample"),
      textOutput("loggedin"),
      actionButton("hi", "Hi"),
      textOutput("greet")
    )
  )
}

#' @import shiny
#' @keywords internal
golem_add_external_resources <- function() {
  addResourcePath(
    "www", system.file("app/www", package = "shinytestexample")
  )
  
  tags$head(
    golem::activate_js(),
    golem::favicon(),
    tags$script(src = "www/readCookie.js")
  )
}
Aryllen/shinytestexample documentation built on Jan. 15, 2020, 6:23 p.m.