-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
70 lines (69 loc) · 2.52 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
##################################################################
## Shiny Page ##
## Fluid Layout ##
##################################################################
shinyUI(
# Use a fluid page (bootstap 3)
fluidPage(
# HTML head tags
tags$head(
# load custom stylesheet
tags$link(rel = "stylesheet", type = "text/css", href = "app.css"),
# load custom JS
tags$script(src = "js.cookie.min.js"), # JS for cookie (GDPR)
tags$script(src = "app.js"), # Application JS
# load favicon from html
includeHTML("www/favicon/favicon.html"),
# SEO meta tags (partially redundant)
# get_description from R/utils.R
tags$meta(name = "description", content=get_description()),
# get_keywords() from R/utils.R
tags$meta(name = "keywords", content=get_keywords()),
# Open Graph Tags
# get_title from R/utils.R
tags$meta(property = "og:title", content = get_title()),
# get_description from R/utils.R
tags$meta(property = "og:description", content = get_description()),
tags$meta(property = "og:image",
content =
"https://raw.githubusercontent.com/CRSU-Apps/MetaDTA/main/www/images/MetaCNMALogo.png" # nolint
),
# GDPR notice UI (R/module_analytics.R)
GdprUi(id = "cookies")
),
# Set up Shinyjs
useShinyjs(),
shinybusy::add_busy_spinner(
spin = "semipolar",
height = "100px",
width = "100px",
margins = c(50, 50)
),
# Use dashboardPage from shinydashboardPlus
shinydashboardPlus::dashboardPage(
header = shinydashboardPlus::dashboardHeader(
title = get_title(),
titleWidth = 300,
leftUi = data_type_module_ui("data_type")
), # Header with title from R/utils.R
sidebar = shinydashboardPlus::dashboardSidebar(
width = 300, # Sidebar (Navigation)
render_sidebar(), # Render sidebar from R/render_sidebar.R
id = "sidebar" # ID for access from modules
),
body = shinydashboard::dashboardBody(
message_alert(
"MetaCNMA is currently in BETA"
),
render_body() # Render body from R/render_body.R
),
controlbar = shinydashboardPlus::dashboardControlbar(
skin = "dark"
),
footer = shinydashboardPlus::dashboardFooter(
renderFooter()
), # Render footer from R/render_footer.R
title = get_title() # Get title from R/utils.R
)
)
)