From 2c21444037e61cc623151943a62ad85dc4ecc905 Mon Sep 17 00:00:00 2001 From: HenryGBC Date: Thu, 23 Mar 2017 22:29:17 -0430 Subject: [PATCH] Languages selector --- alplora/static/alplora/css/alplora.css | 24 +++++++++++++ alplora/static/alplora/js/main.js | 14 ++++++++ alplora/templates/alplora/index.html | 9 +++++ alplora/templates/alplora/login.html | 9 +++++ alplora/views.py | 47 ++++++++++++++++++++------ 5 files changed, 92 insertions(+), 11 deletions(-) diff --git a/alplora/static/alplora/css/alplora.css b/alplora/static/alplora/css/alplora.css index 7fc5f3c2..12d7b913 100755 --- a/alplora/static/alplora/css/alplora.css +++ b/alplora/static/alplora/css/alplora.css @@ -473,7 +473,31 @@ section h3.section-subheading { .ungleich-gallery-text-carousel .carousel-inner .item, .text-carousel .carousel-inner .item { padding: 0px 30px; } +.nav-language .select-language{ + padding: 15px 10px; + cursor: pointer; +} +.nav-language .select-language span{ + margin-left: 5px; + margin-right: 5px; +} +.nav-language .drop-language{ + position: absolute; + top: 50px; + left: 10px; + background: #fff; + width: 111px; + height: 60px; + padding: 10px 25px; + -webkit-box-shadow: -8px 13px 31px -8px rgba(77,77,77,1); + -moz-box-shadow: -8px 13px 31px -8px rgba(77,77,77,1); + box-shadow: -8px 13px 31px -8px rgba(77,77,77,1); + display: none; +} +.nav-language .drop-language a{ + cursor: pointer; +} @media only screen and (max-device-width: 480px) { .carousel-text { diff --git a/alplora/static/alplora/js/main.js b/alplora/static/alplora/js/main.js index 1e6a4668..ae32b29e 100755 --- a/alplora/static/alplora/js/main.js +++ b/alplora/static/alplora/js/main.js @@ -16,6 +16,7 @@ $( document ).ready(function() { init_nav(); initBackgroundsHeader(); + init_hovers(); }); //Infinite loop for change Background Header @@ -45,4 +46,17 @@ } + function init_hovers(){ + $('.select-language').hover(function() { + $('.drop-language').show(); + }, function() { + $('.drop-language').hide(); + }) + $('.drop-language').hover(function() { + $('.drop-language').show(); + }, function() { + $('.drop-language').hide(); + }) + } + })(jQuery); \ No newline at end of file diff --git a/alplora/templates/alplora/index.html b/alplora/templates/alplora/index.html index 4016b46e..9bc12a53 100644 --- a/alplora/templates/alplora/index.html +++ b/alplora/templates/alplora/index.html @@ -87,6 +87,15 @@