front page improvements
This commit is contained in:
@@ -92,12 +92,6 @@
|
||||
<li class="grid_5">
|
||||
<p class="midden">and more</p>
|
||||
</li>
|
||||
<li class="grid_5">
|
||||
<div class="midden">
|
||||
<img src="/static/img/horizontal_line.png"
|
||||
alt="horizontal line">
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="main-content" id="id_blogs">
|
||||
</ul>
|
||||
@@ -158,17 +152,25 @@ $( document ).ready(function() {
|
||||
console.log('loading script');
|
||||
$.getJSON(window.location.protocol + '//'+window.location.host + '/getblogs', function(data) {
|
||||
var html = '';
|
||||
console.log(data);
|
||||
if (data.length != 0) {
|
||||
html += '<li class="grid_5"><div class="midden"><img src="/static/img/horizontal_line.png" alt="horizontal line"></div></li> '
|
||||
html += '<li class="grid_5"><h2 class="midden">Recent articles on the Analytics blog</h2></li>';
|
||||
html += '<li></li>';
|
||||
};
|
||||
$.each(data, function(key, blog) {
|
||||
console.log(blog.title);
|
||||
html += '<li class="frontitem">';
|
||||
html += '<a style="text-decoration: none; color: black;" href="'+blog.link+'">';
|
||||
html += '<h3 class="midden">'+blog.title+'</h3>';
|
||||
html += '<a href="'+blog.link+'">';
|
||||
html += '<p class="midden"><img src="'+blog.image+'" height=150px;></p>';
|
||||
html += '</a>';
|
||||
html += blog.excerpt+'</li>';
|
||||
$("#id_blogs").html(html);
|
||||
html += '<p>'+blog.excerpt+'</p>';
|
||||
html += '</a>';
|
||||
html += '</li>';
|
||||
});
|
||||
if (data.length != 0) {
|
||||
html += '<li></li>';
|
||||
};
|
||||
$("#id_blogs").html(html);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user