Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70391dc
commit eb2eaf5
Showing
13 changed files
with
833 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Package: argonDash | ||
Type: Package | ||
Title: Aron Shiny Dashboard Template | ||
Version: 0.1.0 | ||
Author: David Granjon | ||
Maintainer: David Granjon <dgranjon@ymail.com> | ||
Description: Create awesome bootstrap 4 template powered by argon. | ||
See more here <file:///Users/macdavidgranjon/Desktop/argon-dashboard-v1.0.0/index.html>. | ||
License: GPL-2 | ||
Imports: shiny, | ||
htmltools | ||
URL: https://github.com/RinteRface/argonDash | ||
BugReports: https://github.com/RinteRface/argonDash/issues | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 6.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(argonDashPage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
) | ||
) | ||
) | ||
) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Add an html dependency, without overwriting existing ones | ||
appendDependencies <- function(x, value) { | ||
if (inherits(value, "html_dependency")) | ||
value <- list(value) | ||
|
||
old <- attr(x, "html_dependencies", TRUE) | ||
|
||
htmltools::htmlDependencies(x) <- c(old, value) | ||
x | ||
} | ||
|
||
# Add dashboard dependencies to a tag object | ||
addDeps <- function(x) { | ||
|
||
# CSS, icons | ||
#favicon <- "favicon.png" | ||
google_fonts <- "https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" | ||
nucleo_css <- "nucleo.css" | ||
fontawesome_css <- "all.min.css" | ||
argon_css <- "argon.min.css" | ||
|
||
# JS | ||
bootstrap_js <- "bootstrap.bundle.min.js" | ||
argon_js <- "argon.min.js" | ||
|
||
dashboardDeps <- list( | ||
# bootstrap deps | ||
htmltools::htmlDependency( | ||
name = "bootstrap", | ||
version = "4.1.3", | ||
src = c(file = system.file("bootstrap-4.1.3", package = "argonDash")), | ||
script = bootstrap_js | ||
), | ||
# google fonts | ||
htmltools::htmlDependency( | ||
name = "googlefonts", | ||
version = as.character(utils::packageVersion("argonDash")), | ||
src = c(href = google_fonts), | ||
stylesheet = "" | ||
), | ||
# nucleo | ||
htmltools::htmlDependency( | ||
name = "nucleo", | ||
version = as.character(utils::packageVersion("argonDash")), | ||
src = c(file = system.file("nucleo-0.1.0", package = "argonDash")), | ||
stylesheet = nucleo_css | ||
), | ||
# fontawesome | ||
htmltools::htmlDependency( | ||
name = "fontawesome", | ||
version = "5.3.1", | ||
src = c(file = system.file("fontawesome-5.3.1", package = "argonDash")), | ||
stylesheet = fontawesome_css | ||
), | ||
# argon | ||
htmltools::htmlDependency( | ||
name = "argon", | ||
version = "1.0.0", | ||
src = c(file = system.file("argon-1.0.0", package = "argonDash")), | ||
stylesheet = argon_css, | ||
script = argon_js | ||
) | ||
|
||
) | ||
appendDependencies(x, dashboardDeps) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX | ||
|
||
BuildType: Package | ||
PackageUseDevtools: Yes | ||
PackageInstallArgs: --no-multiarch --with-keep.source |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.