Learn R Programming

gentelellaShiny (version 0.1.0)

gentelellaPageCustom: Create a Gentelella dashboard page

Description

This lets you customise the Gentelella dashboard to a much higher degree than gentelellaPage

Usage

gentelellaPageCustom(navbar = NULL, sidebar = NULL, body = NULL,
  footer = NULL, title = NULL, sidebar_collapsed = TRUE,
  footer_fixed = FALSE)

Arguments

navbar

Gentelella dashboard navbar.

sidebar

Gentelella dashboard main sidebar.

body

Gentelella dashboard body wrapper.

footer

Gentelella dashboard footer.

title

App title.

sidebar_collapsed

Whether the sidebar is collapsed of not at start. TRUE by default.

footer_fixed

Whether the footer is fixed or not. FALSE by default.

Examples

Run this code
# NOT RUN {
if(interactive()){
 library(shiny)
 library(gentelellaShiny)

 shinyApp(
  ui = gentelellaPageCustom(
   title = "Shiny Gentelella",
   navbar = gentelellaNavbar(
    navbarItems = notif(
     id = "menunotif",
     icon = icon("envelope-o"),
     status = "primary",
     expanded = FALSE,
     lapply(X = 1:5, FUN = function(i) {
      notifItem(
       title = "John Doe",
       date = "3 min ago",
       img = paste0("https://image.flaticon.com/icons/svg/163/16382", i,".svg"),
       "Film festivals used to be do-or-die moments
       for movie makers. They were where..."
      )
     })
    )
   ),
   sidebar = gentelellaSidebar(
    sidebarProfile(
     name = "Mark",
     img = "https://image.flaticon.com/icons/svg/236/236831.svg"
    ),
    sidebarDate(),
    sidebarMenu()
   ),
   body = gentelellaBody(
    fluidRow(
     column(
      width = 4,
      align = "center",
      sliderInput(
       "obs",
       "Number of observations:",
       min = 0,
       max = 1000,
       value = 500
      )
     ),
     column(
      width = 8,
      align = "center",
      plotOutput("distPlot")
     )
    )
   ),
   footer = gentelellaFooter()
  ),
  server = function(input, output) {
   output$distPlot <- renderPlot({
    hist(rnorm(input$obs))
   })
  }
 )
}

# }

Run the code above in your browser using DataLab