Van
2019-02-11 01:02:12 +08:00
parent e3c64f977f
commit cd12e591de
122 changed files with 141 additions and 2950 deletions

View File

@@ -19,6 +19,7 @@
-->
<#include "macro-head.ftl">
<#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html>
<html>
<head>
@@ -179,7 +180,7 @@
</div>
<#include "footer.ftl">
<#if pjax><!---- pjax {#pjax} start ----></#if>
<@comment_script oId=article.oId>
<@comment_script oId=article.oId commentable=article.commentable>
page.tips.externalRelevantArticlesDisplayCount = "${externalRelevantArticlesDisplayCount}";
<#if 0 != randomArticlesDisplayCount>
page.loadRandomArticles('<header class="module__header">${randomArticlesLabel}</header>');

View File

@@ -40,7 +40,7 @@
${comment.commentContent}
</div>
<#if article?? && article.commentable>
<a class="fn__right breadcrumb" href="javascript:replyTo('${comment.oId}')">${replyLabel}</a>
<a class="fn__right breadcrumb" href="javascript:page.toggleEditor('${comment.oId}', '${comment.commentName}')">${replyLabel}</a>
<#else>
<a class="fn__right breadcrumb" href="${servePath}${comment.commentSharpURL}">${viewLabel}»</a>
</#if>

View File

