diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 10c51d1..0f2fe08 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,15 +1,15 @@ -# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. -# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: - - master + branches: [main, master] pull_request: - branches: - - master + branches: [main, master] name: R-CMD-check +permissions: read-all + jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} @@ -20,62 +20,33 @@ jobs: fail-fast: false matrix: config: + - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - - {os: macOS-latest, r: 'release'} - - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} - - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') - - - name: Install dependencies - run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - shell: Rscript {0} - - - name: Check - env: - _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") - shell: Rscript {0} + extra-packages: any::rcmdcheck + needs: check - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main + - uses: r-lib/actions/check-r-package@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 9da4508..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,7 +0,0 @@ -image: rocker/verse - -test: - script: - - R -e 'install.packages("jsonlite")' - - R -e 'devtools::check()' - diff --git a/NEWS.md b/NEWS.md index 246743b..93a7219 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ # aos 0.1.1 * Added a `NEWS.md` file to track changes to the package. -* create function html_dependencies_oas(). +* create function html_dependencies_aos(). * Improve HTML dependencies. Now using DNS by default. If not working, use local files. diff --git a/README.md b/README.md index 50411bf..a427951 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,17 @@ - -[![CRAN -status](https://www.r-pkg.org/badges/version/aos)](https://CRAN.R-project.org/package=aos) -[![pipeline -status](https://gitlab.com/lgnbhl/aos/badges/master/pipeline.svg)](https://gitlab.com/lgnbhl/aos/pipelines) -[![R build -status](https://github.com/lgnbhl/aos/workflows/R-CMD-check/badge.svg)](https://github.com/lgnbhl/aos/actions) +[![CRAN status](https://www.r-pkg.org/badges/version/aos)](https://CRAN.R-project.org/package=aos) +[![Grand total](https://cranlogs.r-pkg.org/badges/grand-total/aos)](https://cran.r-project.org/package=aos) +[![R-CMD-check](https://github.com/lgnbhl/aos/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/lgnbhl/aos/actions/workflows/R-CMD-check.yaml) +[![LinkedIn](https://img.shields.io/badge/LinkedIn-Follow-E4405F?style=social&logo=linkedin)](https://www.linkedin.com/in/FelixLuginbuhl) # aos > Animate on Scroll Library for Shiny -The package `aos` allows to animate on scroll elements in R Shiny thanks -to [AOS - Animate On Scroll](http://michalsnik.github.io/aos/). +**aos** allows to animate on scroll elements in R Shiny thanks to [AOS - Animate On Scroll](http://michalsnik.github.io/aos/). ## Installation @@ -36,7 +32,7 @@ remotes::install_github("lgnbhl/aos") ## Shiny -In order to use the {aos} package, you must first call `use_aos()` in +In order to use the **aos** package, you must first call `use_aos()` in the apps’ UI. Then simply apply `aos()` to any Shiny element with an animation and @@ -54,23 +50,19 @@ shinyApp( use_aos(disable = "mobile"), # add use_aos() in the UI aos( element = h1("AOS - Animation On Scroll"), - animation = "fade-up", - duration = "3000"), - br(), br(), br(), br(), + animation = "fade-zoom-in", + duration = "1000"), + aos(textOutput("text"), animation = "fade-up"), aos( - element = plotOutput("plot"), - animation = "flip-left", - delay = "300", - duration = "2000", - easing = "ease-out-cubic") + element = shiny::actionButton( + inputId = "button", + label = "See live demo", + onclick = "window.open('http://michalsnik.github.io/aos/', '_blank')"), + animation = "fade-up", + duration = "3000") ), server <- function(input, output, session) { - output$plot <- renderPlot({ - ggplot(starwars, aes(mass, height)) + - geom_point(aes(color = gender)) + - geom_label_repel(aes(label = name), size = 3) + - labs(title = "Star Wars Characters Body Mass Index") - }) + output$text <- renderText({ print("An animated text.") }) } ) ``` diff --git a/_pkgdown.yml b/_pkgdown.yml index b2ea27f..b211b20 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,7 +1,14 @@ +url: https://felixluginbuhl.com/aos template: - params: - bootswatch: cosmo - ganalytics: UA-158089797-1 + bootstrap: 5 + bootswatch: litera + ganalytics: UA-158089797-1 + bslib: + primary: "#4610a2" + +authors: + Felix Luginbuhl: + href: "https://felixluginbuhl.com" navbar: left: @@ -9,6 +16,8 @@ navbar: href: index.html - text: Reference href: reference/index.html + - text: News + href: news/index.html right: - icon: fa-linkedin href: https://www.linkedin.com/in/felixluginbuhl @@ -26,3 +35,4 @@ reference: - aos - use_aos_refresh - use_aos_refresh_hard + - html_dependencies_aos diff --git a/data-raw/sticker.R b/data-raw/sticker.R deleted file mode 100644 index 4e03e7a..0000000 --- a/data-raw/sticker.R +++ /dev/null @@ -1,34 +0,0 @@ -## Making a hex sticker for BFS -library(hexSticker) -library(magick) -library(magrittr) -library(showtext) - -font_add_google("Open Sans") -## Automatically use showtext to render text -showtext_auto() - -# ref: "https://upload.wikimedia.org/wikipedia/commons/d/df/Chevron_up_font_awesome.svg" -hexSticker::sticker("man/figures/empty_white.png", - package = "AOS", - p_color = "#5e72e4", - p_family = "Open Sans", - p_size = 12, - p_y = 1, - spotlight = TRUE, - l_x = 1, - l_y = 1, - l_height = 4, - l_width = 4, - l_alpha = 0.3, - h_size = 1.5, - h_color = "#5e72e4", - h_fill = "white", - filename="man/figures/logo_large.png") - -# MOD with Gimp: removing red borders. - -aos <- magick::image_read("man/figures/logo_large.png") -magick::image_scale(aos, "130") %>% - magick::image_write(path = "man/figures/logo.png", format = "png") - diff --git a/docs/404.html b/docs/404.html index d6d1d61..9cbd579 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,169 +1,116 @@ - - -
- + + + + - - +