Update app.R
Browse files
app.R
CHANGED
|
@@ -18,15 +18,15 @@ library(ggiraph) # For interactive hover tooltips and selections
|
|
| 18 |
ui <- dashboardPage(
|
| 19 |
skin = "black",
|
| 20 |
dashboardHeader(
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
| 28 |
)
|
| 29 |
-
)
|
| 30 |
),
|
| 31 |
dashboardSidebar(
|
| 32 |
sidebarMenu(
|
|
@@ -81,7 +81,6 @@ ui <- dashboardPage(
|
|
| 81 |
HTML("
|
| 82 |
(function() {
|
| 83 |
const shareBtn = document.getElementById('share-button');
|
| 84 |
-
|
| 85 |
// Reusable helper function to show a small “Copied!” message
|
| 86 |
function showCopyNotification() {
|
| 87 |
const notification = document.createElement('div');
|
|
@@ -97,11 +96,9 @@ ui <- dashboardPage(
|
|
| 97 |
document.body.appendChild(notification);
|
| 98 |
setTimeout(() => { notification.remove(); }, 2000);
|
| 99 |
}
|
| 100 |
-
|
| 101 |
shareBtn.addEventListener('click', function() {
|
| 102 |
const currentURL = window.location.href;
|
| 103 |
const pageTitle = document.title || 'Check this out!';
|
| 104 |
-
|
| 105 |
// If browser supports Web Share API
|
| 106 |
if (navigator.share) {
|
| 107 |
navigator.share({
|
|
@@ -238,6 +235,7 @@ ui <- dashboardPage(
|
|
| 238 |
)
|
| 239 |
)
|
| 240 |
),
|
|
|
|
| 241 |
column(
|
| 242 |
width = 3,
|
| 243 |
box(
|
|
@@ -248,6 +246,39 @@ ui <- dashboardPage(
|
|
| 248 |
style = "overflow-y: auto;" # Scroll if content overflows
|
| 249 |
)
|
| 250 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
)
|
| 252 |
)
|
| 253 |
)
|
|
@@ -344,7 +375,9 @@ server <- function(input, output, session) {
|
|
| 344 |
font-family: 'OCR A Extended', monospace;
|
| 345 |
color: black;"
|
| 346 |
),
|
| 347 |
-
opts_selection(type = "single") # Single selection: one country at a time
|
|
|
|
|
|
|
| 348 |
)
|
| 349 |
)
|
| 350 |
})
|
|
|
|
| 18 |
ui <- dashboardPage(
|
| 19 |
skin = "black",
|
| 20 |
dashboardHeader(
|
| 21 |
+
title = span(
|
| 22 |
+
style = "font-weight: 600; font-size: 13px;",
|
| 23 |
+
a(
|
| 24 |
+
href = "http://www.globalleadershipproject.net",
|
| 25 |
+
"GlobalLeadershipProject.net",
|
| 26 |
+
target = "_blank",
|
| 27 |
+
style = "color: white; text-decoration: underline;"
|
| 28 |
+
)
|
| 29 |
)
|
|
|
|
| 30 |
),
|
| 31 |
dashboardSidebar(
|
| 32 |
sidebarMenu(
|
|
|
|
| 81 |
HTML("
|
| 82 |
(function() {
|
| 83 |
const shareBtn = document.getElementById('share-button');
|
|
|
|
| 84 |
// Reusable helper function to show a small “Copied!” message
|
| 85 |
function showCopyNotification() {
|
| 86 |
const notification = document.createElement('div');
|
|
|
|
| 96 |
document.body.appendChild(notification);
|
| 97 |
setTimeout(() => { notification.remove(); }, 2000);
|
| 98 |
}
|
|
|
|
| 99 |
shareBtn.addEventListener('click', function() {
|
| 100 |
const currentURL = window.location.href;
|
| 101 |
const pageTitle = document.title || 'Check this out!';
|
|
|
|
| 102 |
// If browser supports Web Share API
|
| 103 |
if (navigator.share) {
|
| 104 |
navigator.share({
|
|
|
|
| 235 |
)
|
| 236 |
)
|
| 237 |
),
|
| 238 |
+
|
| 239 |
column(
|
| 240 |
width = 3,
|
| 241 |
box(
|
|
|
|
| 246 |
style = "overflow-y: auto;" # Scroll if content overflows
|
| 247 |
)
|
| 248 |
)
|
| 249 |
+
),
|
| 250 |
+
|
| 251 |
+
# -- 2nd row: citation spanning the full width below --
|
| 252 |
+
fluidRow(
|
| 253 |
+
column(
|
| 254 |
+
width = 12,
|
| 255 |
+
box(
|
| 256 |
+
width = NULL,
|
| 257 |
+
title = strong("Citation"),
|
| 258 |
+
solidHeader = TRUE,
|
| 259 |
+
|
| 260 |
+
p("John Gerring, Alan Hicken, Connor T. Jerzak, Erzen Öncel.
|
| 261 |
+
The Composition of Descriptive Representation. ",
|
| 262 |
+
em("American Political Science Review,"), " 118(2): 784–801, 2024."
|
| 263 |
+
),
|
| 264 |
+
|
| 265 |
+
tags$p(
|
| 266 |
+
tags$a(
|
| 267 |
+
href = "https://www.cambridge.org/core/services/aop-cambridge-core/content/view/7EAEA1CA4C553AB9D76054D1FA9C0840/S0003055423000680a.pdf/the-composition-of-descriptive-representation.pdf",
|
| 268 |
+
"View PDF",
|
| 269 |
+
target = "_blank"
|
| 270 |
+
)
|
| 271 |
+
),
|
| 272 |
+
|
| 273 |
+
tags$p(
|
| 274 |
+
tags$a(
|
| 275 |
+
href = "https://connorjerzak.com/wp-content/uploads/2024/07/CompositionBib.txt",
|
| 276 |
+
"BibTeX",
|
| 277 |
+
target = "_blank"
|
| 278 |
+
)
|
| 279 |
+
)
|
| 280 |
+
)
|
| 281 |
+
)
|
| 282 |
)
|
| 283 |
)
|
| 284 |
)
|
|
|
|
| 375 |
font-family: 'OCR A Extended', monospace;
|
| 376 |
color: black;"
|
| 377 |
),
|
| 378 |
+
opts_selection(type = "single"), # Single selection: one country at a time
|
| 379 |
+
opts_zoom(min = 1, max = 10), # <-- Enables zooming
|
| 380 |
+
opts_toolbar(position = "topright") # <-- Adds a small toolbar
|
| 381 |
)
|
| 382 |
)
|
| 383 |
})
|