$(document).ready(function () { // Fixes Parallax effect and div to popup overlapping with the main menu options $('div#container').append($('.popup-wrap.popup-wrap--community')[0]) $('div#container').append($('.popup-wrap.popup-wrap--projects')[0]) let url = 'https://our.status.im/ghost/api/v0.1/posts/?filter=tag:nimbus&order=published_at%20desc&limit=3&formats=plaintext&client_id=ghost-frontend&client_secret=2b055fcd57ba'; var urlBase = [location.protocol, '//', location.host, location.pathname].join(''); $.ajax({ type: "get", url: url, success: function (response) { response.posts = response.posts.reverse(); $.each(response.posts, function (index, val) { var excerpt = ''; if(val.custom_excerpt != null) { excerpt = val.custom_excerpt; }else{ excerpt = getWords(val.plaintext); } $('.contribute-wrap-blog').prepend('
'); }); } }); function getWords(str) { return str.split(/\s+/).slice(0,25).join(" "); } var months = {'01':'Jan', '02':'Feb', '03':'Mar', '04':'Apr', '05':'May', '06':'Jun', '07':'Jul', '08':'Aug', '09':'Sep', '10':'Oct', '11':'Nov', '12':'Dec'}; url = 'https://our.status.im/ghost/api/v0.1/posts/?order=published_at%20desc&limit=2&formats=plaintext&client_id=ghost-frontend&client_secret=2b055fcd57ba'; $.ajax({ type: "get", url: url, success: function (response) { response.posts = response.posts.reverse(); $.each(response.posts, function (index, val) { var excerpt = ''; if(val.custom_excerpt != null) { excerpt = val.custom_excerpt; }else{ excerpt = getWords(val.plaintext); } var newDate = new Date(val.published_at); var minutes = newDate.getMinutes(); minutes = minutes + ""; if(minutes.length == 1){ minutes = '0' + minutes; } $('.latest-posts').prepend(' \