ease 皮肤细节
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
|
||||
* Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014, B3log Team
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,7 +17,7 @@
|
||||
* @fileoverview ease js.
|
||||
*
|
||||
* @author <a href="mailto:LLY219@gmail.com">Liyuan Li</a>
|
||||
* @version 1.0.1.5, Jan 29, 2013
|
||||
* @version 1.0.1.6, Nov 28, 2013
|
||||
*/
|
||||
var goTranslate = function () {
|
||||
window.open("http://translate.google.com/translate?sl=auto&tl=auto&u=" + location.href);
|
||||
@@ -147,7 +147,7 @@ var ease = {
|
||||
setNavCurrent: function () {
|
||||
$(".nav ul a").each(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr("href") === latkeConfig.servePath + location.pathname) {
|
||||
if ($this.attr("href") === location.href) {
|
||||
$this.addClass("current");
|
||||
} else if (/\/[0-9]+$/.test(location.pathname)) {
|
||||
$(".nav ul li")[0].className = "current";
|
||||
@@ -237,20 +237,7 @@ var ease = {
|
||||
scrollEvent: function () {
|
||||
var _it = this;
|
||||
$(window).scroll(function () {
|
||||
var y = $(window).scrollTop(),
|
||||
topH = 0;
|
||||
if ($("#top").css("display") === "block") {
|
||||
topH = $("#top").height();
|
||||
}
|
||||
|
||||
// header event
|
||||
if (y >= _it.headerH + topH) {
|
||||
_it.$nav.css("position", "fixed");
|
||||
_it.$body.css("marginTop", "55px");
|
||||
} else {
|
||||
_it.$nav.css("position" ,"inherit");
|
||||
_it.$body.css("marginTop", "0");
|
||||
}
|
||||
var y = $(window).scrollTop();
|
||||
|
||||
// go top icon show or hide
|
||||
if (y > _it.headerH) {
|
||||
@@ -293,15 +280,6 @@ var ease = {
|
||||
$(".article-body").each(function () {
|
||||
this.innerHTML = Util.replaceEmString($(this).html());
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @description 纠正评论滚动位置偏差
|
||||
*/
|
||||
scrollToCmt: function () {
|
||||
if ($(window.location.hash).length == 1) {
|
||||
$(window).scrollTop($(window.location.hash).offset().top - 60);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
5
ease/js/ease.min.js
vendored
5
ease/js/ease.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user