Van
2019-02-11 01:06:43 +08:00
parent dd015bb41e
commit d7e9db917c
289 changed files with 4122 additions and 2277 deletions

View File

@@ -1,17 +1,19 @@
/*
* Copyright (c) 2010-2018, b3log.org & hacpai.com
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 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.
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* 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/>.
*/
/**
* @fileoverview util and every page should be used.

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +1,18 @@
/*
* Copyright (c) 2010-2017, b3log.org & hacpai.com
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 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.
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* 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/>.
*/
function convertEntities(b){var d,a;d=function(c){if(/&[^;]+;/.test(c)){var f=document.createElement("div");f.innerHTML=c;return !f.firstChild?c:f.firstChild.nodeValue}return c};if(typeof b==="string"){return d(b)}else{if(typeof b==="object"){for(a in b){if(typeof b[a]==="string"){b[a]=d(b[a])}}}}return b};

View File

@@ -1,16 +1 @@
/*
* Copyright (c) 2010-2017, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function convertEntities(t){var e,n;if(e=function(t){if(/&[^;]+;/.test(t)){var e=document.createElement("div");return e.innerHTML=t,e.firstChild?e.firstChild.nodeValue:t}return t},"string"==typeof t)return e(t);if("object"==typeof t)for(n in t)"string"==typeof t[n]&&(t[n]=e(t[n]));return t}

View File

@@ -1,17 +1,19 @@
/*
* Copyright (c) 2010-2018, b3log.org & hacpai.com
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 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.
*
* http://www.apache.org/licenses/LICENSE-2.0
* 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.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* 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/>.
*/
/**
* @fileoverview Page util, load heighlight and process comment.

1
skins/iMobile/js/page.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,20 @@
/*
* 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/>.
*/
(function() {
var wemsg = function(smsg) {
layer.msg(smsg, { time: 2000 });
@@ -9,7 +26,7 @@
Cookie.createCookie(name, value, days);
};
if ($("body").width() > 750 && xcookie("showTips") == "" && xcookie("isShowTips") == "" && top.location.pathname == "/" && navigator.cookieEnabled) {
layer.confirm(`客官您好,<b>${ $("#logofont").text() }</b>欢迎您的访问,已默认为您开启图标悬浮提示,是否需要显示悬浮提示?`, {
layer.confirm('客官您好,<b> ' + $("#logofont").text() + ' </b>欢迎您的访问,已默认为您开启图标悬浮提示,是否需要显示悬浮提示?', {
btn: ['留着吧', '消失一周', '再想想'],
closeBtn: false,
time: 9999,

1
skins/iMobile/js/welcome.min.js vendored Normal file
View File

@@ -0,0 +1 @@
!function(){var o=function(o){layer.msg(o,{time:2e3})},i=function(o){return Cookie.readCookie(o)},n=function(o,i,n){Cookie.createCookie(o,i,n)};750<$("body").width()&&""==i("showTips")&&""==i("isShowTips")&&"/"==top.location.pathname&&navigator.cookieEnabled&&layer.confirm("客官您好,<b> "+$("#logofont").text()+" </b>欢迎您的访问,已默认为您开启图标悬浮提示,是否需要显示悬浮提示?",{btn:["留着吧","消失一周","再想想"],closeBtn:!1,time:9999,title:!1,success:function(o){o.find(".layui-layer-btn .layui-layer-btn0").css({"border-color":"#333","background-color":"#666"})}},function(){n("isShowTips","1",90),o("<b>好嘞~</b>")},function(){n("showTips","0",7),o("<b><i>7</i> 天内访问将不再提示!<b>")},function(){layer.closeAll()})}();

View File

@@ -1,4 +1,20 @@
/* Copyright (c) 2010-2016, b3log.org & hacpai.com Licensed under the Apache License, Version 2.0 (the "License"); */
/*
* 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/>.
*/
/**
* @fileoverview util and every page should be used.
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>

View File

@@ -1,2 +1 @@
/* Copyright (c) 2010-2016, b3log.org & hacpai.com Licensed under the Apache License, Version 2.0 (the "License");
*/var Yilia={init:function(){Util.killIE(),this._initToc(),this.resetTags(),$(window).scroll(function(){$("article").length>0&&0===$("article.post").length&&$("article:not(.show)").each(function(){$(this).offset().top<=$(window).scrollTop()+$(window).height()-$(this).height()/13&&$(this).addClass("show")}),$(window).scrollTop()>$(window).height()?$(".icon-goup").show():$(".icon-goup").hide(), (($(document).height() - $("body").height() - 300) < $(window).scrollTop()) ? $("#backBtm").hide() : $("#backBtm").show(), 1===$("article.post").length&&$("article.post").addClass("show")}),$(window).scroll()},_initToc:function(){return 0!==$(".b3-solo-list li").length&&($(".side footer").after('<div class="toc"><a href="javascript:hideToc();" class="close iconfont icon-close2"></a></div>'),$(".side .toc a").after($(".b3-solo-list")),void $(".side .toc-btn").show())},resetTags:function(){$("a.tag").each(function(t){$(this).addClass("color"+Math.ceil(3*Math.random()))})},share:function(){$(".share span").click(function(){var t=$(this).data("type"),i=encodeURIComponent($("title").text()+" "+$("meta[name=description]").attr("content")),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,img=($("article.post img:eq(1)").length==0?$("article.post img:eq(0)"):$("article.post img:eq(1)")),e=$(img).attr("src"),s={};s.qq = "http://connect.qq.com/widget/shareqq/index.html?title="+i+"&url="+o;s.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+i+"&url="+o+"&pic="+e,s.weibo="http://v.t.sina.com.cn/share/share.php?title="+i+"&url="+o+"&pic="+e,s.google="https://plus.google.com/share?url="+o,s.twitter="https://twitter.com/intent/tweet?status="+i+" "+o,window.open(s[t],"_blank","top=100,left=200,width=720,height=618")})}};Yilia.init();
var Yilia={init:function(){Util.killIE(),this._initToc(),this.resetTags(),$(window).scroll(function(){0<$("article").length&&0===$("article.post").length&&$("article:not(.show)").each(function(){$(this).offset().top<=$(window).scrollTop()+$(window).height()-$(this).height()/7&&$(this).addClass("show")}),$(window).scrollTop()>$(window).height()?$(".icon-goup").show():$(".icon-goup").hide(),$(document).height()-$("body").height()-300<$(window).scrollTop()?$("#backBtm").hide():$("#backBtm").show(),1===$("article.post").length&&$("article.post").addClass("show")}),$(window).scroll()},_initToc:function(){if(0===$(".b3-solo-list li").length)return!1;$(".side footer").after('<div class="toc"><a href="javascript:$(\'.side .toc\').hide()" class="close">X</a></div>'),$(".side .toc a").after($(".b3-solo-list")),$(".side .toc-btn").show()},resetTags:function(){$("a.tag").each(function(t){$(this).addClass("color"+Math.ceil(4*Math.random()))})},share:function(){$(".share span").click(function(){var t=$(this).data("type"),i=encodeURIComponent($("title").text()),o=$(".post-title a").attr("href")?$(".post-title a").attr("href"):location,e=$(".post-content img:eq(0)").attr("src"),s={};s.qq="http://connect.qq.com/widget/shareqq/index.html?title="+i+"&url="+o,s.tencent="http://share.v.t.qq.com/index.php?c=share&a=index&title="+i+"&url="+o+"&pic="+e,s.weibo="http://v.t.sina.com.cn/share/share.php?title="+i+"&url="+o+"&pic="+e,s.google="https://plus.google.com/share?url="+o,s.twitter="https://twitter.com/intent/tweet?status="+i+" "+o,window.open(s[t],"_blank","top=100,left=200,width=720,height=618")})}};Yilia.init();