started with ui. made a new app.R for that and made the home page and started with the explore page. Header with baselayout is also done.
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
shiny::devmode(TRUE)
|
||||
|
||||
library(shiny)
|
||||
library(bslib)
|
||||
theme <- bs_theme(
|
||||
primary = "#7faeff" # blue-light
|
||||
)
|
||||
|
||||
source("R/Global.R")
|
||||
source("home_page.R")
|
||||
source("explore_page.R")
|
||||
|
||||
|
||||
|
||||
|
||||
inspect_page <- tagList(
|
||||
tags$div(
|
||||
"Hello World – Page C")
|
||||
)
|
||||
|
||||
optimize_page <- tagList(
|
||||
tags$div(
|
||||
"Hello World – Page D")
|
||||
)
|
||||
|
||||
# --- UI ---
|
||||
|
||||
ui <- page_navbar(
|
||||
title = tags$img(
|
||||
"Plateflow",
|
||||
src = "logo.svg",
|
||||
height = "35px",
|
||||
alt = "InnerAnalyticsLogo"
|
||||
),
|
||||
header = tags$head(
|
||||
tags$link(rel = "stylesheet", href = "styles.css")
|
||||
),
|
||||
theme = theme,
|
||||
|
||||
nav_panel("Home", home_page),
|
||||
nav_panel("EXPLORE", explore_page),
|
||||
nav_panel("INSPECT", inspect_page),
|
||||
nav_panel("OPTIMIZE", optimize_page)
|
||||
)
|
||||
|
||||
# --- Server ---
|
||||
|
||||
server <- function(input, output, session) {
|
||||
# input$page holds the currently active tab name if you ever need it
|
||||
# e.g. observeEvent(input$page, { cat("Switched to:", input$page, "\n") })
|
||||
output$sessioninfo <- renderPrint({ sessionInfo()})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
shinyApp(ui = ui, server = server)
|
||||
Reference in New Issue
Block a user