From d81f995941886a1f736b2f6e857e112c06a5179f Mon Sep 17 00:00:00 2001 From: Eli JacobX Ramirez Cervantes Date: Thu, 2 Feb 2017 12:10:31 -0600 Subject: [PATCH 1/2] Fix mobile menu --- source/_themes/clearlinux/header.html | 41 +++++------ .../clearlinux/static/css/overrides.css | 73 +++++++++++++++++++ .../_themes/clearlinux/static/js/project.js | 9 ++- 3 files changed, 100 insertions(+), 23 deletions(-) diff --git a/source/_themes/clearlinux/header.html b/source/_themes/clearlinux/header.html index c9e14f16..a20c36c5 100755 --- a/source/_themes/clearlinux/header.html +++ b/source/_themes/clearlinux/header.html @@ -13,31 +13,28 @@
-
- -
- -

Get Involved

- - -
-
+
+ +
+

Get Involved

+ +
+
- +
- + diff --git a/source/_themes/clearlinux/static/css/overrides.css b/source/_themes/clearlinux/static/css/overrides.css index 1ec0d515..de8d444d 100755 --- a/source/_themes/clearlinux/static/css/overrides.css +++ b/source/_themes/clearlinux/static/css/overrides.css @@ -159,14 +159,30 @@ input[type=submit], input[type=reset]{ margin: 0px; } +footer .mobile-menu { + display: none; +} + footer .menu-name-menu-social-media { + position: relative; + float: left; +} + +@media only screen and (min-width: 990px) { + footer .menu-name-menu-social-media { text-align: left; margin-right: 15px; position: absolute; right: 0; top: 25px; + } +} +/* Menu mobile */ +.project-header .left { + margin-left: 40px; } +<<<<<<< HEAD .section-documentation table { margin: 2em 0; display: block; @@ -195,3 +211,60 @@ footer .menu-name-menu-social-media { width: 100%; display: block; } +======= +.project-header .right { + display: block; + float: left; +} + +header .right .mobile-menu { + display: block; + margin-top: -40px; +} + +header .region-header { + display: none +} + +header.menu-open .right{ + border-top: none; + background-color: transparent; + position: relative; +} + +header.menu-open .right .mobile-menu { + display: block; + margin-top: -40px; +} + +header.menu-open .region-header{ + display: block; + position: relative; + left: 0px; + top: 20px; + border-top: 2px solid #000; + background-color: #2d3237; + display: block; + -webkit-box-shadow: 4px 4px 5px 0 rgba(45, 50, 55, 0.3); + -moz-box-shadow: 4px 4px 5px 0 rgba(45, 50, 55, 0.3); + box-shadow: 4px 4px 5px 0 rgba(45, 50, 55, 0.3); +} + +@media only screen and (min-width: 1200px) { + .project-header .left { + margin-left: 0px; + } + + .project-header .right { + float: right; + } + + header .right .mobile-menu, header.menu-open .right .mobile-menu { + display: none; + } + + header .region-header { + display: block + } +} +>>>>>>> Fix mobile menu diff --git a/source/_themes/clearlinux/static/js/project.js b/source/_themes/clearlinux/static/js/project.js index 824ab8f6..9221da79 100644 --- a/source/_themes/clearlinux/static/js/project.js +++ b/source/_themes/clearlinux/static/js/project.js @@ -35,7 +35,7 @@ jQuery(document).ready(function($){ }); $('header .mobile-menu').click(function(){ - $(this).parent().toggleClass('menu-open'); + $('header').toggleClass('menu-open'); $('.o1-logo-container-mobile').toggleClass('menu-open'); $('body').toggleClass('menu-opened'); }); @@ -63,6 +63,13 @@ jQuery(document).ready(function($){ } } + //Hidde mobile menu + $(window).resize(function(event) { + var w = $(window).width(); + if(w > 1199) { + $('header').removeClass('menu-open'); + } + }); //Animates logo on scroll $('body, html').scroll(onScroll); $(window).scroll(onScroll); From a7948f0e509adc651078cab2997dbec3f2407c73 Mon Sep 17 00:00:00 2001 From: Eli JacobX Ramirez Cervantes Date: Thu, 2 Feb 2017 12:14:43 -0600 Subject: [PATCH 2/2] Conflicts were resolved --- source/_themes/clearlinux/static/css/overrides.css | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/_themes/clearlinux/static/css/overrides.css b/source/_themes/clearlinux/static/css/overrides.css index de8d444d..975c359b 100755 --- a/source/_themes/clearlinux/static/css/overrides.css +++ b/source/_themes/clearlinux/static/css/overrides.css @@ -182,7 +182,6 @@ footer .menu-name-menu-social-media { margin-left: 40px; } -<<<<<<< HEAD .section-documentation table { margin: 2em 0; display: block; @@ -211,7 +210,7 @@ footer .menu-name-menu-social-media { width: 100%; display: block; } -======= + .project-header .right { display: block; float: left; @@ -267,4 +266,3 @@ header.menu-open .region-header{ display: block } } ->>>>>>> Fix mobile menu