-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
151 lines (149 loc) · 4.74 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# ---------------------------------------------------------
# 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
#
ui <- function(input, output, session) {
bslib::page(
# use_tota11y(),
title = tags$head(
tags$link(
rel = "shortcut icon",
href = "dfefavicon.png"
),
# Add title for browser tabs
tags$title("Children's Social Care - Outcomes and Enablers")
),
use_shiny_title(),
tags$html(lang = "en"),
# Add meta description for search engines
meta() %>%
meta_general(
application_name = "Children's Social Care - Outcomes and Enablers",
description = "Children's Social Care - Outcomes and Enablers",
robots = "index,follow",
generator = "R-Shiny",
subject = "stats development",
rating = "General",
referrer = "no-referrer"
),
shinyjs::useShinyjs(),
dfe_cookies_script(),
cookies_banner_ui(
name = "Children's Social Care - Outcomes and Enablers"
),
dfeshiny::custom_disconnect_message(
links = c(site_primary, site_overflow)
),
# Setting up cookie consent based on a cookie recording the consent:
# https://book.javascript-for-r.com/shiny-cookies.html
tags$head(
tags$script(
src = paste0(
"https://cdn.jsdelivr.net/npm/js-cookie@rc/",
"dist/js.cookie.min.js"
)
),
tags$script(src = "cookie-consent.js"),
),
tags$head(includeScript("www/downloader.js")),
tags$head(includeHTML(("google-analytics.html"))),
tags$head(
tags$link(
rel = "stylesheet",
type = "text/css",
href = "dfe_shiny_gov_style.css"
)
),
shinyGovstyle::header(
main_text = "",
main_link = "https://www.gov.uk/government/organisations/department-for-education",
secondary_text = "Children's Social Care - Outcomes and Enablers",
logo = "images/DfE_logo_landscape.png",
logo_width = 150,
logo_height = 32
),
shinyGovstyle::banner(
"beta banner",
"beta",
paste0(
"This is a new service - your <a class = 'govuk-link' href = 'https://forms.office.com/e/dMDRycTXcU'>feedback</a> will help us to improve it."
)
),
shinyGovstyle::banner(
"banner",
"",
paste0(
"We have updated the Dashboard with the latest published data for Children in Need (1st Nov 2024), Children Looked After (14th Nov 2024) and Ofsted Leadership Ratings (up to 30th August 2024)"
)
),
shiny::navlistPanel(
# "",
id = "navlistPanel",
widths = c(2, 8),
well = FALSE,
introductionPanel(),
"Outcomes",
outcome1_tab(),
outcome2_tab(),
outcome3_tab(),
outcome4_tab(),
"Enablers",
enabler1_tab(),
enabler2_tab(),
enabler3_tab(),
"Support",
disclaimer_tab(),
omitted_data_tab(),
data_sources_tab(),
a11y_panel(),
shiny::tabPanel(
value = "cookies_panel_ui",
"Cookies",
cookies_panel_ui(google_analytics_key = google_analytics_key)
),
support_links(),
tutorialPanel(),
),
tags$div(
style = "postion: relative; text-align: center; margin-bottom: 50px;",
tags$a(href = "#top", "Return to top")
),
footer(full = TRUE)
)
}