some more refinements
This commit is contained in:
parent
515aa7f86c
commit
1f6d85a072
1 changed files with 9 additions and 3 deletions
12
script.js
12
script.js
|
@ -125,7 +125,7 @@ const updateCarousel = function(slides, posts) {
|
|||
`
|
||||
for( let i = 0; i < posts.length; i++ ) {
|
||||
let post = posts[i];
|
||||
console.log( post.content )
|
||||
/*console.log( post.content )*/
|
||||
if ( i == 0 ) {
|
||||
newHTML += `<div class="carousel-item active" data-mdb-interval="${duration}" >`;
|
||||
}
|
||||
|
@ -139,12 +139,18 @@ const updateCarousel = function(slides, posts) {
|
|||
<p class="avatar-name">${DOMPurify.sanitize(post.account.display_name)}</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row align-items-center">
|
||||
<div class="row align-items-center vertical-align-center">
|
||||
${post.media_attachments[0] ? `<div class="col-md-6"><p class="card-text">${DOMPurify.sanitize(post.content)}</p></div>` : `<div class="col-md-12"><p class="card-text">${DOMPurify.sanitize(post.content)}</p></div>`}
|
||||
${post.media_attachments[0] ? `<div class="col-md-6"><img src="${post.media_attachments[0].url}" class="card-img-bottom" align="center"> </div>` : ''}
|
||||
</div>
|
||||
<hr>
|
||||
<p class="card-text text-right"><small class="text-muted"><a href="${post.url}" target="_blank" data-time="${post.created_at}">${timeAgo(secondsAgo(new Date(post.created_at)))}</a>, <b>${post.favourites_count}</b> favorisiert, <b>${post.replies_count}</b> Antworten, <b>${post.reblogs_count}</b> geteilt</small></p>
|
||||
<p class="card-text text-right">
|
||||
<small class="text-muted"><a href="${post.url}" target="_blank" data-time="${post.created_at}">${timeAgo(secondsAgo(new Date(post.created_at)))}</a>
|
||||
${post.favourites_count ? `, <b>${post.favourites_count}</b> mal favorisiert` : '' }
|
||||
${post.replies_count ? `, <b>${post.replies_count}</b> Antworten` : '' }
|
||||
${post.reblogs_count ? `, <b>${post.reblogs_count}</b> mal geteilt` : '' }
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
`;
|
||||
newHTML += '</div>';
|
||||
|
|
Loading…
Reference in a new issue