adding margin to the community map dropdown content and title if there is no featured...
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 29 Aug 2016 19:52:45 +0000 (15:52 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 29 Aug 2016 19:52:45 +0000 (15:52 -0400)
parts/community-map.php

index d83e50b..40c66a0 100644 (file)
@@ -78,6 +78,7 @@ foreach ($nav_posts as $p){
         var page_link = $(".map-page-link");
         var page_title = $(".map-page-title");
         var page_content = $(".map-page-content");
+        var page_title_container = $(".map-page-title-container");
 
 
         // set the default data next to the dropdown community map
@@ -111,9 +112,11 @@ foreach ($nav_posts as $p){
 
             // remove image container if there is no image
             if ( site_array[id]['image'] !== false ){
-              image_container.css("display", "inline-block");
-              regionData.find(image_container).css("height","175px").css("width", "300px").css("background", "url('" + site_array[id]['image'] + "')no-repeat center center").css("background-position", "cover");
+               page_title_container.css("margin-top", "0px").css("margin-bottom", "0px");
+               image_container.css("display", "inline-block");
+               regionData.find(image_container).css("height","175px").css("width", "300px").css("background", "url('" + site_array[id]['image'] + "')no-repeat center center").css("background-position", "cover");
             } else {
+                page_title_container.css("margin-top", "20px").css("margin-bottom", "20px");
                 image_container.css("display", "none");
             }