Skip to content

Commit

Permalink
add argonCascade effect. Rebuild website. Update example.R
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Oct 30, 2018
1 parent 3a8dbe6 commit e755aee
Show file tree
Hide file tree
Showing 51 changed files with 735 additions and 105 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export(argonButton)
export(argonCard)
export(argonCarousel)
export(argonCarouselItem)
export(argonCascade)
export(argonCascadeItem)
export(argonColumn)
export(argonContainer)
export(argonDropdown)
Expand Down
2 changes: 1 addition & 1 deletion R/argonAlert.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param ... Alert content.
#' @param icon Alert icon.
#' @param status Alert status.
#' @param status Alert status. See \url{https://demos.creative-tim.com/argon-design-system/docs/components/alerts.html}.
#' @param closable Whether to make the alert closable or not. TRUE by default.
#'
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/argonBadge.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @param text Badge text.
#' @param src Badge external link.
#' @param pill Pill mode. FALSE by default.
#' @param status Badge status.
#' @param status Badge status. See \url{https://demos.creative-tim.com/argon-design-system/docs/components/badge.html}.
#'
#' @examples
#' if (interactive()) {
Expand Down
2 changes: 1 addition & 1 deletion R/argonButton.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Build an argon button
#'
#' @param name Button label.
#' @param status Button color.
#' @param status Button color. See \url{https://demos.creative-tim.com/argon-design-system/docs/components/buttons.html}.
#' @param icon Button icon.
#' @param size Button size: NULL, "sm" or "lg".
#' @param block Whether the button fill its parent. FALSE by default.
Expand Down
4 changes: 2 additions & 2 deletions R/argonCard.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#' @param hover_shadow Only if shadow is TRUE. Whether to enlarge the shadow on hover. FALSE by default.
#' @param border_level Border level. O by default.
#' @param icon Card icon
#' @param status Card status.
#' @param background_color Card background color. NULL by default.
#' @param status Card status. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#' @param background_color Card background color. NULL by default. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#' @param gradient Whether to apply a gradient effect on the card background. FALSE by default.
#' @param floating Whether to animate the card by a vertical floating movement. FALSE by default.
#' Not compatible with hover_lift.
Expand Down
2 changes: 1 addition & 1 deletion R/argonFooter.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param ... Footer content.
#' @param has_card Enable card rendering in the footer. FALSE by default.
#' @param status Footer status color.
#' @param status Footer status color. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#' @param gradient Whether to apply a gradient. FALSE by default.
#'
#' @examples
Expand Down
4 changes: 2 additions & 2 deletions R/argonIcon.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Build an argon Nucleo icon
#'
#' @param name icon name.
#' @param color icon color.
#' @param color icon color. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#'
#' @examples
#' if (interactive()) {
Expand Down Expand Up @@ -31,7 +31,7 @@ argonIcon <- function(name, color = NULL) {
#' @param iconTag Slot for \link{argonIcon}
#' @param circle Wrapper's shape. TRUE by default.
#' @param size Wrapper size. "sm", "md" or "lg".
#' @param status Wrapper color.
#' @param status Wrapper color. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#' @param gradient_color icon gradient background color.
#' @param shadow Whether to apply a shadow effet. TRUE by default.
#' @param hover_shadow Only if shadow is TRUE. Whether to enlarge the shadow on hover. FALSE by default.
Expand Down
2 changes: 1 addition & 1 deletion R/argonModal.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @param ... Modal body content.
#' @param id Modal unique id. Should be the same as modal_id from \link{argonButton}.
#' @param title Modal title.
#' @param status Modal color.
#' @param status Modal color. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#' @param gradient Modal background gradient. FALSE by default. Does not work if status is NULL.
#'
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R/argonNavbar.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ argonDropdown <- function(..., name, size = NULL) {
#' @param description Item description if any.
#' @param src HTML target page.
#' @param icon Item icon of any.
#' @param status Icon and name color status.
#' @param status Icon and name color status. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#'
#' @examples
#' if(interactive()){
Expand Down
2 changes: 1 addition & 1 deletion R/argonPage.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ argonPage <- function(..., title = NULL, description = NULL, author = NULL,
htmltools::tags$script(src = "inst/assets/vendor/bootstrap/bootstrap.min.js"),
htmltools::tags$script(src = "inst/assets/vendor/headroom/headroom.min.js"),
# Optional JS -->
#htmltools::tags$script(src = "inst/assets/vendor/onscreen/onscreen.min.js"),
htmltools::tags$script(src = "inst/assets/vendor/onscreen/onscreen.min.js"),
#htmltools::includeScript(path = "./assets/vendor/nouislider/js/nouislider.min.js"),
#htmltools::includeScript(path = "./assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js"),

Expand Down
2 changes: 1 addition & 1 deletion R/argonProgress.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#'
#' @param value Progress value between 0 and 100.
#' @param text Label text.
#' @param status Progress status color.
#' @param status Progress status color. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#'
#' @examples
#' if (interactive()) {
Expand Down
11 changes: 7 additions & 4 deletions R/argonSection.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
#'
#' @param ... Any UI element.
#' @param size Section size. NULL by default.
#' @param status Section status.
#' @param status Section status. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#' @param gradient Section gradient effect. FALSE by default.
#' @param separator Section bottom separator. FALSE by default.
#' @param separator_color Separator color. "secondary" by default.
#' @param separator_color Separator color. "secondary" by default. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#' @param shape Whether to include shape in the background. FALSE by default.
#' @param cascade Whether to enable a cascade effect. FALSE by default.
#'
#' @examples
#' if (interactive()) {
Expand All @@ -20,7 +21,8 @@
#'
#' @export
argonSection <- function(..., size = NULL, status = "default", gradient = FALSE,
separator = FALSE, separator_color = "secondary", shape = FALSE) {
separator = FALSE, separator_color = "secondary", shape = FALSE,
cascade = FALSE) {

if (shape) {
if (status != "default" || status != "primary") status <- "default"
Expand All @@ -31,9 +33,10 @@ argonSection <- function(..., size = NULL, status = "default", gradient = FALSE,
if (gradient) {
if (!is.null(status) && !shape) sectionCl <- paste0(sectionCl, " bg-gradient-", status)
} else {
if (!shape && !is.null(status)) sectionCl <- sectionCl <- paste0(sectionCl, " bg-", status)
if (!shape && !is.null(status)) sectionCl <- paste0(sectionCl, " bg-", status)
}
if (shape) sectionCl <- paste0(sectionCl, " section-shaped pb-250")
if (cascade) sectionCl <- paste0(sectionCl, " section-nucleo-icons pb-250")

htmltools::tags$section(
class = sectionCl,
Expand Down
63 changes: 62 additions & 1 deletion R/extra-effects.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ argonPersp <- function(..., side) {
#'
#' @param ... Tag to be treated by the blur effect.
#' @param text Text that appears on hover.
#' @param text_color Text color.
#' @param text_color Text color. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#'
#' @examples
#' if (interactive()) {
Expand All @@ -52,4 +52,65 @@ argonBlur <- function(..., text = NULL, text_color = NULL) {
),
htmltools::tags$span(class = paste0("blur-hidden h2 text-", text_color), text)
)
}



#' Create a Boostrap 4 cascade effect
#'
#' Build an argon cascade effect
#'
#' @param ... Slot for \link{argonCascadeItem}. Exactly 13 items.
#'
#' @note You must pass cascade = TRUE to argonSection
#'
#' @examples
#' if (interactive()) {
#' library(argonR)
#'
#' }
#'
#' @author David Granjon, \email{dgranjon@@ymail.com}
#'
#' @export
argonCascade <- function(...) {

htmltools::tags$div(
class = "icons-container mt-5 on-screen",
`data-toggle` = "on-screen",
...
)
}



#' Create a Boostrap 4 cascade item
#'
#' Build an argon cascade item
#'
#' @param name Icon name.
#' @param size Icon size: NULL, "sm" or "lg".
#' @param src Optional external url, link, ...
#'
#' @examples
#' if (interactive()) {
#' library(argonR)
#'
#' }
#'
#' @author David Granjon, \email{dgranjon@@ymail.com}
#'
#' @export
argonCascadeItem <- function(name, size = NULL, src = NULL) {

cascadeItemCl <- "icon"
if (!is.null(size)) cascadeItemCl <- paste0(cascadeItemCl, " icon-", size)
if (!is.null(name)) cascadeItemCl <- paste0(cascadeItemCl, " ni ni-", name)

htmltools::a(
href = src,
target = "_blank",
htmltools::tags$i(class = cascadeItemCl)
)

}
2 changes: 1 addition & 1 deletion R/typography.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ argonQuote <- function(..., footer = NULL, source = NULL, align = "center") {
#' A custom color fo your text
#'
#' @param tag Any tag containing text.
#' @param color Text color.
#' @param color Text color. See \url{https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html}.
#'
#' @examples
#' if (interactive()) {
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ reference:
contents:
- '`argonBlur`'
- '`argonPersp`'
- '`argonCascade`'
- '`argonCascadeItem`'

template:
params:
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/argonAlert.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/argonBadge.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/argonBlur.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/argonButton.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/argonCard.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e755aee

Please sign in to comment.