-
Notifications
You must be signed in to change notification settings - Fork 37
/
argonDashPage.R
61 lines (60 loc) · 1.58 KB
/
argonDashPage.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#' Create a Boostrap 4 dashboard page
#'
#' Build an Argon dashboard page
#'
#' @param navbar Bootstrap 4 dashboard navbar.
#' @param sidebar Bootstrap 4 dashboard main sidebar.
#' @param header Bootstrap 4 dashboard control sidebar (right side).
#' @param body Bootstrap 4 dashboard body wrapper.
#' @param footer Bootstrap 4 dashboard footer.
#' @param title App title.
#' @param author Dashboard author.
#' @param description Dashboard purpose.
#'
#' @examples
#' if(interactive()){
#' library(shiny)
#' library(argonDash)
#'
#' shiny::shinyApp(
#' ui = argonDashPage(),
#' server = function(input, output) {}
#' )
#' }
#'
#' @author David Granjon, \email{dgranjon@@ymail.com}
#'
#' @export
argonDashPage <- function(title = NULL, description = NULL, author = NULL,
navbar = NULL, sidebar = NULL, header = NULL, body = NULL, footer = NULL){
shiny::tags$html(
# Head
shiny::tags$head(
shiny::tags$meta(charset = "utf-8"),
shiny::tags$meta(
name = "viewport",
content = "width=device-width, initial-scale=1, shrink-to-fit=no"
),
shiny::tags$meta(name = "description", content = description),
shiny::tags$meta(name = "author", content = author),
shiny::tags$title(title)
),
# Body
addDeps(
shiny::tags$body(
sidebar,
shiny::tags$div(
class = "main-content",
navbar,
header,
# page content
shiny::tags$div(
class = "container-fluid mt--7",
body,
footer
)
)
)
)
)
}