mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
minor CSS fixes to post timeago text in topic view
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
(function() {
|
(function () {
|
||||||
var cid = templates.get('category_id'),
|
var cid = templates.get('category_id'),
|
||||||
room = 'category_' + cid,
|
room = 'category_' + cid,
|
||||||
twitterEl = document.getElementById('twitter-intent'),
|
twitterEl = document.getElementById('twitter-intent'),
|
||||||
@@ -11,22 +11,22 @@
|
|||||||
|
|
||||||
app.enter_room(room);
|
app.enter_room(room);
|
||||||
|
|
||||||
twitterEl.addEventListener('click', function() {
|
twitterEl.addEventListener('click', function () {
|
||||||
window.open(twitter_url, '_blank', 'width=550,height=420,scrollbars=no,status=no');
|
window.open(twitter_url, '_blank', 'width=550,height=420,scrollbars=no,status=no');
|
||||||
return false;
|
return false;
|
||||||
}, false);
|
}, false);
|
||||||
facebookEl.addEventListener('click', function() {
|
facebookEl.addEventListener('click', function () {
|
||||||
window.open(facebook_url, '_blank', 'width=626,height=436,scrollbars=no,status=no');
|
window.open(facebook_url, '_blank', 'width=626,height=436,scrollbars=no,status=no');
|
||||||
return false;
|
return false;
|
||||||
}, false);
|
}, false);
|
||||||
googleEl.addEventListener('click', function() {
|
googleEl.addEventListener('click', function () {
|
||||||
window.open(google_url, '_blank', 'width=500,height=570,scrollbars=no,status=no');
|
window.open(google_url, '_blank', 'width=500,height=570,scrollbars=no,status=no');
|
||||||
return false;
|
return false;
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
var new_post = document.getElementById('new_post');
|
var new_post = document.getElementById('new_post');
|
||||||
new_post.onclick = function() {
|
new_post.onclick = function () {
|
||||||
require(['composer'], function(cmp) {
|
require(['composer'], function (cmp) {
|
||||||
cmp.push(0, cid);
|
cmp.push(0, cid);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
socket.on('event:new_topic', onNewTopic);
|
socket.on('event:new_topic', onNewTopic);
|
||||||
|
|
||||||
socket.emit('api:categories.getRecentReplies', cid);
|
socket.emit('api:categories.getRecentReplies', cid);
|
||||||
socket.on('api:categories.getRecentReplies', function(posts) {
|
socket.on('api:categories.getRecentReplies', function (posts) {
|
||||||
if (!posts || posts.length === 0) {
|
if (!posts || posts.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
'<p>' +
|
'<p>' +
|
||||||
posts[i].content +
|
posts[i].content +
|
||||||
'</p>' +
|
'</p>' +
|
||||||
'<span><strong>' + posts[i].username + '</strong></span> -<span class="timeago" title="' + posts[i].relativeTime + '"></span>' +
|
'<p class="meta"><strong>' + posts[i].username + '</strong></span> -<span class="timeago" title="' + posts[i].relativeTime + '"></span></p>' +
|
||||||
'</a>';
|
'</a>';
|
||||||
|
|
||||||
frag.appendChild(li.cloneNode(true));
|
frag.appendChild(li.cloneNode(true));
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
socket.emit('api:category.loadMore', {
|
socket.emit('api:category.loadMore', {
|
||||||
cid: cid,
|
cid: cid,
|
||||||
after: $('#topics-container').children().length
|
after: $('#topics-container').children().length
|
||||||
}, function(data) {
|
}, function (data) {
|
||||||
if (data.topics.length) {
|
if (data.topics.length) {
|
||||||
onTopicsLoaded(data.topics);
|
onTopicsLoaded(data.topics);
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(window).off('scroll').on('scroll', function(ev) {
|
$(window).off('scroll').on('scroll', function (ev) {
|
||||||
var bottom = ($(document).height() - $(window).height()) * 0.9;
|
var bottom = ($(document).height() - $(window).height()) * 0.9;
|
||||||
|
|
||||||
if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
|
if ($(window).scrollTop() > bottom && !loadingMoreTopics) {
|
||||||
@@ -138,4 +138,4 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
})();
|
})();
|
||||||
@@ -36,7 +36,9 @@
|
|||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<img class="img-rounded" style="width: 48px; height: 48px; /*temporary*/" src="{topics.teaser_userpicture}" />
|
<img class="img-rounded" style="width: 48px; height: 48px; /*temporary*/" src="{topics.teaser_userpicture}" />
|
||||||
<p>{topics.teaser_text}</p>
|
<p>{topics.teaser_text}</p>
|
||||||
<span><strong>{topics.teaser_username}</strong> posted</span><span class="timeago" title="{topics.teaser_timestamp}"></span>
|
<p class="meta">
|
||||||
|
<strong>{topics.teaser_username}</strong> posted <span class="timeago" title="{topics.teaser_timestamp}"></span>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -27,6 +27,12 @@
|
|||||||
margin-left: -25px;
|
margin-left: -25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.meta {
|
||||||
|
font-size: 12px;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.topic-row {
|
.topic-row {
|
||||||
|
|
||||||
@@ -92,22 +98,13 @@
|
|||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
margin-left: 10px;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 16px;
|
|
||||||
margin-top: -10px;
|
|
||||||
color: #666;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user