I am trying to change the color tone of the login page from the shinymanager
package.
I have seen these posts:
However, since I don't know much about CSS, I am struggling with this.
This is a reproducible example:
library(shiny)
library(shinydashboard)
library(shinyWidgets)
library(shinymanager)
credentials <- data.frame(
user = c("shiny"),
password = c("shiny"),
stringsAsFactors = FALSE
)
css <- HTML(" body {
background-color: #0dc5c1;
}")
ui <- dashboardPage(
dashboardHeader(title = "Dashboard"),
## Sidebar content
dashboardSidebar(
sidebarMenu(
menuItem("App1", tabName = "App1", icon = icon("th"))
)
),
dashboardBody(
fluidRow(
tabItems(
tabItem(tabName = "App1",
sidebarPanel(
numericInput("num",
"Select a number",
min = 1,
value = 10),
sliderInput("slider1",
"Number of bins:",
min = 1,
max = 50,
value = 30),
checkboxInput("remove", "Remove...", value = FALSE),
),
mainPanel(
verbatimTextOutput("value"),
plotOutput("plot1"),
)
)
)
)
)
)
ui <- secure_app(ui,
# changing theme for the credentials
theme = shinythemes::shinytheme("united"),
tags_top = tags$div(
tags$head(tags$style(css)),
tags$img(
src = "https://marketplace.egi.eu/101-large_default/the-r-project-for-statistical-computing.jpg", width = 200, height = 200, alt="Logo not found", deleteFile=FALSE
))
)
server <- function(input, output, session) {
res_auth <- secure_server(
check_credentials = check_credentials(credentials)
)
}
shinyApp(ui, server)
My objective is to change the colour of the login page to the following tone #0dc5c1, in particular the border and the button of the page.
I tried adding:
css <- HTML(" body {
background-color: #0dc5c1;
}")
But it doesn't work.
Does anyone know how to solve it?
Thanks very much in advance
Please check the following: