generated from dfe-analytical-services/shiny-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
116 lines (111 loc) · 3.75 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# ---------------------------------------------------------
# This is the ui file.
# Use it to call elements created in your server file into the app, and define where they are placed.
# Also use this file to define inputs.
#
# Every UI file should contain:
# - A title for the app
# - A call to a CSS file to define the styling
# - An accessibility statement
# - Contact information
#
# Other elements like charts, navigation bars etc. are completely up to you to decide what goes in.
# However, every element should meet accessibility requirements and user needs.
#
# This file uses a slider input, but other inputs are available like date selections, multiple choice dropdowns etc.
# Use the shiny cheatsheet to explore more options: https://shiny.rstudio.com/images/shiny-cheatsheet.pdf
#
# Likewise, this template uses the navbar layout.
# We have used this as it meets accessibility requirements, but you are free to use another layout if it does too.
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
# ---------------------------------------------------------
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
# The documentation for this GOVUK components can be found at:
#
# https://github.com/moj-analytical-services/shinyGovstyle
#
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
# The documentation for this GOVUK components can be found at:
#
# https://github.com/moj-analytical-services/shinyGovstyle
#
# library(shinya11y)
ui <- function(input, output, session) {
fluidPage(
tags$head(
HTML(paste0("<title>", site_title, "</title>"))
),
tags$head(tags$link(rel = "shortcut icon", href = "dfefavicon.png")),
tags$head(includeHTML(("google-analytics.html"))),
tags$head(
tags$link(
rel = "stylesheet",
type = "text/css",
href = "dfe_shiny_gov_style.css"
)
),
tags$html(lang = "en"),
shinyjs::useShinyjs(),
dfeshiny::dfe_cookies_script(),
dfeshiny::cookies_banner_ui(
name = site_title
),
dfeshiny::custom_disconnect_message(
publication_name = ees_pub_name,
publication_link = ees_publication
),
useShinydashboard(),
dfeshiny::header(header = site_title),
shiny::navlistPanel(
"",
id = "navlistPanel",
widths = c(2, 8),
well = FALSE,
homepage_panel(),
dashboard_panel(),
technical_notes(),
a11y_panel(),
shiny::tabPanel(
value = "cookies_panel_ui",
"Cookies",
cookies_panel_ui(google_analytics_key = google_analytics_key)
),
shiny::tabPanel(
value = "support_panel",
"Support and feedback",
support_panel(
team_email = "post16.statistics@education.gov.uk",
publication_name = "Participation in education, training and NEET age 16 to 17 by local authority",
publication_slug = "participation-in-education-training-and-neet-age-16-to-17-by-local-authority",
repo_name = "https://github.com/dfe-analytical-services/nccis_localauthority_dashboard",
form_url = "https://forms.office.com/Pages/ResponsePage.aspx?id=yXfS-grGoU2187O4s0qC-WPVbuM_P-hDu3_r8-AFqmhUOTRGUDFRRjE3U0xSNjJTSTJTUVFFOUtBRC4u"
)
)
),
tags$script(
src = "script.js"
),
footer(full = TRUE)
)
}