makeCarousel: Make a carousel of images

View source: R/makeCarousel.R View source: R/imageHelpers.R

makeCarouselR Documentation

Make a carousel of images

Description

Makes HTML code to be used in a quarto document that will produce a carousel of images. Names of files with images may be given in imgs (and must be in path) or if imgs is NULL then all files in path will be used to make the carousel.

Makes HTML code to be used in a quarto document that will produce a carousel of images. Names of files with images may be given in imgs (and must be in path) or if imgs is NULL then all files in path will be used to make the carousel.

Usage

makeCarousel(
  id,
  path,
  imgs = NULL,
  caps = NULL,
  rev = FALSE,
  width = c("100", "75", "50"),
  center = TRUE,
  captions = TRUE,
  controls = TRUE,
  indicators = FALSE,
  interval = 2500,
  fade = FALSE,
  hover = TRUE
)

makeCarousel(
  id,
  path,
  imgs = NULL,
  caps = NULL,
  rev = FALSE,
  width = c("100", "75", "50"),
  center = TRUE,
  captions = TRUE,
  controls = TRUE,
  indicators = FALSE,
  interval = 2500,
  fade = FALSE,
  hover = TRUE
)

Arguments

id

Name for the carousel (make unique if more than one carousel on a page).

path

A relative path to the folder with the images. If imgs is NULL then the folder should only contain image files that will form the carousel.

imgs

A vector of file names with the images to form the carousel. See details.

caps

A vector of captions for each image in the carousel. If NULL then captions will be the filename sans extension.

rev

A logical for whether the given order of imgs and caps should be reversed. Most logically used if imgs and caps are not specified.

width

The relative width (as a percentage) of the carousel (can only be 100, 75, or 50).

center

Logical for whether the carousel should be centered on the page or not.

captions

Logical for whether captions should be added.

controls

Logical for whether the Previous and Next control items should be used.

indicators

Logical for whether indicator buttons should be shown for the image list.

interval

The amount of time between images on the carousel.

fade

Logical for whether there is a slide (FALSE) or fade between images.

hover

Logical for whether the carousel should stop on a mouseover.

Details

NONE YET

NONE YET

Value

None, used for side effect of writing HTML code that produces a slide carousel of images.

None, used for side effect of writing HTML code that produces a slide carousel of images.

Author(s)

Derek H. Ogle

Examples

## None yet.

## None yet.


droglenc/gpxhelpers documentation built on Dec. 12, 2024, 1:33 a.m.