Skip to content

mrjoh3/gallerier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gallerier

Lifecycle: experimental

The goal of gallerier is to provide a simple way to include image galleries in Shiny Applications. Initialy this was just a repository with some example code. Simple lightbox and photoswipe galleries are available as functions and shiny modules. Evample applications can be found in the inst folder and a live version is available on shinyapps.

The package is under heavy development. The lightbox gallery is fully functional but photoswipe does not yet work as expected.

Installation

You can install the latest version of gallerier from Github with:

devtools::install_github('mrjoh3/gallerier')

Example

This is a basic example which shows you how to solve a common problem:

library(gallerier)

images <- data.frame(src = list.files('www/img')) %>%
  tidyr::separate(col = 'src', c('txt', 'date', 'time', 'msec'), sep = '_|\\.', remove = FALSE) %>%
  rowwise() %>%
  mutate(date = lubridate::ymd(date),
         key = hashids::encode(1e3 + as.integer(msec), hashid_settings(salt = 'this is my salt')))
         
         
## simple lightbox
lightbox_gallery(images[sample(1:nrow(images), 12, replace = FALSE),], 'gallery', display = TRUE)

About

Image Galleries for Shiny and RMarkdown

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages