mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-12 20:26:38 +00:00
文件夹结构调整,新增模版自定义功能
This commit is contained in:
README.mdlayui.all.jslayui.js
doc
api
es
sql
novel-front/src/main/resources
templates/orange
html
404.html
about
author
author_income.htmlauthor_income_detail.htmlbook_add.htmlcontent_add.htmlcontent_update.htmlindex.htmlindex_list.htmlregister.html
book
common
index.htmlmobile
book
book_content.htmlbook_detail.htmlbook_index.htmlbook_ranking.htmlbook_submit.htmlmh_book_search.htmlsoft_book_search.html
common
index.htmluser
pay
user
static
css
images
404.jpegauthor_head.pngdefault.gificon_dt.pngicon_readpage.pngicon_reply.pngicon_sj.pngicon_user.pnglogin_qq.pnglogin_weibo.pnglogin_weixin.pnglogo.pnglogo_white.pngman.pngno_comment.pngpay_wx.pngpay_zfb.pngpic_upload.pngsearch.pngsmlcover.png
javascript
YT.jsajaxfileupload.jsauthorinfo.jsbookclass.jsbookdetail.jscommon.jsdate.jseasyui-lang-zh_CN.jsheader.jsjquery-1.8.0.min.jsjquery.easyui.min.jslayer.m.js
need
pay.jsufans.jsuser.jsycUtils.jslayui
css
font
images
face
0.gif1.gif10.gif11.gif12.gif13.gif14.gif15.gif16.gif17.gif18.gif19.gif2.gif20.gif21.gif22.gif23.gif24.gif25.gif26.gif27.gif28.gif29.gif3.gif30.gif31.gif32.gif33.gif34.gif35.gif36.gif37.gif38.gif39.gif4.gif40.gif41.gif42.gif43.gif44.gif45.gif46.gif47.gif48.gif49.gif5.gif50.gif51.gif52.gif53.gif54.gif55.gif56.gif57.gif58.gif59.gif6.gif60.gif61.gif62.gif63.gif64.gif65.gif66.gif67.gif68.gif69.gif7.gif70.gif71.gif8.gif9.gif
lay
modules
mobile
IMG_1470.JPGbaidu_verify_ANtJi2eSPQ.htmlbaidu_verify_Ep8xaWQJAI.htmlbaidu_verify_L6sR9GjEtg.htmlbook_content.htmlbook_detail.htmlbook_index.htmlbook_search.htmlfavicon.icofiction_house.apklayui.all.jslayui.jsmang.htmlmang.pngshenma-site-verification.txtshenma-site-verification2.txt
html
9a4a540e-1759-4268-90fa-7fb652c3604a.001.png9a4a540e-1759-4268-90fa-7fb652c3604a.002.png9a4a540e-1759-4268-90fa-7fb652c3604a.003.png9a4a540e-1759-4268-90fa-7fb652c3604a.004.png9a4a540e-1759-4268-90fa-7fb652c3604a.005.png9a4a540e-1759-4268-90fa-7fb652c3604a.006.png9a4a540e-1759-4268-90fa-7fb652c3604a.007.png9a4a540e-1759-4268-90fa-7fb652c3604a.008.png9a4a540e-1759-4268-90fa-7fb652c3604a.009.png9a4a540e-1759-4268-90fa-7fb652c3604a.010.png9a4a540e-1759-4268-90fa-7fb652c3604a.011.png9a4a540e-1759-4268-90fa-7fb652c3604a.012.png9a4a540e-1759-4268-90fa-7fb652c3604a.013.png9a4a540e-1759-4268-90fa-7fb652c3604a.014.png9a4a540e-1759-4268-90fa-7fb652c3604a.015.png9a4a540e-1759-4268-90fa-7fb652c3604a.016.png9a4a540e-1759-4268-90fa-7fb652c3604a.017.png9a4a540e-1759-4268-90fa-7fb652c3604a.018.png9a4a540e-1759-4268-90fa-7fb652c3604a.019.png9a4a540e-1759-4268-90fa-7fb652c3604a.020.png9a4a540e-1759-4268-90fa-7fb652c3604a.021.png9a4a540e-1759-4268-90fa-7fb652c3604a.022.png9a4a540e-1759-4268-90fa-7fb652c3604a.023.png9a4a540e-1759-4268-90fa-7fb652c3604a.024.png9a4a540e-1759-4268-90fa-7fb652c3604a.025.png9a4a540e-1759-4268-90fa-7fb652c3604a.026.png9a4a540e-1759-4268-90fa-7fb652c3604a.027.png9a4a540e-1759-4268-90fa-7fb652c3604a.028.png9a4a540e-1759-4268-90fa-7fb652c3604a.030.pngnote_1.htmlnote_2.htmlnote_3.htmlnote_4.html
index.htmljs
layui
css
font
images
face
0.gif1.gif10.gif11.gif12.gif13.gif14.gif15.gif16.gif17.gif18.gif19.gif2.gif20.gif21.gif22.gif23.gif24.gif25.gif26.gif27.gif28.gif29.gif3.gif30.gif31.gif32.gif33.gif34.gif35.gif36.gif37.gif38.gif39.gif4.gif40.gif41.gif42.gif43.gif44.gif45.gif46.gif47.gif48.gif49.gif5.gif50.gif51.gif52.gif53.gif54.gif55.gif56.gif57.gif58.gif59.gif6.gif60.gif61.gif62.gif63.gif64.gif65.gif66.gif67.gif68.gif69.gif7.gif70.gif71.gif8.gif9.gif
lay
modules
static
23446.jpg4868.jpg5082.jpg851bd749efa54b8a8445b03108722163.jpgU770P4T8D8933761F19930DT20190821203252.jpgU770P4T8D8933772F19930DT20190821204700.jpgU770P4T8D8933775F19930DT20190821204952.jpgU770P4T8D8933777F19930DT20190821205124.jpgU849P4T8D8933738F19930DT20190821200104.jpgcore.phpicon-backtop.gifindex.csslogo.png
page
sl_104147940.jpgsl_104148030.jpgsl_104148150.jpgsl_104152260.jpgsl_104153130.jpgsl_104155330.jpgsl_104155520.JPGsl_104156600.JPGsl_104157470.jpgsl_104157670.jpgsl_104158410.jpgsmimg_8992d763a682448aa74347c634da3d94.jpgsmimg_d640709a27df412d82b084b64677b115.jpgsmimg_e5dd6053d3344ea49bd7e6df022b969a.jpgz_stat.phpwangEditor
.eslintignore.eslintrc.json.gitattributes.gitignore.npmignoreISSUE.mdLICENSEREADME.mdbower.json
docs
dev
usage
01-getstart
02-content
03-config
01-menu.md02-debug.md03-onchange.md04-z-index.md05-lang.md06-paste.md07-linkImgCallback.md08-linkCheck.md09-onfocus.md10-onblur.md11-linkImgCheck.md12-colors.md13-emot.md
04-uploadimg
05-other
README.mdexample
README.mdfavicon.ico
gulpfile.jspackage.jsondemo
in-react
in-vue
.babelrc.editorconfig.postcssrc.js
test-amd-main.jstest-amd.htmltest-css-reset.htmltest-emot.htmltest-fullscreen.htmltest-get-content.htmltest-getJSON.htmltest-lang.htmltest-menus.htmltest-mult.htmltest-onblur.htmltest-onchange.htmltest-onfocus.htmltest-paste.htmltest-set-content.htmltest-sperate.htmltest-textarea.htmltest-uploadimg.htmlbuild
build.jscheck-versions.jsdev-client.jsdev-server.jsutils.jsvue-loader.conf.jswebpack.base.conf.jswebpack.dev.conf.jswebpack.prod.conf.js
config
index.htmlpackage.jsonsrc
static
icomoon
index.htmlpay.pngserver
release
src
fonts
js
.babelrc
command
config.jseditor
index.jsmenus
backColor
bold
code
droplist.jsemoticon
foreColor
head
img
index.jsitalic
justify
link
list
menu-list.jspanel.jsquote
redo
strikethrough
table
underline
undo
video
selection
text
util
less
180
templates/orange/static/mobile/js/lazyload.js
Normal file
180
templates/orange/static/mobile/js/lazyload.js
Normal file
@ -0,0 +1,180 @@
|
||||
/*!
|
||||
* Lazy Load - JavaScript plugin for lazy loading images
|
||||
*
|
||||
* Copyright (c) 2007-2019 Mika Tuupola
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Project home:
|
||||
* https://appelsiini.net/projects/lazyload
|
||||
*
|
||||
* Version: 2.0.0-rc.2
|
||||
*
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = factory(root);
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define([], factory);
|
||||
} else {
|
||||
root.LazyLoad = factory(root);
|
||||
}
|
||||
}) (typeof global !== "undefined" ? global : this.window || this.global, function (root) {
|
||||
|
||||
"use strict";
|
||||
|
||||
if (typeof define === "function" && define.amd){
|
||||
root = window;
|
||||
}
|
||||
|
||||
const defaults = {
|
||||
src: "data-src",
|
||||
srcset: "data-srcset",
|
||||
selector: ".lazyload",
|
||||
root: null,
|
||||
rootMargin: "0px",
|
||||
threshold: 0
|
||||
};
|
||||
|
||||
/**
|
||||
* Merge two or more objects. Returns a new object.
|
||||
* @private
|
||||
* @param {Boolean} deep If true, do a deep (or recursive) merge [optional]
|
||||
* @param {Object} objects The objects to merge together
|
||||
* @returns {Object} Merged values of defaults and options
|
||||
*/
|
||||
const extend = function () {
|
||||
|
||||
let extended = {};
|
||||
let deep = false;
|
||||
let i = 0;
|
||||
let length = arguments.length;
|
||||
|
||||
/* Check if a deep merge */
|
||||
if (Object.prototype.toString.call(arguments[0]) === "[object Boolean]") {
|
||||
deep = arguments[0];
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Merge the object into the extended object */
|
||||
let merge = function (obj) {
|
||||
for (let prop in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
||||
/* If deep merge and property is an object, merge properties */
|
||||
if (deep && Object.prototype.toString.call(obj[prop]) === "[object Object]") {
|
||||
extended[prop] = extend(true, extended[prop], obj[prop]);
|
||||
} else {
|
||||
extended[prop] = obj[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* Loop through each object and conduct a merge */
|
||||
for (; i < length; i++) {
|
||||
let obj = arguments[i];
|
||||
merge(obj);
|
||||
}
|
||||
|
||||
return extended;
|
||||
};
|
||||
|
||||
function LazyLoad(images, options) {
|
||||
this.settings = extend(defaults, options || {});
|
||||
this.images = images || document.querySelectorAll(this.settings.selector);
|
||||
this.observer = null;
|
||||
this.init();
|
||||
}
|
||||
|
||||
LazyLoad.prototype = {
|
||||
init: function() {
|
||||
|
||||
/* Without observers load everything and bail out early. */
|
||||
if (!root.IntersectionObserver) {
|
||||
this.loadImages();
|
||||
return;
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let observerConfig = {
|
||||
root: this.settings.root,
|
||||
rootMargin: this.settings.rootMargin,
|
||||
threshold: [this.settings.threshold]
|
||||
};
|
||||
|
||||
this.observer = new IntersectionObserver(function(entries) {
|
||||
Array.prototype.forEach.call(entries, function (entry) {
|
||||
if (entry.isIntersecting) {
|
||||
self.observer.unobserve(entry.target);
|
||||
let src = entry.target.getAttribute(self.settings.src);
|
||||
let srcset = entry.target.getAttribute(self.settings.srcset);
|
||||
if ("img" === entry.target.tagName.toLowerCase()) {
|
||||
if (src) {
|
||||
entry.target.src = src;
|
||||
}
|
||||
if (srcset) {
|
||||
entry.target.srcset = srcset;
|
||||
}
|
||||
} else {
|
||||
entry.target.style.backgroundImage = "url(" + src + ")";
|
||||
}
|
||||
}
|
||||
});
|
||||
}, observerConfig);
|
||||
|
||||
Array.prototype.forEach.call(this.images, function (image) {
|
||||
self.observer.observe(image);
|
||||
});
|
||||
},
|
||||
|
||||
loadAndDestroy: function () {
|
||||
if (!this.settings) { return; }
|
||||
this.loadImages();
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
loadImages: function () {
|
||||
if (!this.settings) { return; }
|
||||
|
||||
let self = this;
|
||||
Array.prototype.forEach.call(this.images, function (image) {
|
||||
let src = image.getAttribute(self.settings.src);
|
||||
let srcset = image.getAttribute(self.settings.srcset);
|
||||
if ("img" === image.tagName.toLowerCase()) {
|
||||
if (src) {
|
||||
image.src = src;
|
||||
}
|
||||
if (srcset) {
|
||||
image.srcset = srcset;
|
||||
}
|
||||
} else {
|
||||
image.style.backgroundImage = "url('" + src + "')";
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
if (!this.settings) { return; }
|
||||
this.observer.disconnect();
|
||||
this.settings = null;
|
||||
}
|
||||
};
|
||||
|
||||
root.lazyload = function(images, options) {
|
||||
return new LazyLoad(images, options);
|
||||
};
|
||||
|
||||
if (root.jQuery) {
|
||||
const $ = root.jQuery;
|
||||
$.fn.lazyload = function (options) {
|
||||
options = options || {};
|
||||
options.attribute = options.attribute || "data-src";
|
||||
new LazyLoad($.makeArray(this), options);
|
||||
return this;
|
||||
};
|
||||
}
|
||||
|
||||
return LazyLoad;
|
||||
});
|
Reference in New Issue
Block a user