Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodebb-theme-lavender

Package Overview
Dependencies
Maintainers
1
Versions
359
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-theme-lavender - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

package.json
{
"name": "nodebb-theme-lavender",
"version": "0.0.5",
"version": "0.0.6",
"description": "Lavender Theme for NodeBB",

@@ -5,0 +5,0 @@ "main": "theme.less",

@@ -10,3 +10,3 @@ $('document').ready(function() {

setTimeout(function() {
new Masonry('.row.home > div', {
new Masonry('.row.home > div', {
itemSelector: '.category-item',

@@ -17,33 +17,37 @@ columnWidth: '.category-item',

}
// Copied from categories.js
var li = document.createElement('li'),
recent_replies = document.getElementById('category_recent_replies'),
frag = document.createDocumentFragment();
$.get(RELATIVE_PATH + '/api/recent/month', {}, function(posts) {
posts = posts.topics;
var recentReplies = $('#category_recent_replies');
for (var i = 0, numPosts = posts.length; i < numPosts; i++) {
li.setAttribute('data-pid', posts[i].pid);
li.innerHTML = '<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>' +
'<a href="' + RELATIVE_PATH + '/topic/' + posts[i].slug + '#' + posts[i].teaser_pid + '">' +
'<strong><span>'+ posts[i].teaser_username + '</span></strong> posted in' +
'<p>' +
posts[i].title +
'</p>' +
'</a>' +
'<span class="timeago pull-right" title="' + posts[i].relativeTime + '"></span>';
if(!posts || !posts.topics || !posts.topics.length) {
recentReplies.html('No topics have been posted yet.');
return;
}
frag.appendChild(li.cloneNode(true));
recent_replies.appendChild(frag);
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].userslug + '"><img title="' + posts[i].username + '" class="img-rounded user-img" src="' + posts[i].picture + '"/></a>' +
'<p>' +
'<strong><span>'+ posts[i].username + '</span></strong>' +
'<span> posted 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>';
}
if (posts.length) {
$('#category_recent_replies span.timeago').timeago();
app.createUserTooltips();
} else {
recent_replies.innerHTML = 'No topics have been posted yet.';
}
recentReplies.html(replies);
$('#category_recent_replies span.timeago').timeago();
app.createUserTooltips();
});

@@ -50,0 +54,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc