From 84cfb9c01b18c22310b124d16dd1aeac8e031a6f Mon Sep 17 00:00:00 2001 From: stesiam <52320488+stesiam@users.noreply.github.com> Date: Thu, 18 Apr 2024 21:29:36 +0300 Subject: [PATCH] Update app --- app/app.R | 20 +++++++++++-------- app/www/styles.css | 26 ++++++++++++++++++------- app/www/translations/translation_el.csv | 3 ++- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/app/app.R b/app/app.R index 8eac212..ea0294d 100644 --- a/app/app.R +++ b/app/app.R @@ -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", @@ -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") ) ) diff --git a/app/www/styles.css b/app/www/styles.css index e220433..a26ffb5 100644 --- a/app/www/styles.css +++ b/app/www/styles.css @@ -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; @@ -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; +} +} diff --git a/app/www/translations/translation_el.csv b/app/www/translations/translation_el.csv index 4bffd74..8456720 100644 --- a/app/www/translations/translation_el.csv +++ b/app/www/translations/translation_el.csv @@ -14,4 +14,5 @@ en,el "Plefsi", "Πλεύση Ελευθερίας" "MeRA25", "ΜέΡΑ25" "Other Party #1", "Άλλο κόμμα #1" -"Other Party #2", "Άλλο κόμμα #2" \ No newline at end of file +"Other Party #2", "Άλλο κόμμα #2" +"Choose Electoral System: ", "Εκλογικό σύστημα: " \ No newline at end of file