yonicd / slickR

slick carousel htmlwidget for R
https://yonicd.github.io/slickR/
Other
159 stars 14 forks source link

Caption Text #11

Closed DominiqueMakowski closed 6 years ago

DominiqueMakowski commented 6 years ago

Thanks for your amazing work 😺

I was wondering if it was possible to add captions on or below the images such as here?

Didn't find the answer anywhere...

Thanks a lot!

yonicd commented 6 years ago

something like this?

DominiqueMakowski commented 6 years ago

For example yes

yonicd commented 6 years ago

this you dont need anything special really. what they do in the link i attached is to create two synchronized sliders, upper is <img>, lower is a <p>...</p> tag.

this should already be possible in slickr

DominiqueMakowski commented 6 years ago

I'm sorry, I've definitely no skills in html/js programing so I didn't quite understood how to apply what you suggested.

Could you maybe provide a small reproducible example?

Thanks a lot

yonicd commented 6 years ago
nba=c("ATL","BKN","BOS","CHA","CHI","CLE","DAL","DEN","DET","GSW","HOU","IND","LAC","LAL","MEM","MIA","MIL","MIN","NOP","NYK","OKC","ORL","PHI","PHX","POR","SAC","SAS","TOR","UTA","WAS")

nba_logos=sprintf("https://i.cdn.turner.com/nba/nba/.element/img/4.0/global/logos/512x512/bg.white/svg/%s.svg",nba)

slickR(
obj=c(nba_logos[1:2],'<p>something</p>','<p>something else</p>'),
slideType = c('img','p'),
slideId = c('img','cap'),
slideIdx = list(c(1,2),c(3,4)),
synchSlides = c('img','cap'),
height=100,
slickOpts = list(list(dots=FALSE),list(dots=TRUE,arrows=FALSE))
)