-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_paths_ui.R
56 lines (49 loc) · 1.55 KB
/
app_paths_ui.R
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# user interface
paths_ui <- function() {
# constants
app_title <- "Geopaths"
app_title_width <- 150
app_color <- "green"
spinner_color <- "#2c3b41"
app_box_default <- "#2c3b41"
# options
options(spinner.color = spinner_color)
# header
header <- shinydashboard::dashboardHeader(title = app_title, titleWidth = app_title_width)
# sidebar
sidebar <-
shinydashboard::dashboardSidebar(
collapsed = FALSE, disable = FALSE, width = app_title_width,
shinyjs::useShinyjs(), # enable shinyjs
shinytoastr::useToastr(), # enable toaster
prompter::use_prompt(), # enable prompter
tags$head( # css headers
# custom
tags$style(
type="text/css",
HTML(paste(
# body top padding
".box-body {padding-top: 5px; padding-bottom: 0px}",
# custom background box
sprintf(".box.box-solid.box-info>.box-header{color:#fff; background: %s; background-color: %s;}", app_box_default, app_box_default),
sprintf(".box.box-solid.box-info{border:1px solid %s;}", app_box_default),
sep="\n"))
)
),
module_data_paths_reload_button("paths_data"),
module_path_sidebar("paths"),
if (is_dev_mode()) actionButton("dev_mode_toggle", "Toggle Dev Mode")
)
# body
body <- shinydashboard::dashboardBody(
module_paths_ui("paths")
)
# dashboard page
shinydashboard::dashboardPage(
title = app_title, # tab title
skin = app_color, # styling
header = header,
sidebar = sidebar,
body = body
)
}