-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.R
More file actions
41 lines (36 loc) · 855 Bytes
/
app.R
File metadata and controls
41 lines (36 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Allow absolute module imports (relative to the project root).
options(box.path = getwd())
box::use(
sass[...],
shiny[...],
shinyCabbage[...],
shinydashboard[...],
)
# file named `__init__.R` can be loaded by poining to it's directory
box::use(
modules/pages/page1,
)
# Global settings / data (identical for all user sessions)
css <- sass(sass_file("styles/main.scss"))
ui <- dashboardPage(
dashboardHeader(title = "[NAME OF THE APP]"),
dashboardSidebar(
sidebarMenu(
menuItem("Tab 1", tabName = "tab1")
)
),
dashboardBody(
tags$head(
tags$style(css),
tags$script(src = "handlers.js")
),
tabItems(
tabItem(tabName = "tab1", page1$ui("my-module"))
)
)
)
ui <- shinyCabbagePage(ui)
server <- function(input, output) {
page1$server("my-module")
}
shinyApp(ui = ui, server = server)