| 1 |
#' Create a page with a sidebar |
| 2 |
#' |
| 3 |
#' **DEPRECATED**: use [fluidPage()] and [sidebarLayout()] instead. |
| 4 |
#' |
| 5 |
#' @param headerPanel The [headerPanel] with the application title |
| 6 |
#' @param sidebarPanel The [sidebarPanel] containing input controls |
| 7 |
#' @param mainPanel The [mainPanel] containing outputs |
| 8 |
#' @keywords internal |
| 9 |
#' @return A UI definition that can be passed to the [shinyUI] function |
| 10 |
#' @export |
| 11 |
pageWithSidebar <- function(headerPanel, |
| 12 |
sidebarPanel, |
| 13 |
mainPanel) { |
| 14 |
|
| 15 |
bootstrapPage( |
| 16 |
# basic application container divs |
| 17 |
div( |
| 18 |
class="container-fluid", |
| 19 |
div(class="row", |
| 20 |
headerPanel |
| 21 |
), |
| 22 |
div(class="row", |
| 23 |
sidebarPanel, |
| 24 |
mainPanel |
| 25 |
) |
| 26 |
) |
| 27 |
) |
| 28 |
} |
| 29 |
|
| 30 |
#' Create a header panel |
| 31 |
#' |
| 32 |
#' **DEPRECATED**: use [titlePanel()] instead. |
| 33 |
#' |
| 34 |
#' @param title An application title to display |
| 35 |
#' @param windowTitle The title that should be displayed by the browser window. |
| 36 |
#' Useful if `title` is not a string. |
| 37 |
#' @return A headerPanel that can be passed to [pageWithSidebar] |
| 38 |
#' @keywords internal |
| 39 |
#' @export |
| 40 |
headerPanel <- function(title, windowTitle=title) { |
| 41 |
tagList( |
| 42 |
tags$head(tags$title(windowTitle)), |
| 43 |
div(class="col-sm-12", |
| 44 |
h1(title) |
| 45 |
) |
| 46 |
) |
| 47 |
} |