Update app.R
Browse files
app.R
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
# setwd("~/Downloads")
|
2 |
|
3 |
-
|
4 |
options(error = NULL)
|
5 |
library(shiny)
|
6 |
library(shinydashboard)
|
@@ -108,6 +107,15 @@ ui <- dashboardPage(
|
|
108 |
.small, small {
|
109 |
font-size: 75%;
|
110 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
"))
|
112 |
),
|
113 |
tabItems(
|
@@ -119,12 +127,12 @@ ui <- dashboardPage(
|
|
119 |
title = strong("Global Leadership Project (GLP)"),
|
120 |
solidHeader = TRUE,
|
121 |
div(
|
122 |
-
|
|
|
123 |
girafeOutput("cartogramPlot", width = "100%", height = "100%")
|
124 |
)
|
125 |
)
|
126 |
),
|
127 |
-
# New box for displaying selected country data
|
128 |
fluidRow(
|
129 |
box(
|
130 |
width = 12,
|
|
|
1 |
# setwd("~/Downloads")
|
2 |
|
|
|
3 |
options(error = NULL)
|
4 |
library(shiny)
|
5 |
library(shinydashboard)
|
|
|
107 |
.small, small {
|
108 |
font-size: 75%;
|
109 |
}
|
110 |
+
/* Responsive map container */
|
111 |
+
.map-container {
|
112 |
+
height: 65vh; /* Default height for desktop */
|
113 |
+
}
|
114 |
+
@media (max-width: 768px) {
|
115 |
+
.map-container {
|
116 |
+
height: 50vh; /* Taller height for mobile and tablets */
|
117 |
+
}
|
118 |
+
}
|
119 |
"))
|
120 |
),
|
121 |
tabItems(
|
|
|
127 |
title = strong("Global Leadership Project (GLP)"),
|
128 |
solidHeader = TRUE,
|
129 |
div(
|
130 |
+
class = "map-container",
|
131 |
+
style = "padding: 10px;", # Keep padding, height is set via CSS
|
132 |
girafeOutput("cartogramPlot", width = "100%", height = "100%")
|
133 |
)
|
134 |
)
|
135 |
),
|
|
|
136 |
fluidRow(
|
137 |
box(
|
138 |
width = 12,
|