Skip to content

Commit

Permalink
Update app
Browse files Browse the repository at this point in the history
  • Loading branch information
stesiam committed Apr 18, 2024
1 parent e67af14 commit 84cfb9c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
20 changes: 12 additions & 8 deletions app/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ i18n$set_translation_language("en")

# Define UI for application that draws a histogram using HTML divs and tailwind
ui <- div(
usei18n(i18n),
# Load Tailwind CSS Just-in-time
use_daisyui(),
includeCSS("www/styles.css"),
tags$head(
tags$meta(name = "viewport",
content="width=device-width, initial-scale = 1"),
usei18n(i18n),
# Load Tailwind CSS Just-in-time
use_daisyui(),
includeCSS("www/styles.css")
),

# Title
div(class = "custom-navbar navbar bg-base-100 px-5",
Expand All @@ -35,12 +39,12 @@ ui <- div(
div(class = "card-title", i18n$t("Choose Electoral System: ")),
div(class = "selector-electoral",
div(class = "py-1 max-w-2xl mx-auto",
selectizeInput(width = "320", "elect_systems", label = "",
selectizeInput(width = "280", "elect_systems", label = "",
choices = c(
"Bonus40 (2007 - 2009)" = "bonus40",
"Bonus50 (2012 - 2019)" = "bonus50",
"Bonus 40 (2007-09)" = "bonus40",
"Bonus 50 (2012-19)" = "bonus50",
"Proportional (2023A)" = "nobonus",
"Proportional Bonus (2023B - current)" = "propbonus"),
"Proportional Bonus (2023B - )" = "propbonus"),
selected = "propbonus")
)
)
Expand Down
26 changes: 19 additions & 7 deletions app/www/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,10 @@
align-items: center;
background-color: white;
border-radius: 1em;
width: 330px;
width: 300px;
padding: 0.5em;
}

@media only screen and (max-width: 600px) {
.custom-navbar{
display: flex;
flex-direction: column;
}
}

.selector-electoral{
display: flex;
Expand All @@ -44,3 +38,21 @@ html{
}

.shiny-output-error, .shiny-output-error:before { display: none; }

@media (max-width: 600px) {



.custom-navbar{
display: flex;
flex-direction: column;
}

.table tbody tr th:nth-child(2){
display: none;
}

.table thead tr th:nth-child(2){
display: none;
}
}
3 changes: 2 additions & 1 deletion app/www/translations/translation_el.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ en,el
"Plefsi", "Πλεύση Ελευθερίας"
"MeRA25", "ΜέΡΑ25"
"Other Party #1", "Άλλο κόμμα #1"
"Other Party #2", "Άλλο κόμμα #2"
"Other Party #2", "Άλλο κόμμα #2"
"Choose Electoral System: ", "Εκλογικό σύστημα: "

0 comments on commit 84cfb9c

Please sign in to comment.