Improved blog posts.
This commit is contained in:
parent
3b3b93583d
commit
0d3ce9f59d
|
@ -148,23 +148,7 @@
|
|||
<h2>Read our Blog</h2>
|
||||
<p>Check out the latest Nimbus news and blog posts:</p>
|
||||
</div>
|
||||
<div class="contribute-wrap">
|
||||
<div class="contribute blog">
|
||||
<h3>Nimbus for Newbies</h3>
|
||||
<p>In this followup to the announcement post, we look at what Nimbus actually is right now and how to build it.</p>
|
||||
<a href="https://our.status.im/nimbus-for-newbies/">Read More <img src="../img/arrow_ogn.png" /></a>
|
||||
</div>
|
||||
<div class="contribute blog">
|
||||
<h3>Status Partners with the Team Behind the Programming Language Nim</h3>
|
||||
<p>We want the best of the best to build the new Ethereum client. It only makes sense to go to the "source" to get them.</p>
|
||||
<a href="https://blog.status.im/status-partners-with-the-team-behind-the-programming-language-nim-d438207486fa">Read More <img src="../img/arrow_ogn.png" /></a>
|
||||
</div>
|
||||
<div class="contribute blog">
|
||||
<h3>Introducing Nimbus</h3>
|
||||
<p>The original announcement post - the official birth of the Nimbus project</p>
|
||||
<a href="https://blog.status.im/introducing-nimbus-3360367bb311">Read More <img src="../img/arrow_ogn.png" /></a>
|
||||
</div>
|
||||
|
||||
<div class="contribute-wrap contribute-wrap-blog">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1229,6 +1229,17 @@ pre {
|
|||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.contribute h3 a{
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.contribute.blog
|
||||
.feature-image
|
||||
margin: -30px 0 24px -24px
|
||||
img
|
||||
border-radius: 5px 5px 0 0;
|
||||
width: calc(100% + 24px);
|
||||
|
||||
.contribute p
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
$(document).ready(function () {
|
||||
let url = 'https://our-status.ghost.io/ghost/api/v0.1/posts/?limit=3&formats=plaintext&client_id=ghost-frontend&client_secret=1c5590b47eb4';
|
||||
var url = 'https://our-status.ghost.io/ghost/api/v0.1/posts/?limit=3&include=tags&filter=tags:nimbus&formats=plaintext&client_id=ghost-frontend&client_secret=1c5590b47eb4';
|
||||
var urlBase = [location.protocol, '//', location.host, location.pathname].join('');
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: url,
|
||||
success: function (response) {
|
||||
$.each(response.posts, function (index, val) {
|
||||
$('.contribute.blog:nth-child('+ (index+1) +') h3').text(val.title);
|
||||
var excerpt = '';
|
||||
if(val.custom_excerpt != null) {
|
||||
$('.contribute.blog:nth-child('+ (index+1) +') p').text(val.custom_excerpt);
|
||||
excerpt = val.custom_excerpt;
|
||||
}else{
|
||||
$('.contribute.blog:nth-child('+ (index+1) +') p').text(getWords(val.plaintext));
|
||||
excerpt = getWords(val.plaintext);
|
||||
}
|
||||
$('.contribute-wrap-blog').prepend('<div class="contribute blog"><a href="https://our.status.im/'+ val.slug +'" class="feature-image"><img src="https://our.status.im/'+ val.feature_image +'" alt="'+ val.title +'"></a><h3><a href="https://our.status.im/'+ val.slug +'">'+ val.title +'</a></h3><p>'+ excerpt +'</p><a href="https://our.status.im/'+ val.slug +'">Read More <img src="'+ urlBase +'/img/arrow_ogn.png" /></a></div>');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue