commit
41c03561ac
18
README.md
Normal file
18
README.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[B3log Solo Skins](http://vanessa.b3log.org/b3log-skin)
|
||||||
|
=======================================================
|
||||||
|
|
||||||
|
1. [开发步骤](https://github.com/b3log/b3log-solo/wiki/Develop_steps)
|
||||||
|
2. [模板变量](https://github.com/b3log/b3log-solo/wiki/Template_variables)
|
||||||
|
3. [皮肤定制](https://github.com/b3log/b3log-solo/wiki/skins_custom)
|
||||||
|
4. [版本更新](https://github.com/b3log/b3log-solo/wiki/Skins_change_log)
|
||||||
|
|
||||||
|
|
||||||
|
每个皮肤单独存放于根目录下以该皮肤名称为名的文件夹中。其中 helper 中存放辅助工具、 PSD 文件以及皮肤的预览图片。
|
||||||
|
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
平等,自由,奔放
|
||||||
|
|
||||||
|
Equality, Freedom, Passion
|
||||||
|
|
||||||
|
;-)
|
27
helper/README.md
Normal file
27
helper/README.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
B3log Solo 皮肤工具
|
||||||
|
==================================================
|
||||||
|
|
||||||
|
PSD
|
||||||
|
------------------------------------------
|
||||||
|
存放皮肤中用到的 psd 文件
|
||||||
|
|
||||||
|
skin-preview
|
||||||
|
------------------------------------------
|
||||||
|
存放每个皮肤的预览图片。命名规则为: skinName[-pathname].png
|
||||||
|
|
||||||
|
tools
|
||||||
|
------------------------------------------
|
||||||
|
皮肤辅助工具(Node.js)
|
||||||
|
* compress.js
|
||||||
|
对 js, css 进行压缩后在当前目生成 XXX.min.js/css 文件
|
||||||
|
* get-static.js
|
||||||
|
提取皮肤中的 js, css, image 等静态资源到 b3log-solo-skins/helper/tools/static 目录下
|
||||||
|
* update-version.js
|
||||||
|
批量更新 skin.properties 文件中的 forSolo 版本号
|
||||||
|
|
||||||
|
------------------------------------------
|
||||||
|
平等,自由,奔放
|
||||||
|
|
||||||
|
Equality, Freedom, Passion
|
||||||
|
|
||||||
|
;-)
|
45
helper/tools/get-static.js
Normal file
45
helper/tools/get-static.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
var fs = require('fs'),
|
||||||
|
path = require('path');
|
||||||
|
|
||||||
|
var getAllFiles = function (root){
|
||||||
|
var res = [],
|
||||||
|
files = fs.readdirSync(root);
|
||||||
|
|
||||||
|
files.forEach(function(file){
|
||||||
|
var pathname = root+'/'+file,
|
||||||
|
stat = fs.lstatSync(pathname);
|
||||||
|
|
||||||
|
if (!stat.isDirectory()){
|
||||||
|
if (file.indexOf(".ftl") < 0 && file.indexOf(".properties") < 0
|
||||||
|
&& root.indexOf("../../helper") < 0 && root.indexOf("../../.git") < 0) {
|
||||||
|
res.push(pathname);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
res = res.concat(getAllFiles(pathname));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
|
||||||
|
var mkdirsSync = function(dirpath) {
|
||||||
|
if(fs.existsSync(dirpath)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var dirs = dirpath.split('/');
|
||||||
|
var dir = '';
|
||||||
|
for(var i = 0; i < dirs.length; i++) {
|
||||||
|
dir += dirs[i] + '/';
|
||||||
|
if(!fs.existsSync(dir)){
|
||||||
|
fs.mkdirSync(dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var skins = getAllFiles("../..");
|
||||||
|
(function () {
|
||||||
|
mkdirsSync("static");
|
||||||
|
for (var i = 0; i < skins.length; i++) {
|
||||||
|
mkdirsSync(path.dirname(skins[i].replace("../..", "static/skins")));
|
||||||
|
fs.writeFileSync(skins[i].replace("../..", "static/skins"), fs.readFileSync(skins[i]), "UTF-8");
|
||||||
|
}
|
||||||
|
})();
|
@ -2,7 +2,7 @@
|
|||||||
* skin neoease style
|
* skin neoease style
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
|
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
|
||||||
* @version 1.0.1.7, Aug 6, 2012
|
* @version 1.0.1.8, Sep 6, 2012
|
||||||
*/
|
*/
|
||||||
/* start base */
|
/* start base */
|
||||||
html, body, div, ul, li, h1, h2, h3, h4, h5, h6 {
|
html, body, div, ul, li, h1, h2, h3, h4, h5, h6 {
|
||||||
@ -21,7 +21,7 @@ html, body, div, ul, li, h1, h2, h3, h4, h5, h6 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Lucida Grande",'Verdana,\5fae\8f6f\96c5\9ed1';
|
font-family: "Lucida Grande",'Verdana','\5fae\8f6f\96c5\9ed1';
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
background-color: #F9F9F9;
|
background-color: #F9F9F9;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
2
neoease/css/neoease.min.css
vendored
2
neoease/css/neoease.min.css
vendored
@ -1,7 +1,7 @@
|
|||||||
html,body,div,ul,li,h1,h2,h3,h4,h5,h6{margin:0;padding:0;}
|
html,body,div,ul,li,h1,h2,h3,h4,h5,h6{margin:0;padding:0;}
|
||||||
::selection{background-color:#ccc;color:#fff;}
|
::selection{background-color:#ccc;color:#fff;}
|
||||||
::-moz-selection{background-color:#ccc;color:#fff;}
|
::-moz-selection{background-color:#ccc;color:#fff;}
|
||||||
body{font-family:"Lucida Grande",'Verdana,\5fae\8f6f\96c5\9ed1';font-size:12px;background-color:#F9F9F9;color:#333;}
|
body{font-family:"Lucida Grande",'Verdana','\5fae\8f6f\96c5\9ed1';font-size:12px;background-color:#F9F9F9;color:#333;}
|
||||||
a:link{outline:none;color:#21759B;text-decoration:none;}
|
a:link{outline:none;color:#21759B;text-decoration:none;}
|
||||||
a:visited{color:#555777;}
|
a:visited{color:#555777;}
|
||||||
a:hover{color:#D54E21;}
|
a:hover{color:#D54E21;}
|
||||||
|
@ -10,9 +10,11 @@
|
|||||||
Theme by <a rel="friend" href="http://www.neoease.com" target="_blank">NeoEase</a>
|
Theme by <a rel="friend" href="http://www.neoease.com" target="_blank">NeoEase</a>
|
||||||
& <a rel="friend" href="http://vanessa.b3log.org" target="_blank">Vanessa</a>.
|
& <a rel="friend" href="http://vanessa.b3log.org" target="_blank">Vanessa</a>.
|
||||||
</div>
|
</div>
|
||||||
|
<#if runtimeEnv=="GAE">
|
||||||
<a class="right" target="_blank" href="http://code.google.com/appengine/">
|
<a class="right" target="_blank" href="http://code.google.com/appengine/">
|
||||||
<img src="http://code.google.com/appengine/images/appengine-silver-120x30.gif" />
|
<img src="http://code.google.com/appengine/images/appengine-silver-120x30.gif" />
|
||||||
</a>
|
</a>
|
||||||
|
</#if>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,61 +1,61 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<h1>
|
<h1>
|
||||||
<a class="title" href="${servePath}">
|
<a class="title" href="${servePath}">
|
||||||
${blogTitle}
|
${blogTitle}
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
<span class="sub-title">${blogSubtitle}</span>
|
<span class="sub-title">${blogSubtitle}</span>
|
||||||
</div>
|
</div>
|
||||||
<form target="_blank" method="get" action="http://www.google.com/search">
|
<form target="_blank" method="get" action="http://www.google.com/search">
|
||||||
<input id="search" type="text" name="q" />
|
<input id="search" type="text" name="q" />
|
||||||
<input type="submit" name="btnG" value="" class="none" />
|
<input type="submit" name="btnG" value="" class="none" />
|
||||||
<input type="hidden" name="oe" value="UTF-8" />
|
<input type="hidden" name="oe" value="UTF-8" />
|
||||||
<input type="hidden" name="ie" value="UTF-8" />
|
<input type="hidden" name="ie" value="UTF-8" />
|
||||||
<input type="hidden" name="newwindow" value="0" />
|
<input type="hidden" name="newwindow" value="0" />
|
||||||
<input type="hidden" name="sitesearch" value="${blogHost}" />
|
<input type="hidden" name="sitesearch" value="${blogHost}" />
|
||||||
</form>
|
</form>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav">
|
<div class="nav">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a rel="nofollow" href="${servePath}">${indexLabel}</a>
|
<a rel="nofollow" href="${servePath}/">${indexLabel}</a>
|
||||||
</li>
|
</li>
|
||||||
<#list pageNavigations as page>
|
<#list pageNavigations as page>
|
||||||
<li>
|
<li>
|
||||||
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}">${page.pageTitle}</a>
|
<a href="${page.pagePermalink}" target="${page.pageOpenTarget}">${page.pageTitle}</a>
|
||||||
</li>
|
</li>
|
||||||
</#list>
|
</#list>
|
||||||
<li>
|
<li>
|
||||||
<a href="${servePath}/tags.html">${allTagsLabel}</a>
|
<a href="${servePath}/tags.html">${allTagsLabel}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a rel="alternate" href="${servePath}/blog-articles-feed.do">Atom<img src="${staticServePath}/images/feed.png" alt="Atom"/></a>
|
<a rel="alternate" href="${servePath}/blog-articles-feed.do">Atom<img src="${staticServePath}/images/feed.png" alt="Atom"/></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<span class="translate-ico" onclick="goTranslate()"></span>
|
<span class="translate-ico" onclick="goTranslate()"></span>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
${viewCount1Label}
|
${viewCount1Label}
|
||||||
<span class="tip">
|
<span class="tip">
|
||||||
${statistic.statisticBlogViewCount}
|
${statistic.statisticBlogViewCount}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
${articleCount1Label}
|
${articleCount1Label}
|
||||||
<span class="tip">
|
<span class="tip">
|
||||||
${statistic.statisticPublishedBlogArticleCount}
|
${statistic.statisticPublishedBlogArticleCount}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
${commentCount1Label}
|
${commentCount1Label}
|
||||||
<span class="tip">
|
<span class="tip">
|
||||||
${statistic.statisticPublishedBlogCommentCount}
|
${statistic.statisticPublishedBlogCommentCount}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,176 +1,176 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
|
* Copyright (c) 2009, 2010, 2011, 2012, B3log Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fileoverview neoease js.
|
* @fileoverview neoease js.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
|
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
|
||||||
* @version 1.0.0.7, May 11, 2012
|
* @version 1.0.0.8, Sep 6, 2012
|
||||||
*/
|
*/
|
||||||
var goTop = function (acceleration) {
|
var goTop = function (acceleration) {
|
||||||
acceleration = acceleration || 0.1;
|
acceleration = acceleration || 0.1;
|
||||||
|
|
||||||
var y = $(window).scrollTop();
|
var y = $(window).scrollTop();
|
||||||
var speed = 1 + acceleration;
|
var speed = 1 + acceleration;
|
||||||
window.scrollTo(0, Math.floor(y / speed));
|
window.scrollTo(0, Math.floor(y / speed));
|
||||||
|
|
||||||
if (y > 0) {
|
if (y > 0) {
|
||||||
var invokeFunction = "goTop(" + acceleration + ")";
|
var invokeFunction = "goTop(" + acceleration + ")";
|
||||||
window.setTimeout(invokeFunction, 16);
|
window.setTimeout(invokeFunction, 16);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var collapseArchive = function (it, year) {
|
var collapseArchive = function (it, year) {
|
||||||
var tag = true;
|
var tag = true;
|
||||||
if (it.className === "collapse-ico") {
|
if (it.className === "collapse-ico") {
|
||||||
it.className = "expand-ico";
|
it.className = "expand-ico";
|
||||||
tag = false;
|
tag = false;
|
||||||
} else {
|
} else {
|
||||||
it.className = "collapse-ico";
|
it.className = "collapse-ico";
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#archiveSide li").each(function () {
|
$("#archiveSide li").each(function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
// hide other year month archives
|
// hide other year month archives
|
||||||
if ($this.data("year") === year) {
|
if ($this.data("year") === year) {
|
||||||
if (tag) {
|
if (tag) {
|
||||||
$(this).show();
|
$(this).show();
|
||||||
} else {
|
} else {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var getArticle = function (it, id) {
|
var getArticle = function (it, id) {
|
||||||
var $abstract = $("#abstract" + id),
|
var $abstract = $("#abstract" + id),
|
||||||
$content = $("#content" + id);
|
$content = $("#content" + id);
|
||||||
|
|
||||||
if ($content.html() === "") {
|
if ($content.html() === "") {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/get-article-content?id=" + id,
|
url: "/get-article-content?id=" + id,
|
||||||
type: "GET",
|
type: "GET",
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
$abstract.css("background",
|
$abstract.css("background",
|
||||||
"url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent");
|
"url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent");
|
||||||
},
|
},
|
||||||
success: function(result, textStatus){
|
success: function(result, textStatus){
|
||||||
it.className = "collapse-ico";
|
it.className = "collapse-ico";
|
||||||
$content.html(result);
|
$content.html(result);
|
||||||
$abstract.hide().css("background", "none");
|
$abstract.hide().css("background", "none");
|
||||||
$content.fadeIn("slow");
|
$content.fadeIn("slow");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (it.className === "expand-ico") {
|
if (it.className === "expand-ico") {
|
||||||
$abstract.hide();
|
$abstract.hide();
|
||||||
$content.fadeIn();
|
$content.fadeIn();
|
||||||
it.className = "collapse-ico";
|
it.className = "collapse-ico";
|
||||||
} else {
|
} else {
|
||||||
$content.hide();
|
$content.hide();
|
||||||
$abstract.fadeIn();
|
$abstract.fadeIn();
|
||||||
it.className = "expand-ico";
|
it.className = "expand-ico";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
var goTranslate = function () {
|
var goTranslate = function () {
|
||||||
window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href);
|
window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href);
|
||||||
};
|
};
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
// go top icon show or hide
|
// go top icon show or hide
|
||||||
$(window).scroll(function () {
|
$(window).scroll(function () {
|
||||||
var y = $(window).scrollTop();
|
var y = $(window).scrollTop();
|
||||||
|
|
||||||
if (y > 182) {
|
if (y > 182) {
|
||||||
var bodyH = $(window).height();
|
var bodyH = $(window).height();
|
||||||
var top = y + bodyH - 21;
|
var top = y + bodyH - 21;
|
||||||
if ($("body").height() - 58 <= y + bodyH) {
|
if ($("body").height() - 58 <= y + bodyH) {
|
||||||
top = $(".footer").offset().top - 21;
|
top = $(".footer").offset().top - 21;
|
||||||
}
|
}
|
||||||
$("#goTop").fadeIn("slow").css("top", top);
|
$("#goTop").fadeIn("slow").css("top", top);
|
||||||
} else {
|
} else {
|
||||||
$("#goTop").hide();
|
$("#goTop").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// archive
|
// archive
|
||||||
var currentYear = (new Date()).getFullYear(),
|
var currentYear = (new Date()).getFullYear(),
|
||||||
year = currentYear;
|
year = currentYear;
|
||||||
$("#archiveSide li").each(function (i) {
|
$("#archiveSide li").each(function (i) {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
// hide other year month archives
|
// hide other year month archives
|
||||||
if ($this.data("year") !== currentYear) {
|
if ($this.data("year") !== currentYear) {
|
||||||
$(this).hide()
|
$(this).hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
// append year archive
|
// append year archive
|
||||||
if (year !== $this.data("year")) {
|
if (year !== $this.data("year")) {
|
||||||
year = $this.data("year");
|
year = $this.data("year");
|
||||||
$this.before("<li class='archive-year'><div onclick='collapseArchive(this, " +
|
$this.before("<li class='archive-year'><div onclick='collapseArchive(this, " +
|
||||||
year + ")' class='expand-ico'>" + year + " \u5e74</div></li>");
|
year + ")' class='expand-ico'>" + year + " \u5e74</div></li>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// recent comment mouse click
|
// recent comment mouse click
|
||||||
$(".recent-comments .expand-ico").click(function () {
|
$(".recent-comments .expand-ico").click(function () {
|
||||||
if (this.className === "expand-ico") {
|
if (this.className === "expand-ico") {
|
||||||
$(this).parent().next().css({
|
$(this).parent().next().css({
|
||||||
"height": "auto",
|
"height": "auto",
|
||||||
"white-space": "normal"
|
"white-space": "normal"
|
||||||
});
|
});
|
||||||
this.className = "collapse-ico";
|
this.className = "collapse-ico";
|
||||||
} else {
|
} else {
|
||||||
$(this).parent().next().animate({
|
$(this).parent().next().animate({
|
||||||
"height": "18px"
|
"height": "18px"
|
||||||
}, function () {
|
}, function () {
|
||||||
$(this).css("white-space", "nowrap");
|
$(this).css("white-space", "nowrap");
|
||||||
});
|
});
|
||||||
this.className = "expand-ico";
|
this.className = "expand-ico";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// nav current
|
// nav current
|
||||||
$(".nav ul a").each(function () {
|
$(".nav ul li").each(function () {
|
||||||
var $this = $(this);
|
var $a = $(this).find("a");
|
||||||
if ($this.attr("href") === location.pathname) {
|
if ($a.attr("href") === latkeConfig.servePath + location.pathname) {
|
||||||
$this.parent().addClass("current");
|
$(this).addClass("current");
|
||||||
} else if (/\/[0-9]+$/.test(location.pathname)) {
|
} else if (/\/[0-9]+$/.test(location.pathname)) {
|
||||||
$(".nav ul li")[0].className = "current";
|
$(".nav ul li")[0].className = "current";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Util.init();
|
Util.init();
|
||||||
Util.replaceSideEm($(".recent-comments-content"));
|
Util.replaceSideEm($(".recent-comments-content"));
|
||||||
Util.buildTags("tagsSide");
|
Util.buildTags("tagsSide");
|
||||||
|
|
||||||
// recent comments
|
// recent comments
|
||||||
$(".recent-comments .recent-comments-main").each(function () {
|
$(".recent-comments .recent-comments-main").each(function () {
|
||||||
if ($(this).find(".recent-comments-content>a").height() < 30) {
|
if ($(this).find(".recent-comments-content>a").height() < 30) {
|
||||||
$(this).find(".expand-ico").remove();
|
$(this).find(".expand-ico").remove();
|
||||||
} else {
|
} else {
|
||||||
$(this).find(".expand-ico").parent().next().css({
|
$(this).find(".expand-ico").parent().next().css({
|
||||||
"white-space": "nowrap"
|
"white-space": "nowrap"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
4
neoease/js/neoease.min.js
vendored
4
neoease/js/neoease.min.js
vendored
@ -16,5 +16,5 @@
|
|||||||
* @fileoverview neoease js.
|
* @fileoverview neoease js.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
|
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
|
||||||
* @version 1.0.0.7, May 11, 2012
|
* @version 1.0.0.8, Sep 6, 2012
|
||||||
*/var goTop=function(e){e=e||.1;var t=$(window).scrollTop(),n=1+e;window.scrollTo(0,Math.floor(t/n));if(t>0){var r="goTop("+e+")";window.setTimeout(r,16)}},collapseArchive=function(e,t){var n=!0;e.className==="collapse-ico"?(e.className="expand-ico",n=!1):e.className="collapse-ico",$("#archiveSide li").each(function(){var e=$(this);e.data("year")===t&&(n?$(this).show():$(this).hide())})},getArticle=function(e,t){var n=$("#abstract"+t),r=$("#content"+t);return r.html()===""?$.ajax({url:"/get-article-content?id="+t,type:"GET",dataType:"html",beforeSend:function(){n.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(t,i){e.className="collapse-ico",r.html(t),n.hide().css("background","none"),r.fadeIn("slow")}}):e.className==="expand-ico"?(n.hide(),r.fadeIn(),e.className="collapse-ico"):(r.hide(),n.fadeIn(),e.className="expand-ico"),!1},goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};(function(){$(window).scroll(function(){var e=$(window).scrollTop();if(e>182){var t=$(window).height(),n=e+t-21;$("body").height()-58<=e+t&&(n=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",n)}else $("#goTop").hide()});var e=(new Date).getFullYear(),t=e;$("#archiveSide li").each(function(n){var r=$(this);r.data("year")!==e&&$(this).hide(),t!==r.data("year")&&(t=r.data("year"),r.before("<li class='archive-year'><div onclick='collapseArchive(this, "+t+")' class='expand-ico'>"+t+" 年</div></li>"))}),$(".recent-comments .expand-ico").click(function(){this.className==="expand-ico"?($(this).parent().next().css({height:"auto","white-space":"normal"}),this.className="collapse-ico"):($(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")}),this.className="expand-ico")}),$(".nav ul a").each(function(){var e=$(this);e.attr("href")===location.pathname?e.parent().addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),$(".recent-comments .recent-comments-main").each(function(){$(this).find(".recent-comments-content>a").height()<30?$(this).find(".expand-ico").remove():$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})})})();
|
*/var goTop=function(e){e=e||.1;var t=$(window).scrollTop(),n=1+e;window.scrollTo(0,Math.floor(t/n));if(t>0){var r="goTop("+e+")";window.setTimeout(r,16)}},collapseArchive=function(e,t){var n=!0;e.className==="collapse-ico"?(e.className="expand-ico",n=!1):e.className="collapse-ico",$("#archiveSide li").each(function(){var e=$(this);e.data("year")===t&&(n?$(this).show():$(this).hide())})},getArticle=function(e,t){var n=$("#abstract"+t),r=$("#content"+t);return r.html()===""?$.ajax({url:"/get-article-content?id="+t,type:"GET",dataType:"html",beforeSend:function(){n.css("background","url(/skins/neoease/images/ajax-loader.gif) no-repeat scroll center center transparent")},success:function(t,i){e.className="collapse-ico",r.html(t),n.hide().css("background","none"),r.fadeIn("slow")}}):e.className==="expand-ico"?(n.hide(),r.fadeIn(),e.className="collapse-ico"):(r.hide(),n.fadeIn(),e.className="expand-ico"),!1},goTranslate=function(){window.open("http://translate.google.com/translate?sl=auto&tl=auto&u="+location.href)};(function(){$(window).scroll(function(){var e=$(window).scrollTop();if(e>182){var t=$(window).height(),n=e+t-21;$("body").height()-58<=e+t&&(n=$(".footer").offset().top-21),$("#goTop").fadeIn("slow").css("top",n)}else $("#goTop").hide()});var e=(new Date).getFullYear(),t=e;$("#archiveSide li").each(function(n){var r=$(this);r.data("year")!==e&&$(this).hide(),t!==r.data("year")&&(t=r.data("year"),r.before("<li class='archive-year'><div onclick='collapseArchive(this, "+t+")' class='expand-ico'>"+t+" 年</div></li>"))}),$(".recent-comments .expand-ico").click(function(){this.className==="expand-ico"?($(this).parent().next().css({height:"auto","white-space":"normal"}),this.className="collapse-ico"):($(this).parent().next().animate({height:"18px"},function(){$(this).css("white-space","nowrap")}),this.className="expand-ico")}),$(".nav ul li").each(function(){var e=$(this).find("a");e.attr("href")===latkeConfig.servePath+location.pathname?$(this).addClass("current"):/\/[0-9]+$/.test(location.pathname)&&($(".nav ul li")[0].className="current")}),Util.init(),Util.replaceSideEm($(".recent-comments-content")),Util.buildTags("tagsSide"),$(".recent-comments .recent-comments-main").each(function(){$(this).find(".recent-comments-content>a").height()<30?$(this).find(".expand-ico").remove():$(this).find(".expand-ico").parent().next().css({"white-space":"nowrap"})})})();
|
Loading…
x
Reference in New Issue
Block a user