Commit 1f4f3d0f authored by Van's avatar Van

💄 #47

parent c07a1950
This diff is collapsed.
......@@ -19,7 +19,7 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Feb 17, 2017
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
......
......@@ -173,7 +173,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var jque
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _js_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../js/common */ \"./src/main/resources/js/common.js\");\n/*\n * Solo - A small and beautiful blogging system written in Java.\n * Copyright (c) 2010-present, b3log.org\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n/**\n * @fileoverview util and every page should be used.\n *\n * @author <a href=\"http://vanessa.b3log.org\">Liyuan Li</a>\n * @version 0.1.0.0, Feb 17, 2017\n */\n\n\n\n/**\n * @description 皮肤脚本\n * @static\n */\nwindow.Skin = {\n _initCommon: function ($goTop) {\n var $banner = $('header .banner'),\n $navbar = $('header .navbar')\n\n $(window).scroll(function () {\n if ($(window).scrollTop() > 125) {\n $goTop.show()\n } else {\n $goTop.hide()\n }\n\n if ($(window).width() < 701) {\n return false\n }\n\n if ($(window).scrollTop() > $banner.height()) {\n $navbar.addClass('pin')\n $('.main-wrap').parent().css('margin-top', '81px')\n $('.article__toc').css('position', 'fixed')\n } else {\n $navbar.removeClass('pin')\n $('.main-wrap').parent().css('margin-top', '0')\n $('.article__toc').css('position', 'inherit')\n }\n })\n\n $(window).scroll()\n },\n init: function () {\n this._initCommon($('.icon-up'))\n\n $('.navbar nav a').each(function () {\n if (this.href === location.href) {\n this.className = 'current'\n }\n })\n\n $('.responsive .list a').each(function () {\n if (this.href === location.href) {\n $(this).parent().addClass('current')\n }\n })\n\n $('.responsive .icon-list').click(function () {\n $('.responsive .list').slideToggle()\n })\n },\n initToc: function () {\n var $articleToc = $('.article__toc')\n if ($articleToc.length === 0) {\n return false\n }\n\n $articleToc.css({\n width: $articleToc.parent().width(),\n left: $articleToc.parent().offset().left,\n }).find('a').click(function () {\n $articleToc.find('li').removeClass('toc--current')\n $(this).parent().addClass('toc--current')\n var id = $(this).attr('href')\n setTimeout(function () {\n $(window).scrollTop($(id).offset().top - 60)\n })\n })\n },\n}\n\n$(document).ready(function () {\n Skin.init()\n})\n\n\n//# sourceURL=webpack:///./src/main/resources/skins/9IPHP/js/common.js?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _js_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../js/common */ \"./src/main/resources/js/common.js\");\n/*\n * Solo - A small and beautiful blogging system written in Java.\n * Copyright (c) 2010-present, b3log.org\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n/**\n * @fileoverview util and every page should be used.\n *\n * @author <a href=\"http://vanessa.b3log.org\">Liyuan Li</a>\n * @version 1.0.0.0, Jan 18, 2019\n */\n\n\n\n/**\n * @description 皮肤脚本\n * @static\n */\nwindow.Skin = {\n _initCommon: function ($goTop) {\n var $banner = $('header .banner'),\n $navbar = $('header .navbar')\n\n $(window).scroll(function () {\n if ($(window).scrollTop() > 125) {\n $goTop.show()\n } else {\n $goTop.hide()\n }\n\n if ($(window).width() < 701) {\n return false\n }\n\n if ($(window).scrollTop() > $banner.height()) {\n $navbar.addClass('pin')\n $('.main-wrap').parent().css('margin-top', '81px')\n $('.article__toc').css('position', 'fixed')\n } else {\n $navbar.removeClass('pin')\n $('.main-wrap').parent().css('margin-top', '0')\n $('.article__toc').css('position', 'inherit')\n }\n })\n\n $(window).scroll()\n },\n init: function () {\n this._initCommon($('.icon-up'))\n\n $('.navbar nav a').each(function () {\n if (this.href === location.href) {\n this.className = 'current'\n }\n })\n\n $('.responsive .list a').each(function () {\n if (this.href === location.href) {\n $(this).parent().addClass('current')\n }\n })\n\n $('.responsive .icon-list').click(function () {\n $('.responsive .list').slideToggle()\n })\n },\n initToc: function () {\n var $articleToc = $('.article__toc')\n if ($articleToc.length === 0) {\n return false\n }\n\n $articleToc.css({\n width: $articleToc.parent().width(),\n left: $articleToc.parent().offset().left,\n }).find('a').click(function () {\n $articleToc.find('li').removeClass('toc--current')\n $(this).parent().addClass('toc--current')\n var id = $(this).attr('href')\n setTimeout(function () {\n $(window).scrollTop($(id).offset().top - 60)\n })\n })\n },\n}\n\n$(document).ready(function () {\n Skin.init()\n})\n\n\n//# sourceURL=webpack:///./src/main/resources/skins/9IPHP/js/common.js?");
/***/ })
......
......@@ -19,14 +19,16 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.1.0, Jul 13, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description 皮肤脚本
* @static
*/
var Skin = {
window.Skin = {
init: function () {
$('#headerDown').click(function () {
$('html, body').animate({scrollTop: $(window).height()}, 300)
......
......@@ -19,14 +19,16 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.1.0, Apr 19, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description 皮肤脚本
* @static
*/
var Skin = {
window.Skin = {
init: function () {
if (Label.staticSite) {
return
......
......@@ -19,14 +19,15 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.1.1.0, Sep 21, 2018
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description Finding 皮肤脚本
* @static
*/
var Finding = {
window.Finding = {
/**
* @description 页面初始化
*/
......
......@@ -19,14 +19,15 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.2.0.1, Mar 22, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description 皮肤脚本
* @static
*/
var Skin = {
window.Skin = {
initToc: function () {
if ($('.article__toc li').length > 0 && $(window).width() > 768) {
$('.article__toc').css({
......
......@@ -19,14 +19,15 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.1, Mar 22, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description 皮肤脚本
* @static
*/
var Skin = {
window.Skin = {
init: function () {
var $article__toc = $('.article__toc')
$(window).scroll(function () {
......
......@@ -28,7 +28,7 @@
<div class="clear"></div>
</div>
</div>
<div id="goTop" onclick="goTop()">TOP</div>
<div id="goTop" onclick="Util.goTop()">TOP</div>
<#include "../../common-template/label.ftl">
<script src="${staticServePath}/skins/${skinDirName}/js/common.min.js?${staticResourceVersion}"></script>
${plugins}
......@@ -19,22 +19,12 @@
* @fileoverview neoease js.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.0.0.8, Sep 6, 2012
* @version 1.0.0.0, Jan 18, 2019
*/
var goTop = function (acceleration) {
acceleration = acceleration || 0.1
var y = $(window).scrollTop()
var speed = 1 + acceleration
window.scrollTo(0, Math.floor(y / speed))
if (y > 0) {
var invokeFunction = 'goTop(' + acceleration + ')'
window.setTimeout(invokeFunction, 16)
}
}
import '../../../js/common'
var collapseArchive = function (it, year) {
window.collapseArchive = function (it, year) {
var tag = true
if (it.className === 'collapse-ico') {
it.className = 'expand-ico'
......@@ -56,7 +46,7 @@ var collapseArchive = function (it, year) {
})
}
var getArticle = function (it, id) {
window.getArticle = function (it, id) {
var $abstract = $('#abstract' + id),
$content = $('#content' + id)
......@@ -92,7 +82,7 @@ var getArticle = function (it, id) {
return false
}
var goTranslate = function () {
window.goTranslate = function () {
window.open('http://translate.google.com/translate?sl=auto&tl=auto&u=' +
location.href)
}
......
......@@ -19,14 +19,15 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Feb 27, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description 皮肤脚本
* @static
*/
var Skin = {
window.Skin = {
init: function () {
var header = new Headroom($('header')[0], {
tolerance: 0,
......
......@@ -19,9 +19,11 @@
* @fileoverview metro-hot js.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.1.0.0, Feb 27, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
window.MetroHot = {
headerH: $("#header").height() + 30 + ($("#header > div").get(1) ? 30 : 0),
responsiveType: "large",
......
......@@ -19,14 +19,15 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.4.0.0, Jul 26, 2017
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description next 皮肤脚本
* @static
*/
var NexT = {
window.NexT = {
init: function () {
$('.sidebar-toggle').click(function () {
var $sidebar = $('.sidebar');
......
......@@ -19,14 +19,16 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.3.0.0, Dev 17, 2018
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description 皮肤脚本
* @static
*/
var Skin = {
window.Skin = {
_initCommon: function ($goTop) {
$(window).scroll(function () {
if ($(window).scrollTop() > 125) {
......
......@@ -19,8 +19,11 @@
* @fileoverview timeline js.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.1.0.0, Aug 2, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
window.timeline = {
_COLHA: 0,
_COLHB: 20,
......@@ -485,7 +488,7 @@ window.timeline = {
return deferred ? deferred.promise($this) : $this;
};
})(jQuery);
})($);
(function() {
Util.setTopBar()
......
......@@ -19,14 +19,15 @@
* @fileoverview util and every page should be used.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 1.3.0.0, Feb 27, 2019
* @version 1.0.0.0, Jan 18, 2019
*/
import '../../../js/common'
/**
* @description yilia 皮肤脚本
* @static
*/
var Yilia = {
window.Yilia = {
/**
* @description 页面初始化
*/
......
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