R/Page/page_support.R

Defines functions pageUI sectionContainer sectionHeader page

#' Page
#'
#' @param sectionPanel
#' @param footerOn
#'
#' @return
#' @export
#'
#' @examples none
page <-function(sectionPanel=sectionPanel(), footerOn=c("首頁","找人", "找事/物","經濟數據")){
  require(htmltools)
  footerOn=match.arg(footerOn)
    tags$div(class = "page",
      # tags$div(
        # class = "page-sectionPanel",
      sectionPanel,
        # sectionContainer()),
      footer(onType=footerOn),
      tags$script("screen.orientation.lock('portrait');")
      )
}
sectionHeader <- function(){tags$div(class = "sectionHeader",
  tags$div(class = "sectionHeader-title"),
  tags$div(class = "sectionHeader-logo"))}
sectionContainer <- function(){
  tags$div(class = "sectionContainer",
    sectionHeader(),
  tags$div(class = "sectionContainer-sectionGraph"),
  tags$div(class = "sectionContainer-sectionTitle"),
  tags$div(class = "sectionContainer-sectionArticle"))}
pageUI <- function(content=sectionPanel(), footerOn=c("首頁","找人", "找事/物","經濟數據")){
  require(htmltools)
  page_ui(content, footerOn)
  htmltools::tagList(page_ui(content, footerOn), page_dependency(), attachment_dependency())
}
# pageUI(footerOn="經濟數據") |> econWeb::browseTag2()
# pageUI(
#   content=sectionPanel(
#     imgUrl="", imgWidget=plt),
#   footerOn="經濟數據"
#   ) |> econWeb::browseTag2()
ntpuecon/econApp documentation built on June 6, 2022, 9:04 p.m.