From a67db35d61a18d60b9b215ab3e47188271a52d06 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Fri, 6 Jan 2023 13:37:34 -0500 Subject: [PATCH] Persistent change language dialog on click --- libretranslate/static/css/main.css | 5 +-- libretranslate/templates/index.html | 51 ++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/libretranslate/static/css/main.css b/libretranslate/static/css/main.css index 3fdcc25..be150e8 100644 --- a/libretranslate/static/css/main.css +++ b/libretranslate/static/css/main.css @@ -56,8 +56,9 @@ h3.header { display: none; } -#nav:hover #change-language:hover + .locale-panel, -#nav-mobile:hover #change-language:hover + .locale-panel{ +#nav:hover .change-language:hover + .locale-panel, +#nav-mobile:hover .change-language:hover + .locale-panel, +.change-language.clicked + .locale-panel{ display: block; } diff --git a/libretranslate/templates/index.html b/libretranslate/templates/index.html index 5726b92..e058577 100644 --- a/libretranslate/templates/index.html +++ b/libretranslate/templates/index.html @@ -69,9 +69,9 @@ {% if api_keys %}
  • vpn_key
  • {% endif %} -
  • language +
  • language
  • -
  • +
  • @@ -80,22 +80,43 @@ {% endset %} {{ menulinks }} - - +