reduced margin under the blog title and set blog image to contain instead of cover
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 4 Aug 2016 17:45:04 +0000 (13:45 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 4 Aug 2016 17:45:04 +0000 (13:45 -0400)
views/frontPage.php

index 5d5f5dd..b855e59 100644 (file)
@@ -3,7 +3,7 @@
 echo '<div class="hubspot-container">'
        
         . '<a class="image-link" href="' .$url .'">'
-            . '<div class="hubspot-featured-image" style="margin: 0 auto;width: 200px; height: 200px;background: url('. $image_url . ') no-repeat center    center;">'
+            . '<div class="hubspot-featured-image" style="background: url('. $image_url . ') no-repeat center center;">'
             . '</div>'
         . '</a>'
          . '<div class="hubspot-title">'
@@ -22,13 +22,15 @@ echo '<div class="hubspot-container">'
      var image_link = jQuery(".image-link");
      var image = jQuery(".hubspot-featured-image");
      var blog_characters = blog.text().length;
+     var title = jQuery(".hubspot-title");
 
-     image.css("margin-bottom", "20px").css("background-size", "cover");
+     image.css("margin-bottom", "20px").css("background-size", "contain").css("width", "200x").css("height","200px");;
      image_link.css("display", "block").css("width", "200px");
      blog.find('img').remove();
+     title.find("h1").css("margin-bottom", "15px");
 
-     if(blog_characters > 550){
-         blog.text(blog.text().substring(0,550) + '...');
+     if(blog_characters > 400){
+         blog.text(blog.text().substring(0,400) + '...');
      }
 
 </script>
\ No newline at end of file