diff --git a/.Rbuildignore b/.Rbuildignore
index f0fc408..e5d17da 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -11,3 +11,4 @@
^CODE_OF_CONDUCT\.md$
^_pkgdown\.yml$
^pkgdown$
+^README\.Rmd$
diff --git a/DESCRIPTION b/DESCRIPTION
index 5bd3a8e..7ea4f0a 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -18,3 +18,5 @@ BugReports: https://github.com/RinteRface/argonDash/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.0.1
+Depends:
+ R (>= 2.10)
diff --git a/R/sysdata.rda b/R/sysdata.rda
new file mode 100644
index 0000000..3fa2208
Binary files /dev/null and b/R/sysdata.rda differ
diff --git a/R/utils.R b/R/utils.R
index 22ecf09..778425d 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -12,22 +12,25 @@ tagAssert <- function(tag, type = NULL, class = NULL, allowUI = TRUE) {
print(tag)
stop("Expected an object with class 'shiny.tag'.")
}
-
+
# Skip dynamic output elements
- if (allowUI &&
- (hasCssClass(tag, "shiny-html-output") ||
- hasCssClass(tag, "shinydashboard-menu-output"))) {
+ if (
+ allowUI &&
+ (
+ hasCssClass(tag, "shiny-html-output") ||
+ hasCssClass(tag, "shinydashboard-menu-output")
+ )
+ ) {
return()
}
-
+
if (!is.null(type) && tag$name != type) {
stop("Expected tag to be of type ", type)
}
-
+
if (!is.null(class)) {
if (is.null(tag$attribs$class)) {
stop("Expected tag to have class '", class, "'")
-
} else {
tagClasses <- strsplit(tag$attribs$class, " ")[[1]]
if (!(class %in% tagClasses)) {
@@ -37,19 +40,46 @@ tagAssert <- function(tag, type = NULL, class = NULL, allowUI = TRUE) {
}
}
-
hasCssClass <- function(tag, class) {
- if (is.null(tag$attribs) || is.null(tag$attribs$class))
- return(FALSE)
-
+ if (is.null(tag$attribs) || is.null(tag$attribs$class)) return(FALSE)
+
classes <- strsplit(tag$attribs$class, " +")[[1]]
return(class %in% classes)
}
-
# Make sure a tab name is valid (there's no "." in it).
validateTabName <- function(name) {
if (grepl(".", name, fixed = TRUE)) {
stop("tabName must not have a '.' in it.")
}
-}
\ No newline at end of file
+}
+
+#' Create shinylive iframe
+#'
+#' Useful for pkgdown website
+#'
+#' @param url app url. A shinylive link.
+#' @param mode How to display the shinylive app. Default to app mode.
+#' @param header Whether to display the shinylive header. Default to TRUE.
+#' @keywords internal
+create_app_link <- function(url, mode = c("app", "editor"), header = TRUE) {
+ mode <- match.arg(mode)
+
+ if (mode != "editor") url <- gsub("editor", mode, url)
+
+ if (!header) {
+ url <- paste0(url, "&h=0")
+ }
+
+ shiny::tags$iframe(
+ # To allow the content to fill the full screen card
+ class = "html-fill-item",
+ src = url,
+ height = "700",
+ width = "100%",
+ style = "border: 1px solid rgba(0,0,0,0.175); border-radius: .375rem;",
+ allowfullscreen = "",
+ allow = "autoplay",
+ `data-external` = "1"
+ )
+}
diff --git a/README.Rmd b/README.Rmd
new file mode 100644
index 0000000..840b425
--- /dev/null
+++ b/README.Rmd
@@ -0,0 +1,63 @@
+---
+output: github_document
+---
+
+
+
+```{r, include = FALSE}
+knitr::opts_chunk$set(
+ collapse = TRUE,
+ comment = "#>",
+ fig.path = "man/figures/README-",
+ out.width = "100%"
+)
+```
+
+# argonDash
+
+[![R build status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions)
+[![CRAN status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash)
+[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing)
+[![cranlogs](https://cranlogs.r-pkg.org/badges/argonDash)](https://cran.r-project.org/package=argonDash)
+[![total](https://cranlogs.r-pkg.org/badges/grand-total/argonDash)](https://www.rpackages.io/package/argonDash)
+
+> argon Bootstrap4 dashboard template for Shiny
+
+## Installation
+
+`{argonDash}` requires to install `{argonR}`.
+
+```r
+install.packages("argonR")
+# devel version
+devtools::install_github("RinteRface/argonDash")
+# from CRAN
+install.packages("argonDash")
+```
+
+## Demo
+
+```r
+library(argonDash)
+argonDashGallery()
+```
+
+### Vertical layout
+
+
+
+### Horizontal layout
+
+This layout is experimental.
+
+
+
+
+## Aknowledgement
+
+* [Creative Tim](https://www.creative-tim.com/) for designing the original argon dashboard HTML template.
+
+## Code of Conduct
+
+ Please note that the argonDash project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
+
diff --git a/README.md b/README.md
index f20b173..86d16bf 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,12 @@
+
+
+
# argonDash
-[![R build status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions)
-[![CRAN status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash)
+[![R build
+status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions)
+[![CRAN
+status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![cranlogs](https://cranlogs.r-pkg.org/badges/argonDash)](https://cran.r-project.org/package=argonDash)
[![total](https://cranlogs.r-pkg.org/badges/grand-total/argonDash)](https://www.rpackages.io/package/argonDash)
@@ -12,7 +17,7 @@
`{argonDash}` requires to install `{argonR}`.
-```r
+``` r
install.packages("argonR")
# devel version
devtools::install_github("RinteRface/argonDash")
@@ -22,26 +27,29 @@ install.packages("argonDash")
## Demo
-```r
+``` r
library(argonDash)
argonDashGallery()
```
### Vertical layout
-
-
+
+
### Horizontal layout
This layout is experimental.
-
-
+
## Aknowledgement
-* [Creative Tim](https://www.creative-tim.com/) for designing the original argon dashboard HTML template.
+- [Creative Tim](https://www.creative-tim.com/) for designing the
+ original argon dashboard HTML template.
## Code of Conduct
-
- Please note that the argonDash project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
+
+Please note that the argonDash project is released with a [Contributor
+Code of
+Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
+By contributing to this project, you agree to abide by its terms.
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 4471de8..1fac18e 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -41,10 +41,8 @@ reference:
- '`argonDashGallery`'
template:
- params:
- bootswatch: journal
-
-
+ bootstrap: 5
+
navbar:
structure:
left:
@@ -69,8 +67,10 @@ navbar:
icon: fa-github fa-lg
href: https://github.com/RinteRface/argonDash
+url: https://rinterface.github.io/argonDash/
news:
releases:
+ - text: "argonDash 0.3.0.9000"
- text: "argonDash 0.2.0"
- text: "argonDash 0.1.0"
diff --git a/docs/404.html b/docs/404.html
index 2c62119..38e99c6 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -1,148 +1,74 @@
-
-
-