nodebb-theme-lavender
Advanced tools
Comparing version 0.0.21 to 0.0.22-1
@@ -0,0 +0,0 @@ (function(module) { |
{ | ||
"name": "nodebb-theme-lavender", | ||
"version": "0.0.21", | ||
"version": "0.0.22-1", | ||
"description": "Lavender Theme for NodeBB", | ||
@@ -5,0 +5,0 @@ "main": "theme.less", |
{ | ||
"id": "nodebb-theme-lavender", | ||
"library": "./lib/theme.js", | ||
@@ -3,0 +4,0 @@ "hooks": [ |
@@ -0,0 +0,0 @@ Lavender Theme for NodeBB |
@@ -6,55 +6,16 @@ $('document').ready(function() { | ||
], function(Masonry, imagesLoaded) { | ||
$(document).bind('DOMNodeInserted', function(event) { | ||
// Unsure about performance of this, probably pretty bad. Need to bind to ajaxify.onchange or similar instead. | ||
if (event.target.className == 'row home') { | ||
$(window).on('action:ajaxify.end', function(ev, data) { | ||
var url = data.url; | ||
if (url === "") { | ||
if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { | ||
setTimeout(function() { | ||
var masonry = new Masonry('.row.home > div', { | ||
itemSelector: '.category-item', | ||
columnWidth: '.category-item', | ||
}); | ||
var masonry = new Masonry('.row.home > div', { | ||
itemSelector: '.category-item', | ||
columnWidth: '.category-item', | ||
}); | ||
$('.row.home > div').imagesLoaded(function() { | ||
masonry.layout(); | ||
}); | ||
}, 50); | ||
$('.row.home > div').imagesLoaded(function() { | ||
masonry.layout(); | ||
}); | ||
} | ||
// Copied from categories.js | ||
$.get(RELATIVE_PATH + '/api/recent/month', {}, function(posts) { | ||
var recentReplies = $('#category_recent_replies'); | ||
if(!posts || !posts.topics || !posts.topics.length) { | ||
recentReplies.html('No topics have been posted yet.'); | ||
return; | ||
} | ||
posts = posts.topics.slice(0, 8); | ||
var replies = ''; | ||
for (var i = 0, numPosts = posts.length; i < numPosts; ++i) { | ||
var lastPostIsoTime = utils.toISOString(posts[i].lastposttime); | ||
replies += '<li data-pid="'+ posts[i].pid +'" class="clearfix">' + | ||
'<a href="' + RELATIVE_PATH + '/user/' + posts[i].teaser_userslug + '"><img title="' + posts[i].teaser_username + '" class="img-rounded user-img" src="' + posts[i].teaser_userpicture + '"/></a>' + | ||
'<p>' + | ||
'<strong><span>'+ posts[i].teaser_username + '</span></strong>' + | ||
'<span> [[global:posted]] [[global:in]] </span>' + | ||
'"<a href="' + RELATIVE_PATH + '/topic/' + posts[i].slug + '#' + posts[i].teaser_pid + '" >' + posts[i].title + '</a>"' + | ||
'</p>'+ | ||
'<span class="pull-right">'+ | ||
'<span class="timeago" title="' + lastPostIsoTime + '"></span>' + | ||
'</span>'+ | ||
'</li>'; | ||
} | ||
translator.translate(replies, function(translatedHtml) { | ||
recentReplies.html(translatedHtml); | ||
$('#category_recent_replies span.timeago').timeago(); | ||
app.createUserTooltips(); | ||
}); | ||
}); | ||
} | ||
@@ -61,0 +22,0 @@ }); |
@@ -0,0 +0,0 @@ /*! |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
347370
2752
3239