#' header UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
mod_header_ui <- function(id){
ns <- NS(id)
tagList(
uiOutput(ns("header"))
)
}
#' header Server Function
#'
#' @noRd
mod_header_server <- function(input, output, session, rv){
ns <- session$ns
output$header <-
renderUI({
tagList(
column(4, h1('Covid-19 Dashboard', class = 'big-heading')),
column(6),
column(2, div(class = "date-indicator", paste0("Updated: ", rv$last_date)))
)
})
}
## To be copied in the UI
# mod_header_ui("header_ui_1")
## To be copied in the server
# callModule(mod_header_server, "header_ui_1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.