bsplus icon indicating copy to clipboard operation
bsplus copied to clipboard

carousel image rendering as broken link

Open yonicd opened this issue 8 years ago • 7 comments

am i using it wrong?

> packageVersion('bsplus')
[1] ‘0.1.0.9000’

server <- function(input, output) {


}

ui <- fluidPage(
  bs_carousel(id = "tabPrev", use_indicators = TRUE) %>%
    bs_append(
      content = bs_carousel_image(src = file.path(getwd(),"knit/tblDoc.png")),
      caption = bs_carousel_caption("tabTest", "rendered table")
    )
)

shinyApp(ui = ui, server = server)

screen shot 2017-01-27 at 10 22 37

yonicd avatar Jan 27 '17 15:01 yonicd

When using the src attribute, you have to be looking from the perspective of the HTML document.

Assuming that the document will be rendered to the directory that contains the knit directory, you should be able to use:

content = bs_carousel_image(src = "knit/tblDoc.png")

Let me know if this works; I will leave this issue open as a reminder to myself to update the documentation.

ijlyttle avatar Jan 28 '17 18:01 ijlyttle

I tried that before the full path, both didn't work.

On Sat, Jan 28, 2017 at 1:22 PM Ian Lyttle [email protected] wrote:

When using the src attribute, you have to be looking from the perspective of the HTML document.

Assuming that the document will be rendered to the directory that contains the knit directory, you should be able to use:

content = bs_carousel_image(src = "knit/tblDoc.png")

Let me know if this works; I will leave this issue open as a reminder to myself to update the documentation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ijlyttle/bsplus/issues/26#issuecomment-275864970, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrJX6Of0pHvTqjD6as_jRmSzL-0q9VFks5rW4dSgaJpZM4Lv4OW .

-- Yoni

You do not learn to swim from books and lectures on the theory of buoyancy (Box 1990)

yonicd avatar Jan 28 '17 18:01 yonicd

I have not had enough coffee yet today - I did not see that this is a shiny app.

I think you have to create a www directory, then put the knitr directory into that.

http://stackoverflow.com/questions/19434991/adding-local-image-with-html-to-a-shiny-app

ijlyttle avatar Jan 28 '17 18:01 ijlyttle

;). Didn't try that yet.

On Sat, Jan 28, 2017 at 1:31 PM Ian Lyttle [email protected] wrote:

I have not had enough coffee yet today - I did not see that this is a shiny app.

I think you have to create a www directory, then put the knitr directory into that.

http://stackoverflow.com/questions/19434991/adding-local-image-with-html-to-a-shiny-app

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ijlyttle/bsplus/issues/26#issuecomment-275865544, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrJXzUfwACGEJEYS6ibvQUWs99EZQd2ks5rW4lqgaJpZM4Lv4OW .

-- Yoni

You do not learn to swim from books and lectures on the theory of buoyancy (Box 1990)

yonicd avatar Jan 28 '17 18:01 yonicd

that worked. is there a way to turn off the grey background or set the opacity to 1 for the images?

yonicd avatar Feb 01 '17 19:02 yonicd

For that, you may have to consult Bootstrap: http://getbootstrap.com/javascript/#carousel, although I don't see anything there.

FWIW, the bs_carousel() and bs_append() functions hew closely to Bootstrap's examples.

ijlyttle avatar Feb 01 '17 21:02 ijlyttle

Reminder to update the documentation for bs_carousel_image() with hints on how to set the path.

ijlyttle avatar May 16 '20 18:05 ijlyttle