From 9407c5b2e4a57e808aed60aad6d5eab0225e8a08 Mon Sep 17 00:00:00 2001 From: Rhonda D'Vine Date: Wed, 17 Apr 2019 20:27:42 +0200 Subject: hiding the language list until you mouse-over --- english/langSelector.css | 46 +++++++++++++++++++++++++++++++++++ english/template/debian/basic.wml | 1 + english/template/debian/languages.wml | 6 ++--- 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 english/langSelector.css diff --git a/english/langSelector.css b/english/langSelector.css new file mode 100644 index 00000000000..ccec2a2b7e2 --- /dev/null +++ b/english/langSelector.css @@ -0,0 +1,46 @@ +/* + * https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_js_dropdown_hover + */ + +/* we don't use it as a button +.dropbtn { + background-color: #4CAF50; + color: white; + padding: 16px; + font-size: 16px; + border: none; +} +*/ + +.pageLang { + position: relative; + /* display: inline-block; */ +} + +.langContainer { + display: none; + position: absolute; + background-color: #f1f1f1; + /* min-width: 160px; */ + width: fit-content; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + z-index: 1; + padding: 10px 10px 10px 10px; +} + +/* formating in a block - not practical +.langContainer a { + color: black; + padding: 12px 16px; + text-decoration: none; + display: block; +} +*/ + +.langContainer a:hover {background-color: #ddd;} + +.pageLang:hover .langContainer {display: block;} + +/* +.pageLang:hover .dropbtn {background-color: #3e8e41;} +*/ diff --git a/english/template/debian/basic.wml b/english/template/debian/basic.wml index e3bfedf7cdd..0358384761f 100644 --- a/english/template/debian/basic.wml +++ b/english/template/debian/basic.wml @@ -39,6 +39,7 @@ {#style#: + :#style#} diff --git a/english/template/debian/languages.wml b/english/template/debian/languages.wml index 5be9a31cc6c..477b862da71 100644 --- a/english/template/debian/languages.wml +++ b/english/template/debian/languages.wml @@ -190,7 +190,7 @@ sub language_selector_css { if ( $rel_dir eq "" and $file eq "sitemap" ) { # special case for the site map $str .= "\n"; - $str .= "
\n"; + $str .= "
\n"; $str .= "

\n"; $str .= q{This page is also available in the following languages:} @@ -226,12 +226,12 @@ sub language_selector_css { } elsif (@used_langs) { $str .= "\n"; - $str .= "

\n"; + $str .= "
\n"; $str .= "
\n"; $str .= q{This page is also available in the following languages:} . "\n"; - $str .= "
\n"; + $str .= "
\n"; # Language sorting. Create a hash going from the language's own name # for itself to the language's ISO keys. Then work with the sorted -- cgit v1.2.3