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">'
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