Commit 9601f41a authored by Van's avatar Van

🎨 add sponsors

parent a1efcb77
...@@ -16,4 +16,4 @@ admin.categoryList={tablePagination:new TablePaginate("category"),pageInfo:{curr ...@@ -16,4 +16,4 @@ admin.categoryList={tablePagination:new TablePaginate("category"),pageInfo:{curr
admin.commentList={tablePagination:new TablePaginate("comment"),pageInfo:{currentPage:1},init:function(e){this.tablePagination.buildTable([{text:Label.commentContentLabel,index:"content",minWidth:174,style:"padding-left: 12px;"},{text:Label.authorLabel,index:"title",style:"padding-left: 12px;",width:154},{text:Label.dateLabel,index:"date",width:60,style:"padding-left: 12px;"}]),this.tablePagination.initPagination(),this.getList(e)},getList:function(l){var o=this;$("#loadMsg").text(Label.loadingLabel),$.ajax({url:Label.servePath+"/console/comments/"+l+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(e,t){if($("#tipMsg").text(e.msg),e.sc){o.pageInfo.currentPage=l;for(var a=e.comments,n=[],i=0;i<a.length;i++){n[i]={},n[i].content='<div class="vditor-reset">'+a[i].commentContent+"</div><span class='table-tag'> on &nbsp;&nbsp;</span><a href='"+Label.servePath+a[i].commentSharpURL+"' target='_blank'>"+a[i].commentTitle+"</a>",n[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.commentList.del('"+a[i].oId+"', 'Article')\">"+Label.removeLabel+"</a>",n[i].title="<img class='small-head' src='"+a[i].commentThumbnailURL+"'/>","http://"===a[i].commentURL?n[i].title+=a[i].commentName:n[i].title+="<a href='"+a[i].commentURL+"' target='_blank' class='no-underline'>"+a[i].commentName+"</a>",n[i].title+="<br/>",n[i].date=$.bowknot.getDate(a[i].commentTime)}o.tablePagination.updateTablePagination(n,l,e.pagination),Util.parseMarkdown(),Util.parseLanguage(),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},del:function(e,t){confirm(Label.confirmRemoveLabel+Label.commentLabel+"?")&&($("#loadMsg").text(Label.loadingLabel),$.ajax({url:Label.servePath+"/console/"+t.toLowerCase()+"/comment/"+e,type:"DELETE",cache:!1,success:function(e,t){$("#tipMsg").text(e.msg),e.sc&&admin.commentList.getList(admin.commentList.pageInfo.currentPage),$("#loadMsg").text("")}}))}},admin.register["comment-list"]={obj:admin.commentList,init:admin.commentList.init,refresh:admin.commentList.getList}; admin.commentList={tablePagination:new TablePaginate("comment"),pageInfo:{currentPage:1},init:function(e){this.tablePagination.buildTable([{text:Label.commentContentLabel,index:"content",minWidth:174,style:"padding-left: 12px;"},{text:Label.authorLabel,index:"title",style:"padding-left: 12px;",width:154},{text:Label.dateLabel,index:"date",width:60,style:"padding-left: 12px;"}]),this.tablePagination.initPagination(),this.getList(e)},getList:function(l){var o=this;$("#loadMsg").text(Label.loadingLabel),$.ajax({url:Label.servePath+"/console/comments/"+l+"/"+Label.PAGE_SIZE+"/"+Label.WINDOW_SIZE,type:"GET",cache:!1,success:function(e,t){if($("#tipMsg").text(e.msg),e.sc){o.pageInfo.currentPage=l;for(var a=e.comments,n=[],i=0;i<a.length;i++){n[i]={},n[i].content='<div class="vditor-reset">'+a[i].commentContent+"</div><span class='table-tag'> on &nbsp;&nbsp;</span><a href='"+Label.servePath+a[i].commentSharpURL+"' target='_blank'>"+a[i].commentTitle+"</a>",n[i].expendRow="<a href='javascript:void(0)' onclick=\"admin.commentList.del('"+a[i].oId+"', 'Article')\">"+Label.removeLabel+"</a>",n[i].title="<img class='small-head' src='"+a[i].commentThumbnailURL+"'/>","http://"===a[i].commentURL?n[i].title+=a[i].commentName:n[i].title+="<a href='"+a[i].commentURL+"' target='_blank' class='no-underline'>"+a[i].commentName+"</a>",n[i].title+="<br/>",n[i].date=$.bowknot.getDate(a[i].commentTime)}o.tablePagination.updateTablePagination(n,l,e.pagination),Util.parseMarkdown(),Util.parseLanguage(),$("#loadMsg").text("")}else $("#loadMsg").text("")}})},del:function(e,t){confirm(Label.confirmRemoveLabel+Label.commentLabel+"?")&&($("#loadMsg").text(Label.loadingLabel),$.ajax({url:Label.servePath+"/console/"+t.toLowerCase()+"/comment/"+e,type:"DELETE",cache:!1,success:function(e,t){$("#tipMsg").text(e.msg),e.sc&&admin.commentList.getList(admin.commentList.pageInfo.currentPage),$("#loadMsg").text("")}}))}},admin.register["comment-list"]={obj:admin.commentList,init:admin.commentList.init,refresh:admin.commentList.getList};
var plugins={};admin.plugin={plugins:[],add:function(t){t.isInit=!1,t.hash=t.path.replace("/","#")+"/"+t.id,this.plugins.push(t);var a=this._analysePath(t.path);t.index&&a.length<2&&this._addNew(t,a)},setCurByHash:function(t){for(var a=this.plugins,e=0;e<a.length;e++){var n=a[e],i=this._analysePath(n.path),s=!1;n.index&&-1<window.location.hash.indexOf(n.hash)?s=!0:(n.path.replace("/","#")===window.location.hash||"#main"===window.location.hash&&-1<n.path.indexOf("/main/panel"))&&(s=!0),s&&(n.isInit?plugins[n.id].refresh&&plugins[n.id].refresh(t.page):(n.index?2===i.length&&this._addNew(n,i):this._addToExist(n,i),plugins[n.id].init(t.page),n.isInit=!0))}},_analysePath:function(t){var a=t.split("/");return a.splice(0,1),a},_addNew:function(t,a){if(2===a.length)return t.target=$("#tabPreference li").get(t.index-1),void $("#tabPreference").tabs("add",t);""===a[0]?t.target=$("#tabs>ul>li").get(t.index-1):"article"===a[0]?t.target=$("#tabArticleMgt>li").get(t.index-1):"tools"===a[0]&&(admin.tools.push("#"+t.id),t.target=$("#tabTools>li").get(t.index-1)),t.target||alert("data.index is error!"),$("#tabs").tabs("add",t)},_addToExist:function(t,a){switch(a[0]){case"main":$("#mainPanel"+a[1].charAt(5)).append(t.content);break;case"tools":case"article":2===a.length?$("#tabsPanel_"+a[1]).append(t.content):$("#tabPreferencePanel_"+a[2]).append(t.content);break;case"comment-list":$("#tabsPanel_comment-list").append(t.content)}}}; var plugins={};admin.plugin={plugins:[],add:function(t){t.isInit=!1,t.hash=t.path.replace("/","#")+"/"+t.id,this.plugins.push(t);var a=this._analysePath(t.path);t.index&&a.length<2&&this._addNew(t,a)},setCurByHash:function(t){for(var a=this.plugins,e=0;e<a.length;e++){var n=a[e],i=this._analysePath(n.path),s=!1;n.index&&-1<window.location.hash.indexOf(n.hash)?s=!0:(n.path.replace("/","#")===window.location.hash||"#main"===window.location.hash&&-1<n.path.indexOf("/main/panel"))&&(s=!0),s&&(n.isInit?plugins[n.id].refresh&&plugins[n.id].refresh(t.page):(n.index?2===i.length&&this._addNew(n,i):this._addToExist(n,i),plugins[n.id].init(t.page),n.isInit=!0))}},_analysePath:function(t){var a=t.split("/");return a.splice(0,1),a},_addNew:function(t,a){if(2===a.length)return t.target=$("#tabPreference li").get(t.index-1),void $("#tabPreference").tabs("add",t);""===a[0]?t.target=$("#tabs>ul>li").get(t.index-1):"article"===a[0]?t.target=$("#tabArticleMgt>li").get(t.index-1):"tools"===a[0]&&(admin.tools.push("#"+t.id),t.target=$("#tabTools>li").get(t.index-1)),t.target||alert("data.index is error!"),$("#tabs").tabs("add",t)},_addToExist:function(t,a){switch(a[0]){case"main":$("#mainPanel"+a[1].charAt(5)).append(t.content);break;case"tools":case"article":2===a.length?$("#tabsPanel_"+a[1]).append(t.content):$("#tabPreferencePanel_"+a[2]).append(t.content);break;case"comment-list":$("#tabsPanel_comment-list").append(t.content)}}};
admin.main={},admin.register.main={obj:admin.main,init:function(){admin.clearTip()},refresh:function(){admin.clearTip()}}; admin.main={},admin.register.main={obj:admin.main,init:function(){admin.clearTip()},refresh:function(){admin.clearTip()}};
admin.about={init:function(){$.ajax({url:"https://rhythm.b3log.org/version/solo/latest/"+Label.version,type:"GET",cache:!1,dataType:"jsonp",success:function(a,t){var e=a.soloVersion;e===Label.version?$("#aboutLatest").text(Label.upToDateLabel):$("#aboutLatest").html(Label.outOfDateLabel+"<a href='"+a.soloDownload+"'>"+e+"</a>")},complete:function(a,t){admin.clearTip()}})}},admin.register.about={obj:admin.about,init:admin.about.init,refresh:function(){admin.clearTip()}}; admin.about={init:function(){$.ajax({url:"https://rhythm.b3log.org/version/solo/latest/"+Label.version,type:"GET",cache:!1,dataType:"jsonp",success:function(a,e){var t=a.soloVersion;t===Label.version?$("#aboutLatest").text(Label.upToDateLabel):$("#aboutLatest").html(Label.outOfDateLabel+"<a href='"+a.soloDownload+"'>"+t+"</a>")},complete:function(a,e){admin.clearTip()}}),$.ajax({url:"https://hacpai.com/apis/sponsors",type:"GET",dataType:"jsonp",jsonp:"callback",success:function(a,e){for(var t=a.data.payments,n="",s=0;s<t.length;s++){var o="<b>\u533f\u540d\u597d\u5fc3\u4eba</b>";t[s].paymentUserName&&(o='<a href="https://hacpai.com/member/'+t[s].paymentUserName+'"><b>'+t[s].paymentUserName+"</b></a>"),n+='<li><div class="fn__flex">'+o+' <span class="ft__green fn__flex-1">&nbsp;'+t[s].paymentAmount+'RMB</span><time class="ft__fade">&nbsp;&nbsp;'+t[s].paymentTimeStr+"</time></div><div>"+t[s].paymentMemo+"</div></li>"}$("#adminAboutSponsors").html(n)},complete:function(a,e){admin.clearTip()}})}},admin.register.about={obj:admin.about,init:admin.about.init,refresh:function(){admin.clearTip()}};
\ No newline at end of file \ No newline at end of file
...@@ -87,10 +87,6 @@ ...@@ -87,10 +87,6 @@
.ft { .ft {
&__green {
color: #569e3d;
}
&__13 { &__13 {
font-size: 13px; font-size: 13px;
} }
......
This diff is collapsed.
...@@ -68,6 +68,7 @@ button, ...@@ -68,6 +68,7 @@ button,
height: auto; height: auto;
outline: none; outline: none;
line-height: 18px; line-height: 18px;
&.small { &.small {
padding: 3px 6px; padding: 3px 6px;
font-size: 12px; font-size: 12px;
...@@ -579,6 +580,7 @@ button#submitArticle:hover { ...@@ -579,6 +580,7 @@ button#submitArticle:hover {
line-height: 24px; line-height: 24px;
margin: 10px; margin: 10px;
text-align: center; text-align: center;
button:first-child { button:first-child {
margin-left: 10px; margin-left: 10px;
} }
...@@ -636,8 +638,14 @@ button#submitArticle:hover { ...@@ -636,8 +638,14 @@ button#submitArticle:hover {
text-decoration: underline; text-decoration: underline;
} }
.ft__fade { .ft {
color: rgba(0,0,0,.38) &__fade {
color: rgba(0, 0, 0, .38)
}
&__green {
color: #569e3d;
}
} }
/* end about */ /* end about */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment