Added img size for landing. Member images v.center
authorLaury GvR <laury@gaslightmedia.com>
Fri, 9 Sep 2016 19:24:39 +0000 (15:24 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 9 Sep 2016 19:30:11 +0000 (15:30 -0400)
Image size just for landing pages has been added as 250x125, where
before it was using the 200x100 glm_block image size.
Member images got a vertical centre with jquery to properly crop
from both bottom and top.
Reduced sidebar size on pages containing member lists so that the
member section can be wider.
Changed styles of the UL>LI forming the sublinks for the member
list grid view, so they would wrap and not be covered.

functions.php
index.php
landing-page.php
scss/_main.scss
scss/plugins/_glm-member-db.scss

index ed3022b..6b37282 100644 (file)
@@ -239,6 +239,7 @@ function mytheme_init() {
 add_action('init', 'mytheme_init', 10);
 
 add_image_size('glm_block', 200,100,true);
+add_image_size('subcat_image', 250,125,true);
 add_image_size('glm_block_frontpage', 300,408, true);
 
 function wpse_setup_theme() {
index 8d6ab92..e6732af 100644 (file)
--- a/index.php
+++ b/index.php
@@ -5,18 +5,18 @@
     </div>
         <div id="content-wrapper">
             <div id="page-title">
-                <div class="row large-collapse">
+                <div class="row">
                     <h1><?php the_title() ;?></h1>
                 </div>
             </div>
  
             <div class="row large-collapse">
               <?php if ( is_page(154) || is_page(156) || is_in_tree(154) || is_in_tree(156)){ ?>
-               <div id="side-bar-nav" class="small-4 columns show-for-large-up">
+               <div id="side-bar-nav" class="large-3 columns show-for-large-up">
                     <?php get_sidebar(); ?> 
                 </div>
 
-                <div id="main-content" class="small-12 medium-8 columns">
+                <div id="main-content" class="small-12 large-9 columns">
                 <?php  } else { ?>
                       <div id="main-content" class="small-12 columns">
                 <?php } ?>
         </div>
         
 <?php get_footer(); ?>
+<script>
+    
+$(document).ready(function () { 
+    $(".glm-member-list-image").each(function() {
+        if( $(this).height() > 175){
+            var height_difference = 175 - $(this).height();
+            height_difference = height_difference / 2;
+            //height_difference = Math.abs(height_difference) * -1;
+            $(this).css("margin-top",  height_difference);
+        }    
+    });
+});
+</script>
index bc5e7c6..5240dab 100644 (file)
@@ -45,9 +45,9 @@ Template Name: Landing Page
                       <?php if ($status !== 'private' && $status !== 'draft'){ ?>
                        <?php $id = get_the_ID();
                             if(get_post_thumbnail_id($id)){
-                                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'glm_block');
+                                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($id), 'subcat_image');
                             } else {
-                                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_parent), 'glm_block');
+                                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_parent), 'subcat_image');
                             }
                        ?>
 
index 17f6404..e3f8d74 100644 (file)
@@ -606,6 +606,8 @@ area:hover {
 //    width: 175px;
     display: block;
     margin: 0 auto;
+    border: 1px solid;
+    border-radius: 3px;
 }
 .child-page-title {
     line-height: 1;
index c5b5d02..f80b1f6 100644 (file)
@@ -94,7 +94,7 @@ body {
     }
 }
 //   2.1 Grid View
-.glm-member-db-list-grid-view {
+.glm-member-db-grid-view {
     .glm-member-list-record .glm-member-list-image-empty {
         background-image: url("../assets/no-image.jpg");
         background-repeat: no-repeat;
@@ -121,6 +121,12 @@ body {
         text-decoration: none;
         display: inline-block;
     }
+    .glm-member-list-sub-links > ul {
+        display: block;
+    }
+    .glm-member-list-sub-links > ul > li {
+        display: inline;
+    }
     .glm-member-search:before {
         background-color: $blue;
     }