forked from swsoyee/2019-ncov-japan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
239 lines (238 loc) · 6.71 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
source(
file = "global.R",
local = T,
encoding = "UTF-8"
)
shinyUI(
dashboardPagePlus(
skin = "red",
title = i18n$t("新 型 コ ロ ナ ウ イ ル ス 感 染 速 報"),
header = dashboardHeaderPlus(
title = paste0("🦠 ", i18n$t("新 型 コ ロ ナ ウ イ ル ス 感 染 速 報")),
titleWidth = 600,
enable_rightsidebar = F
),
# TODO 言語設定の追加
sidebar = dashboardSidebar(sidebarMenu(
id = "sideBarTab",
menuItem(
i18n$t("感染速報"),
tabName = "japan",
icon = icon("tachometer-alt"),
badgeLabel = i18n$t("実況中"),
badgeColor = "red"
),
menuItem(
i18n$t("感染ルート"),
tabName = "route",
icon = icon("project-diagram"),
badgeLabel = i18n$t("開発中"),
badgeColor = "black"
),
menuItem(
i18n$t("自治体状況"),
tabName = "prefStatus",
icon = icon("city"),
menuSubItem(
text = i18n$t("北海道"),
tabName = "hokkaido",
icon = icon("fish")
),
menuSubItem(
text = i18n$t("青森県"),
tabName = "aomori",
icon = icon("apple-alt")
),
menuSubItem(
text = i18n$t("岩手県"),
tabName = "iwate" # ,
# icon = icon('apple-alt')
),
menuSubItem(
text = i18n$t("宮城県"),
tabName = "miyagi" # ,
# icon = icon('apple-alt')
),
menuSubItem(
text = i18n$t("茨城県"),
tabName = "ibaraki" # ,
# icon = icon('apple-alt')
),
menuSubItem(
text = i18n$t("神奈川県"),
tabName = "kanagawa" # ,
# icon = icon('apple-alt')
)
),
menuItem(
i18n$t("事例マップ"),
tabName = "caseMap",
icon = icon("map-marked-alt"),
badgeLabel = i18n$t("破棄"),
badgeColor = "black"
),
menuItem(
i18n$t("状況分析"),
tabName = "academic",
icon = icon("eye"),
badgeLabel = "V 0.1",
badgeColor = "black"
),
menuItem(
# Google
i18n$t("自粛効果"),
tabName = "google",
icon = icon("google"),
badgeLabel = "V 0.1",
badgeColor = "black"
),
menuItem(
i18n$t("サイトについて"),
tabName = "about",
icon = icon("readme"),
badgeLabel = i18n$t("開発中"),
badgeColor = "black"
)
)),
dashboardBody(
tags$head(
tags$link(rel = "icon", href = "favicon.ico"),
tags$meta(name = "twitter:card", content = "summary_large_image"),
# tags$meta(property = 'og:url', content = 'https://covid-2019.live/'),
tags$meta(property = "og:title", content = "🦠新型コロナウイルス感染速報"),
tags$meta(property = "og:description", content = "日本における新型コロナウイルスの最新感染・罹患情報をいち早く速報・まとめるサイトです。"),
tags$meta(property = "og:image", content = "https://repository-images.githubusercontent.com/237152814/77329f80-917c-11ea-958c-731c8433c504")
),
tabItems(
tabItem(
tabName = "japan",
source(
file = paste0(PAGE_PATH, "Main/Main.ui.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "route",
source(
file = paste0(PAGE_PATH, "Route.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "hokkaido",
source(
file = paste0(PAGE_PATH, "Pref/Hokkaido-UI.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "aomori",
source(
file = paste0(PAGE_PATH, "Pref/Aomori-UI.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "iwate",
source(
file = paste0(PAGE_PATH, "Pref/Iwate-UI.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "miyagi",
source(
file = paste0(PAGE_PATH, "Pref/Miyagi-UI.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "ibaraki",
source(
file = paste0(PAGE_PATH, "Pref/Ibaraki-UI.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "kanagawa",
source(
file = paste0(PAGE_PATH, "Pref/Kanagawa-UI.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "caseMap",
source(
file = paste0(PAGE_PATH, "CaseMap.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "academic",
source(
file = paste0(PAGE_PATH, "/Academic/Academic.ui.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "google",
source(
file = paste0(PAGE_PATH, "/Google/PrefMobility.ui.R"),
local = T,
encoding = "UTF-8"
)$value
),
tabItem(
tabName = "about",
fluidRow(
column(
width = 12,
boxPlus(
width = 12,
collapsible = F,
fluidRow(
column(
width = 12,
tagList(
includeMarkdown(paste0("README", ifelse(languageSetting == "ja", "", paste0(".", languageSetting)), ".md"))
)
)
)
)
)
)
)
)
),
footer = dashboardFooter(
left_text = tagList(userPost(
id = 1,
src = "profile.png",
author = tagList(
tags$small("Developed by"),
"Su Wei"
),
collapsible = F,
description = "Front-End Engineer | ex-Bioinformatician"
)),
right_text = tagList(
tags$div(
style = "font-size:22px;letter-spacing: .3rem;",
tags$a(href = "https://github.com/swsoyee/2019-ncov-japan", icon("github")),
tags$a(href = "https://twitter.com/swsoyee", icon("twitter")),
tags$a(href = "https://www.linkedin.com/in/infinityloop/", icon("linkedin"))
)
)
)
)
)