community news
This commit is contained in:
parent
8f42e3cc47
commit
e54e89f1b8
|
@ -71,6 +71,8 @@
|
||||||
border-left: 1px solid #f1f1f1;
|
border-left: 1px solid #f1f1f1;
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
padding-left: 10%;
|
padding-left: 10%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#startPage .news li {
|
#startPage .news li {
|
||||||
|
|
|
@ -283,7 +283,7 @@ var editors = {
|
||||||
$("#startPage").height($('.side-right').height() - $(".bottom-window-group").children(".tabs").height() - 100);
|
$("#startPage").height($('.side-right').height() - $(".bottom-window-group").children(".tabs").height() - 100);
|
||||||
$("#startPage").load(config.context + '/start?sid=' + config.wideSessionId);
|
$("#startPage").load(config.context + '/start?sid=' + config.wideSessionId);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "https://symphony.b3log.org/apis/articles?tags=wide,golang&p=1&size=30",
|
url: "https://symphony.b3log.org/apis/articles?tags=wide,golang&p=1&size=20",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: "jsonp",
|
dataType: "jsonp",
|
||||||
jsonp: "callback",
|
jsonp: "callback",
|
||||||
|
@ -293,10 +293,10 @@ var editors = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 按 size = 30 取,但只保留最多 10 篇
|
// 按 size = 20 取,但只保留最多 9 篇
|
||||||
var length = articles.length;
|
var length = articles.length;
|
||||||
if (length > 10) {
|
if (length > 9) {
|
||||||
length = 10;
|
length = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
var listHTML = "<ul><li class='title'>" + config.label.community + "</li>";
|
var listHTML = "<ul><li class='title'>" + config.label.community + "</li>";
|
||||||
|
@ -306,7 +306,7 @@ var editors = {
|
||||||
+ "<a target='_blank' href='http://symphony.b3log.org"
|
+ "<a target='_blank' href='http://symphony.b3log.org"
|
||||||
+ article.articlePermalink + "'>"
|
+ article.articlePermalink + "'>"
|
||||||
+ article.articleTitle + "</a> <span class='date'>"
|
+ article.articleTitle + "</a> <span class='date'>"
|
||||||
+ dateFormat(article.articleCreateTime, 'yyyy-MM-dd hh:mm');
|
+ dateFormat(article.articleCreateTime, 'yyyy-MM-dd');
|
||||||
+"</span></li>";
|
+"</span></li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue