mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-13 17:08:05 -05:00
Compare commits
1 Commits
bindAfterR
...
basicPage
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
561625b270 |
@@ -45,3 +45,47 @@ headerPanel <- function(title, windowTitle=title) {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' Create a Bootstrap page
|
||||||
|
#'
|
||||||
|
#' **DEPRECATED**: use [fluidPage()] instead.
|
||||||
|
#'
|
||||||
|
#' @param ... The contents of the document body.
|
||||||
|
#' @param title The browser window title (defaults to the host URL of the page)
|
||||||
|
#' @param responsive This option is deprecated; it is no longer optional with
|
||||||
|
#' Bootstrap 3.
|
||||||
|
#' @param theme Alternative Bootstrap stylesheet (normally a css file within the
|
||||||
|
#' www directory, e.g. `www/bootstrap.css`)
|
||||||
|
#'
|
||||||
|
#' @return A UI defintion that can be passed to the [shinyUI] function.
|
||||||
|
#'
|
||||||
|
#' @keywords internal
|
||||||
|
#' @seealso [fluidPage()], [fixedPage()]
|
||||||
|
#' @export
|
||||||
|
bootstrapPage <- function(..., title = NULL, responsive = NULL, theme = NULL) {
|
||||||
|
|
||||||
|
if (!is.null(responsive)) {
|
||||||
|
shinyDeprecated("The 'responsive' argument is no longer used with Bootstrap 3.")
|
||||||
|
}
|
||||||
|
|
||||||
|
attachDependencies(
|
||||||
|
tagList(
|
||||||
|
if (!is.null(title)) tags$head(tags$title(title)),
|
||||||
|
if (!is.null(theme)) {
|
||||||
|
tags$head(tags$link(rel="stylesheet", type="text/css", href = theme))
|
||||||
|
},
|
||||||
|
|
||||||
|
# remainder of tags passed to the function
|
||||||
|
list(...)
|
||||||
|
),
|
||||||
|
bootstrapLib()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' @rdname bootstrapPage
|
||||||
|
#' @export
|
||||||
|
basicPage <- function(...) {
|
||||||
|
bootstrapPage(div(class="container-fluid", list(...)))
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,51 +1,6 @@
|
|||||||
#' @include utils.R
|
#' @include utils.R
|
||||||
NULL
|
NULL
|
||||||
|
|
||||||
#' Create a Bootstrap page
|
|
||||||
#'
|
|
||||||
#' Create a Shiny UI page that loads the CSS and JavaScript for
|
|
||||||
#' [Bootstrap](http://getbootstrap.com/), and has no content in the page
|
|
||||||
#' body (other than what you provide).
|
|
||||||
#'
|
|
||||||
#' This function is primarily intended for users who are proficient in HTML/CSS,
|
|
||||||
#' and know how to lay out pages in Bootstrap. Most applications should use
|
|
||||||
#' [fluidPage()] along with layout functions like
|
|
||||||
#' [fluidRow()] and [sidebarLayout()].
|
|
||||||
#'
|
|
||||||
#' @param ... The contents of the document body.
|
|
||||||
#' @param title The browser window title (defaults to the host URL of the page)
|
|
||||||
#' @param responsive This option is deprecated; it is no longer optional with
|
|
||||||
#' Bootstrap 3.
|
|
||||||
#' @param theme Alternative Bootstrap stylesheet (normally a css file within the
|
|
||||||
#' www directory, e.g. `www/bootstrap.css`)
|
|
||||||
#'
|
|
||||||
#' @return A UI defintion that can be passed to the [shinyUI] function.
|
|
||||||
#'
|
|
||||||
#' @note The `basicPage` function is deprecated, you should use the
|
|
||||||
#' [fluidPage()] function instead.
|
|
||||||
#'
|
|
||||||
#' @seealso [fluidPage()], [fixedPage()]
|
|
||||||
#' @export
|
|
||||||
bootstrapPage <- function(..., title = NULL, responsive = NULL, theme = NULL) {
|
|
||||||
|
|
||||||
if (!is.null(responsive)) {
|
|
||||||
shinyDeprecated("The 'responsive' argument is no longer used with Bootstrap 3.")
|
|
||||||
}
|
|
||||||
|
|
||||||
attachDependencies(
|
|
||||||
tagList(
|
|
||||||
if (!is.null(title)) tags$head(tags$title(title)),
|
|
||||||
if (!is.null(theme)) {
|
|
||||||
tags$head(tags$link(rel="stylesheet", type="text/css", href = theme))
|
|
||||||
},
|
|
||||||
|
|
||||||
# remainder of tags passed to the function
|
|
||||||
list(...)
|
|
||||||
),
|
|
||||||
bootstrapLib()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' Bootstrap libraries
|
#' Bootstrap libraries
|
||||||
#'
|
#'
|
||||||
#' This function returns a set of web dependencies necessary for using Bootstrap
|
#' This function returns a set of web dependencies necessary for using Bootstrap
|
||||||
@@ -76,12 +31,6 @@ bootstrapLib <- function(theme = NULL) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#' @rdname bootstrapPage
|
|
||||||
#' @export
|
|
||||||
basicPage <- function(...) {
|
|
||||||
bootstrapPage(div(class="container-fluid", list(...)))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#' Create a page that fills the window
|
#' Create a page that fills the window
|
||||||
#'
|
#'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/bootstrap.R
|
% Please edit documentation in R/bootstrap-deprecated.R
|
||||||
\name{bootstrapPage}
|
\name{bootstrapPage}
|
||||||
\alias{bootstrapPage}
|
\alias{bootstrapPage}
|
||||||
\alias{basicPage}
|
\alias{basicPage}
|
||||||
@@ -24,20 +24,9 @@ www directory, e.g. \code{www/bootstrap.css})}
|
|||||||
A UI defintion that can be passed to the \link{shinyUI} function.
|
A UI defintion that can be passed to the \link{shinyUI} function.
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
Create a Shiny UI page that loads the CSS and JavaScript for
|
\strong{DEPRECATED}: use \code{\link[=fluidPage]{fluidPage()}} instead.
|
||||||
\href{http://getbootstrap.com/}{Bootstrap}, and has no content in the page
|
|
||||||
body (other than what you provide).
|
|
||||||
}
|
|
||||||
\details{
|
|
||||||
This function is primarily intended for users who are proficient in HTML/CSS,
|
|
||||||
and know how to lay out pages in Bootstrap. Most applications should use
|
|
||||||
\code{\link[=fluidPage]{fluidPage()}} along with layout functions like
|
|
||||||
\code{\link[=fluidRow]{fluidRow()}} and \code{\link[=sidebarLayout]{sidebarLayout()}}.
|
|
||||||
}
|
|
||||||
\note{
|
|
||||||
The \code{basicPage} function is deprecated, you should use the
|
|
||||||
\code{\link[=fluidPage]{fluidPage()}} function instead.
|
|
||||||
}
|
}
|
||||||
\seealso{
|
\seealso{
|
||||||
\code{\link[=fluidPage]{fluidPage()}}, \code{\link[=fixedPage]{fixedPage()}}
|
\code{\link[=fluidPage]{fluidPage()}}, \code{\link[=fixedPage]{fixedPage()}}
|
||||||
}
|
}
|
||||||
|
\keyword{internal}
|
||||||
|
|||||||
Reference in New Issue
Block a user