diff --git a/README.md b/README.md index 53ad8cd6cf..8ddc2cccc8 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ Please support NodeBB development! Check out our IndieGoGo campaign and like, share, and follow us :) -[NodeBB Homepage](http://www.nodebb.org/ "NodeBB") # [IndieGoGo campaign](https://www.indiegogo.com/projects/nodebb-the-discussion-platform-of-the-future/ "IndieGoGo") # [Follow on Twitter](http://www.twitter.com/NodeBB/ "NodeBB Twitter") # [Like us on Facebook](http://www.facebook.com/NodeBB/ "NodeBB Facebook") +[NodeBB Homepage](http://www.nodebb.org/ "NodeBB") # [Follow on Twitter](http://www.twitter.com/NodeBB/ "NodeBB Twitter") # [Like us on Facebook](http://www.facebook.com/NodeBB/ "NodeBB Facebook") # NodeBB **NodeBB** is a robust Node.js driven forum built on a redis database. It is powered by web sockets, and is compatible down to IE8. - + - + ## How can I follow along/contribute? -* Our [Indiegogo campaign](https://www.indiegogo.com/projects/nodebb-the-discussion-platform-of-the-future/) is accepting contributions until August 17th, 2013 * Our feature roadmap is hosted on the project wiki's [Version History / Roadmap](https://github.com/designcreateplay/NodeBB/wiki/Version-History-%26-Roadmap) * If you are a developer, feel free to check out the source and submit pull requests. * If you are a designer, NodeBB needs themes! NodeBB will accept any LESS or CSS file and use it in place of the default Twitter Bootstrap theme. Consider extending Bootstrap themes by extending the base bootstrap LESS file. diff --git a/app.js b/app.js index 018a70b3c1..312ef366a1 100644 --- a/app.js +++ b/app.js @@ -18,10 +18,10 @@ var fs = require('fs'), winston = require('winston'), - nconf = require('nconf'), pkg = require('./package.json'), url = require('url'); +nconf = require('nconf'); // Runtime environment global.env = process.env.NODE_ENV || 'production', @@ -54,7 +54,7 @@ if(nconf.get('upgrade')) { } else if (!nconf.get('setup') && nconf.get('base_url')) { nconf.set('url', nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') + nconf.get('relative_path') + '/'); nconf.set('upload_url', nconf.get('url') + 'uploads/'); - global.nconf = nconf; + winston.info('Initializing NodeBB v' + pkg.version + ', on port ' + nconf.get('port') + ', using Redis store at ' + nconf.get('redis:host') + ':' + nconf.get('redis:port') + '.'); winston.info('Base Configuration OK.'); diff --git a/public/css/style.less b/public/css/style.less index bb6432a2e1..46e3410ecb 100644 --- a/public/css/style.less +++ b/public/css/style.less @@ -1,5 +1,9 @@ @import "mixins"; +html { + overflow-y: scroll; +} + body { /*background: #fdfdfd;*/ // port to default theme when it is implemented. -webkit-transition: margin-bottom 250ms ease; diff --git a/public/css/topic.less b/public/css/topic.less index ff770f7345..ed3621d4f2 100644 --- a/public/css/topic.less +++ b/public/css/topic.less @@ -32,6 +32,7 @@ } .profile-block, .post-block { + position:relative; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: 5px; padding: 10px; @@ -98,12 +99,16 @@ } } + + &.deleted { -moz-opacity: 0.30; opacity: 0.30; } /*http://stackoverflow.com/questions/11037517/bootstrap-making-responsive-changes-to-layout*/ @media (max-width: 979px) { + + .span12-tablet { width: 100% !important; margin-left:0px; @@ -111,6 +116,36 @@ } } + @media (min-width: 979px) { + .speech-bubble:after + { + content: ""; + position: absolute; + top: 9px; + left: -7px; + border-style: solid; + border-width: 7px 7px 7px 0; + border-color: transparent #FFFFFF; + display: block; + width: 0; + z-index: 1; + } + + .speech-bubble:before + { + content: ""; + position: absolute; + top: 9px; + left: -8px; + border-style: solid; + border-width: 7px 7px 7px 0; + border-color: transparent rgba(0, 0, 0, 0.125); + display: block; + width: 0; + z-index: 0; + } + } + .main-post { h3 { margin: 0; diff --git a/public/src/forum/category.js b/public/src/forum/category.js index 4c94174488..2a09a71251 100644 --- a/public/src/forum/category.js +++ b/public/src/forum/category.js @@ -36,7 +36,6 @@ ]); function onNewTopic(data) { - var html = templates.prepare(templates['category'].blocks['topics']).parse({ topics: [data] }), topic = document.createElement('div'), container = document.getElementById('topics-container'), @@ -61,6 +60,8 @@ container.insertBefore(topic, null); $(topic).hide().fadeIn('slow'); } + + socket.emit('api:categories.getRecentReplies', cid); } socket.on('event:new_topic', onNewTopic); diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index f1451b5912..85e6a24734 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -389,14 +389,20 @@ socket.on('api:posts.favourite', function(data) { if (data.status === 'ok' && data.pid) { var favEl = document.querySelector('.post_rep_' + data.pid).nextSibling; - if (favEl) favEl.className = 'icon-star'; + if (favEl) { + favEl.className = 'icon-star'; + $(favEl).parent().addClass('btn-warning'); + } } }); socket.on('api:posts.unfavourite', function(data) { if (data.status === 'ok' && data.pid) { var favEl = document.querySelector('.post_rep_' + data.pid).nextSibling; - if (favEl) favEl.className = 'icon-star-empty'; + if (favEl) { + favEl.className = 'icon-star-empty'; + $(favEl).parent().removeClass('btn-warning'); + } } }); diff --git a/public/src/forum/unread.js b/public/src/forum/unread.js index 1515ba8966..cdf4c8a95c 100644 --- a/public/src/forum/unread.js +++ b/public/src/forum/unread.js @@ -78,7 +78,10 @@ if(data.topics && data.topics.length) { onTopicsLoaded(data.topics); $('#topics-container').attr('data-next-start', data.nextStart); + } else { + $('#load-more-btn').hide(); } + loadingMoreTopics = false; }); } @@ -92,7 +95,7 @@ }); - if($("body").height() <= $(window).height() && $('#topics-container').children().length) + if($("body").height() <= $(window).height() && $('#topics-container').children().length >= 20) $('#load-more-btn').show(); $('#load-more-btn').on('click', function() { diff --git a/public/src/templates.js b/public/src/templates.js index 79395b5cf1..be97fdb3c7 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -181,7 +181,7 @@ if (!templates[tpl_url] || !template_data) return; if(typeof global !== "undefined") - template_data['relative_path'] = global.nconf.get('relative_path'); + template_data['relative_path'] = nconf.get('relative_path'); else template_data['relative_path'] = RELATIVE_PATH; diff --git a/public/templates/category.tpl b/public/templates/category.tpl index d49af806b8..bbaae0322d 100644 --- a/public/templates/category.tpl +++ b/public/templates/category.tpl @@ -10,13 +10,8 @@
-