@@ -1,20 +1,3 @@
/**
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
@charset "UTF-8";
/**
* Solo - A small and beautiful blogging system written in Java.

File diff suppressed because one or more lines are too long

View File

@@ -1,18 +1 @@
/*
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
var Skin={_initCommon:function(e){$(window).scroll(function(){125<$(window).scrollTop()?e.show():e.hide(),0<$(".side .b3-solo-list").length&&(50<$(window).scrollTop()?$(".side").css("position","fixed"):$(".side").css("position","initial"))})},_initAnimation:function(){if(!("IntersectionObserver"in window))return $(".item").addClass("item--active"),!1;window.imageIntersectionObserver?window.imageIntersectionObserver.disconnect():window.imageIntersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){if(void 0===e.isIntersecting?0!==e.intersectionRatio:e.isIntersecting)$(e.target).addClass("item--active");else{if(1===$(e.target).closest(".side").length||1===$(e.target).closest("#articlePage").length||768<$(e.target).outerHeight())return;$(e.target).removeClass("item--active")}})}),$(".item").each(function(){window.imageIntersectionObserver.observe(this)})},init:function(){Util.initPjax(function(){Skin._initAnimation(),0===$("#articlePage").length&&$(".b3-solo-list").closest(".module").remove()}),Skin._initAnimation(),$("body").on("click",".content-reset img",function(){window.open(this.src)}),this._initCommon($(".icon__up")),$(".header__nav a, .header__m a").each(function(){this.href===location.href&&(this.className="current")}).click(function(){$(".header__nav a, .header__m a").removeClass("current"),this.className="current",$(".header__m .module__list").hide()}),$(".header__logo").click(function(){$(".header__nav a, .header__m a").removeClass("current")})},_initArticleCommon:function(){if(768<$(window).width()){if(0===$("#articlePage .b3-solo-list li").length)return $(".side .b3-solo-list").closest(".module").remove(),void $(".side").css({height:"auto",position:"initial"});$("#articlePage").width($(".main").width()-310),0===$(".side .b3-solo-list").length&&$(".side").prepend('<div class="module"><div class="module__list"></div></div>').css({right:($(window).width()-$(".main").width())/2,position:"fixed",overflow:"auto",height:$(window).height()-30,top:30}),$(".side .module:eq(0) .module__list").html($(".b3-solo-list")),$(window).scroll(),$(".side").scrollTop(0)}else{if(0===$("#articlePage .b3-solo-list li").length)return void $(".header__m .icon__list").hide().next().hide();$(".header__m .icon__list").show().next().html($(".b3-solo-list")),$(".b3-solo-list a").click(function(){$(this).closest(".module__list").hide()})}},initArticle:function(){this._initArticleCommon(),setTimeout(function(){0===$("#externalRelevantArticlesWrap li").length&&($("#externalRelevantArticlesWrap").next().remove(),$("#externalRelevantArticlesWrap").remove()),0===$("#relevantArticlesWrap li").length&&($("#relevantArticlesWrap").prev().remove(),$("#relevantArticlesWrap").remove()),0===$("#randomArticlesWrap li").length&&($("#randomArticlesWrap").prev().remove(),$("#randomArticlesWrap").remove())},1e3)}};Skin.init();

File diff suppressed because one or more lines are too long

View File

@@ -34,99 +34,10 @@
${postCommentsLabel}
</div>
<div class="comments__content">
<table id="commentForm" class="form">
<tbody>
<#if !isLoggedIn>
<tr>
<td>
<input placeholder="${commentNameLabel}" type="text" id="commentName"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentEmailLabel}" type="email" id="commentEmail"/>
</td>
</tr>
<tr>
<td>
<input placeholder="${commentURLLabel}" type="url" id="commentURL"/>
</td>
</tr>
</#if>
<tr>
<td id="emotions" class="emotions">
<span class="em00" title="${em00Label}"></span>
<span class="em01" title="${em01Label}"></span>
<span class="em02" title="${em02Label}"></span>
<span class="em03" title="${em03Label}"></span>
<span class="em04" title="${em04Label}"></span>
<span class="em05" title="${em05Label}"></span>
<span class="em06" title="${em06Label}"></span>
<span class="em07" title="${em07Label}"></span>
<span class="em08" title="${em08Label}"></span>
<span class="em09" title="${em09Label}"></span>
<span class="em10" title="${em10Label}"></span>
<span class="em11" title="${em11Label}"></span>
<span class="em12" title="${em12Label}"></span>
<span class="em13" title="${em13Label}"></span>
<span class="em14" title="${em14Label}"></span>
</td>
</tr>
<tr>
<td>
<textarea rows="5" cols="96" id="comment"></textarea>
</td>
</tr>
<#if !isLoggedIn>
<tr>
<td>
<input style="width:50%" placeholder="${captchaLabel}" type="text"
id="commentValidate"/>
<img class="comments__captcha" id="captcha" alt="validate" src="${servePath}/captcha"/>
</td>
</tr>
</#if>
<tr>
<td colspan="2" align="right">
<span class="ft__red" id="commentErrorTip"></span>
<span class="breadcrumb fn__pointer fn__none" id="cancelCommentButton" onclick="$('#replyForm').remove();page.currentCommentId = ''">${cancelLabel}</span>
<button class="btn tag" id="submitCommentButton" onclick="page.submitComment();">${submmitCommentLabel}</button>
</td>
</tr>
</tbody>
</table>
<div class="form">
<textarea rows="3" placeholder="${postCommentsLabel}" id="comment"></textarea>
</div>
</div>
</div>
</#if>
</#macro>
<#macro comment_script oId>
<script type="text/javascript" src="${staticServePath}/js/page${miniPostfix}.js?${staticResourceVersion}"
charset="utf-8"></script>
<script type="text/javascript">
var page = new Page({
'nameTooLongLabel': "${nameTooLongLabel}",
'mailCannotEmptyLabel': "${mailCannotEmptyLabel}",
'mailInvalidLabel': "${mailInvalidLabel}",
'commentContentCannotEmptyLabel': "${commentContentCannotEmptyLabel}",
'captchaCannotEmptyLabel': "${captchaCannotEmptyLabel}",
'loadingLabel': "${loadingLabel}",
'oId': "${oId}",
'skinDirName': "${skinDirName}",
'blogHost': "${blogHost}",
'randomArticles1Label': "${randomArticles1Label}",
'externalRelevantArticles1Label': "${externalRelevantArticles1Label}",
})
var replyTo = function (id) {
var commentFormHTML = '<table class=\'form comments__reply comments__content\' id=\'replyForm\'>'
page.addReplyForm(id, commentFormHTML)
};
(function () {
page.load()
Skin.initArticle()
// emotions
page.replaceCommentsEm('#comments .content-reset')
<#nested>
})()
</script>
</#macro>

View File

@@ -19,6 +19,7 @@
-->
<#include "macro-head.ftl">
<#include "macro-comments.ftl">
<#include "../../common-template/macro-comment_script.ftl">
<!DOCTYPE html>
<html>
<head>
@@ -48,7 +49,7 @@
</div>
<#include "footer.ftl">
<#if pjax><!---- pjax {#pjax} start ----></#if>
<@comment_script oId=page.oId></@comment_script>
<@comment_script oId=page.oId commentable=page.commentable></@comment_script>
<#if pjax><!---- pjax {#pjax} end ----></#if>
</body>
</html>