ijlyttle / bsplus

Shiny and R Markdown addons to Bootstrap 3
http://ijlyttle.github.io/bsplus/
Other
146 stars 23 forks source link

carousel image rendering as broken link #26

Open yonicd opened 7 years ago

yonicd commented 7 years ago

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

ijlyttle commented 7 years ago

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.

yonicd commented 7 years ago

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

On Sat, Jan 28, 2017 at 1:22 PM Ian Lyttle notifications@github.com 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)

ijlyttle commented 7 years ago

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

yonicd commented 7 years ago

;). Didn't try that yet.

On Sat, Jan 28, 2017 at 1:31 PM Ian Lyttle notifications@github.com 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 commented 7 years ago

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

ijlyttle commented 7 years ago

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 commented 4 years ago

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