datastorm-open / shinymanager

Simple and secure authentification mechanism for single shiny applications.
https://datastorm-open.github.io/shinymanager/
386 stars 79 forks source link

pulling background file from www folder instead of web #103

Closed dcont5512 closed 3 years ago

dcont5512 commented 3 years ago

Is it possible to store and reference a background image for the login screen in the same way you would for a header (e.g., stored in the www folder), instead of using a hyperlink to access it?

library(shiny)
library(shinymanager)

ui <- secure_app(
  tags_top = tags$img(src = "/1_header.png", width = "80%"),
  ## is it possible to store this file in your project directory instead of using URL?
  background  = "url('https://wallpapercave.com/wp/wp3067729.jpg')  no-repeat center fixed;", 
  fluidPage()
)
server <- function(input, output, session) {
}

shinyApp(ui = ui, server = server)
bthieurmel commented 3 years ago

yes of course. Just use url('img/image.png'); with image.png in www/img