Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carousel image rendering as broken link #26

Open
yonicd opened this issue Jan 27, 2017 · 7 comments
Open

carousel image rendering as broken link #26

yonicd opened this issue Jan 27, 2017 · 7 comments

Comments

@yonicd
Copy link

yonicd commented Jan 27, 2017

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
Copy link
Owner

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
Copy link
Author

yonicd commented Jan 28, 2017 via email

@ijlyttle
Copy link
Owner

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
Copy link
Author

yonicd commented Jan 28, 2017 via email

@yonicd
Copy link
Author

yonicd commented Feb 1, 2017

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

@ijlyttle
Copy link
Owner

ijlyttle commented Feb 1, 2017

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 ijlyttle added this to Think about some more in 0.1.1 release Jul 16, 2017
@ijlyttle
Copy link
Owner

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

@ijlyttle ijlyttle added the 0.1.3 label May 16, 2020
@ijlyttle ijlyttle added this to To do in 0.1.2 May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
0.1.2
  
To do
0.1.1 release
Think about some more
Development

No branches or pull requests

2 participants