Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/activeNav.js b/js/activeNav.js
deleted file mode 100644
index d86b6be..0000000
--- a/js/activeNav.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// which nav has active
-let navs = document.querySelectorAll('.nav-item');
-let pagePath = window.location.pathname;
-for(let nav of navs) {
- let navPath = nav.getAttribute("data-path");
- if(navPath && navPath === pagePath) {
- nav.className = "nav-item active";
- }
-}
diff --git a/js/backtotop.js b/js/backtotop.js
deleted file mode 100644
index 8db4996..0000000
--- a/js/backtotop.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// back to top js
-function isHidden() {
- let scrollTop = document.documentElement.scrollTop || document.body.scrollTop
- if (scrollTop > 0) {
- document.querySelector(".back-to-top").className = "back-to-top";
- } else {
- document.querySelector(".back-to-top").className = "back-to-top hidden";
- }
-}
-
-const backToTop = () => {
- let scrollTop =
- document.documentElement.scrollTop || document.body.scrollTop,
- delay = 10,
- time = 200;
- let step = Math.ceil(scrollTop * delay / time);
- let timer = setInterval(() => {
- scrollTop =
- document.documentElement.scrollTop || document.body.scrollTop;
- if (scrollTop - step <= 0) {
- document.documentElement.scrollTop = 0;
- document.body.scrollTop = 0;
- clearInterval(timer);
- } else {
- document.documentElement.scrollTop = scrollTop - step;
- document.body.scrollTop = scrollTop - step;
- }
- }, delay);
-}
-
-isHidden()
-document.addEventListener("scroll", isHidden, false);
-document.querySelector(".back-to-top").addEventListener("click", backToTop, false);
diff --git a/js/catalog.js b/js/catalog.js
deleted file mode 100644
index 98f69d8..0000000
--- a/js/catalog.js
+++ /dev/null
@@ -1,56 +0,0 @@
-// catalog js
-let catalog = document.getElementById("catalog");
-let catalogTopHeight = catalog.offsetTop;
-let tocElement = document.getElementsByClassName("catalog-content")[0]
-
-// 是否固定目录
-function changePos() {
- let scrollTop = document.documentElement.scrollTop || document.body.scrollTop
- if (scrollTop > catalogTopHeight - 20) {
- catalog.style = "position: fixed; top: 20px; bottom: 20px;"
- } else {
- catalog.style = "position: absolute; top: calc(290px + 88px + 30px)"
- }
-}
-
-// 是否激活目录
-function isActiveCat() {
- // 可宽限高度值
- let offsetHeight = 20
-
- // 当前页面滚动位置距页面顶部的高度值
- let scrollTop = document.documentElement.scrollTop || document.body.scrollTop
-
- // 页面所有标题列表
- let headerLinkList = document.getElementsByClassName("headerlink")
-
- // 页面所有目录列表
- let catLinkList = document.getElementsByClassName("toc-link")
-
- for(let i = 0; i < catLinkList.length; i++) {
- let currentTopCat = headerLinkList[i].offsetTop - offsetHeight
- let nextTopCat = i + 1 === headerLinkList.length ?
- Infinity : headerLinkList[i+1].offsetTop - offsetHeight
-
- if (scrollTop >= currentTopCat && scrollTop < nextTopCat) {
- // 目录跟随滚动
- catLinkList[i].className = "toc-link active"
- tocElement.scrollTop = catLinkList[i].offsetTop - 32
- } else {
- catLinkList[i].className = "toc-link"
- }
- }
-}
-
-// 窗体高度变化时
-function handleResize() {
- let windowHeight = document.documentElement.clientHeight
- tocElement.setAttribute('style', `height: ${windowHeight - 90}px`);
-}
-
-changePos();
-isActiveCat();
-handleResize();
-document.addEventListener("scroll", changePos, false);
-document.addEventListener("scroll", isActiveCat, false);
-window.addEventListener("resize", handleResize, false);
diff --git a/js/fancybox.js b/js/fancybox.js
deleted file mode 100644
index 6ec564a..0000000
--- a/js/fancybox.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// fancybox js
-let fancyTimer = setInterval(function(){
- if(!window.$){
- return;
- }
- $(document).ready(function() {
- $(".markdown-body img").each(function () {
- if($(this).parent().get(0).tagName.toLowerCase() === "a") {
- return;
- }
- // $(this).attr("data-fancybox", "gallery"); // if you add 'data-fancybox', img will display after showed
- var element = document.createElement("a");
- $(element).attr("data-fancybox", "gallery");
- // 判断是否启用了lazyload图片懒加载
- if ($(this).attr("data-original")) {
- $(element).attr("href", $(this).attr("data-original"));
- } else {
- $(element).attr("href", $(this).attr("src"));
- }
- $(this).wrap(element);
- });
-
- clearInterval(fancyTimer);
- });
-}, 10);
diff --git a/js/search.js b/js/search.js
deleted file mode 100644
index 8691e78..0000000
--- a/js/search.js
+++ /dev/null
@@ -1,137 +0,0 @@
-// A local search script with the help of [hexo-generator-search](https://github.com/PaicHyperionDev/hexo-generator-search)
-// Copyright (C) 2017
-// Liam Huang
-// This library is free software; you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as
-// published by the Free Software Foundation; either version 2.1 of the
-// License, or (at your option) any later version.
-//
-// This library 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
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-// 02110-1301 USA
-//
-
-var searchFunc = function (path, search_id, content_id) {
- // 0x00. environment initialization
- 'use strict';
- // var "×";
- var $input = document.getElementById(search_id);
- var $resultContent = document.getElementById(content_id);
- $resultContent.innerHTML = "
首次搜索,正在载入索引文件,请稍后……
";
- $.ajax({
- // 0x01. load xml file
- url: path,
- dataType: "xml",
- success: function (xmlResponse) {
- // 0x02. parse xml file
- var datas = $("entry", xmlResponse).map(function () {
- return {
- title: $("title", this).text(),
- content: $("content", this).text(),
- url: $("url", this).text()
- };
- }).get();
- $resultContent.innerHTML = "";
-
- $input.addEventListener('input', function () {
- // 0x03. parse query to keywords list
- var str = '
';
- var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
- $resultContent.innerHTML = "";
- if (this.value.trim().length <= 0) {
- return;
- }
- // 0x04. perform local searching
- datas.forEach(function (data) {
- var isMatch = true;
- var content_index = [];
- if (!data.title || data.title.trim() === '') {
- data.title = "Untitled";
- }
- var orig_data_title = data.title.trim();
- var data_title = orig_data_title.toLowerCase();
- var orig_data_content = data.content.trim().replace(/<[^>]+>/g, "");
- var data_content = orig_data_content.toLowerCase();
- var data_url = data.url;
- var index_title = -1;
- var index_content = -1;
- var first_occur = -1;
- // only match artiles with not empty contents
- if (data_content !== '') {
- keywords.forEach(function (keyword, i) {
- index_title = data_title.indexOf(keyword);
- index_content = data_content.indexOf(keyword);
-
- if (index_title < 0 && index_content < 0) {
- isMatch = false;
- } else {
- if (index_content < 0) {
- index_content = 0;
- }
- if (i == 0) {
- first_occur = index_content;
- }
- // content_index.push({index_content:index_content, keyword_len:keyword_len});
- }
- });
- } else {
- isMatch = false;
- }
- // 0x05. show search results
- if (isMatch) {
- str += "
" + orig_data_title + "";
- var content = orig_data_content;
- if (first_occur >= 0) {
- // cut out 100 characters
- var start = first_occur - 20;
- var end = first_occur + 80;
-
- if (start < 0) {
- start = 0;
- }
-
- if (start == 0) {
- end = 100;
- }
-
- if (end > content.length) {
- end = content.length;
- }
-
- var match_content = content.substr(start, end);
-
- // highlight all keywords
- keywords.forEach(function (keyword) {
- var regS = new RegExp(keyword, "gi");
- match_content = match_content.replace(regS, "" + keyword + "");
- });
-
- str += "