Skip to content

Commit

Permalink
Automatic deploy by Github Action:2024-07-05 14:02:49
Browse files Browse the repository at this point in the history
  • Loading branch information
github-action committed Jul 5, 2024
1 parent 53e1d8a commit 315cbed
Show file tree
Hide file tree
Showing 178 changed files with 114,632 additions and 0 deletions.
736 changes: 736 additions & 0 deletions 2022/05/22/Linux/Manjaro/ArchLinux安装教程/index.html

Large diffs are not rendered by default.

660 changes: 660 additions & 0 deletions 2022/05/22/hello-world/index.html

Large diffs are not rendered by default.

800 changes: 800 additions & 0 deletions 2023/06/24/Linux/CentOS/CentOS服务器配置/index.html

Large diffs are not rendered by default.

1,293 changes: 1,293 additions & 0 deletions 2023/06/24/Linux/Linux入门/index.html

Large diffs are not rendered by default.

821 changes: 821 additions & 0 deletions 2023/06/24/Linux/Manjaro/Arch或Manjaro安装常用软件/index.html

Large diffs are not rendered by default.

738 changes: 738 additions & 0 deletions 2023/06/24/Linux/Ubuntu/Ubuntu安装Hadoop+Hive/index.html

Large diffs are not rendered by default.

727 changes: 727 additions & 0 deletions 2023/06/24/Linux/Ubuntu/Ubuntu服务器配置/index.html

Large diffs are not rendered by default.

981 changes: 981 additions & 0 deletions 2023/06/24/Window/Window开发环境配置/index.html

Large diffs are not rendered by default.

665 changes: 665 additions & 0 deletions 2023/06/24/配置备份/一些编辑器配置备份/index.html

Large diffs are not rendered by default.

825 changes: 825 additions & 0 deletions 2023/07/10/Hexo使用Stellar主题配置/index.html

Large diffs are not rendered by default.

750 changes: 750 additions & 0 deletions 2023/07/22/Linux/Debian/初次把玩Debian12/index.html

Large diffs are not rendered by default.

930 changes: 930 additions & 0 deletions 2023/10/17/视频编码格式/index.html

Large diffs are not rendered by default.

723 changes: 723 additions & 0 deletions 2023/11/03/VuePress2搭建网站/index.html

Large diffs are not rendered by default.

805 changes: 805 additions & 0 deletions 2024/01/12/Word选用字体格式参考/index.html

Large diffs are not rendered by default.

702 changes: 702 additions & 0 deletions 2024/02/15/使用Netlify免费部署云函数/index.html

Large diffs are not rendered by default.

669 changes: 669 additions & 0 deletions 2024/04/05/Linux/Debian/apt命令/index.html

Large diffs are not rendered by default.

859 changes: 859 additions & 0 deletions 2024/06/05/web3/index.html

Large diffs are not rendered by default.

671 changes: 671 additions & 0 deletions 2024/06/10/Arc770使用绘世启动器/index.html

Large diffs are not rendered by default.

757 changes: 757 additions & 0 deletions 2024/06/14/course/行政法/index.html

Large diffs are not rendered by default.

2,138 changes: 2,138 additions & 0 deletions 2024/06/15/course/中国近现代史纲要/index.html

Large diffs are not rendered by default.

1,409 changes: 1,409 additions & 0 deletions 2024/06/15/course/马克思主义基本原理概述/index.html

Large diffs are not rendered by default.

1,660 changes: 1,660 additions & 0 deletions 2024/07/05/course/社会学概论/index.html

Large diffs are not rendered by default.

2,053 changes: 2,053 additions & 0 deletions 2024/07/05/course/行政组织理论/index.html

Large diffs are not rendered by default.

621 changes: 621 additions & 0 deletions 404.html

Large diffs are not rendered by default.

745 changes: 745 additions & 0 deletions about/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2022/05/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2022/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2023/06/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2023/07/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2023/10/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2023/11/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2023/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2023/page/2/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2024/01/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2024/02/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2024/04/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2024/06/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2024/07/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/2024/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/page/2/index.html

Large diffs are not rendered by default.

590 changes: 590 additions & 0 deletions archives/page/3/index.html

Large diffs are not rendered by default.

396 changes: 396 additions & 0 deletions atom.xml

Large diffs are not rendered by default.

581 changes: 581 additions & 0 deletions author/jhlz/index.html

Large diffs are not rendered by default.

619 changes: 619 additions & 0 deletions categories/Linux/index.html

Large diffs are not rendered by default.

597 changes: 597 additions & 0 deletions categories/Windows/index.html

Large diffs are not rendered by default.

627 changes: 627 additions & 0 deletions categories/index.html

Large diffs are not rendered by default.

607 changes: 607 additions & 0 deletions categories/瞎折腾/index.html

Large diffs are not rendered by default.

597 changes: 597 additions & 0 deletions categories/配置备份/index.html

Large diffs are not rendered by default.

6,808 changes: 6,808 additions & 0 deletions css/main.css

Large diffs are not rendered by default.

775 changes: 775 additions & 0 deletions explore/index.html

Large diffs are not rendered by default.

634 changes: 634 additions & 0 deletions friends/index.html

Large diffs are not rendered by default.

Binary file added images/cover/工欲善其事.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc/20230708151823.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc/20230708152225.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc/20230708153347.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc/20231004150518.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc/20231108100948.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc/变量设置1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc/变量设置2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/avatar.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/bg.webp
Binary file not shown.
Binary file added images/icon/favicon.ico
Binary file not shown.
Binary file added images/snow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/wiki/dreams.webp
Binary file not shown.
Binary file added images/wiki/java/${}.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/wiki/java/20231023165352.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/wiki/rust/20230911165747.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
624 changes: 624 additions & 0 deletions index.html

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
// utils
const util = {

// https://github.com/jerryc127/hexo-theme-butterfly
diffDate: (d, more = false) => {
const dateNow = new Date()
const datePost = new Date(d)
const dateDiff = dateNow.getTime() - datePost.getTime()
const minute = 1000 * 60
const hour = minute * 60
const day = hour * 24

let result
if (more) {
const dayCount = dateDiff / day
const hourCount = dateDiff / hour
const minuteCount = dateDiff / minute

if (dayCount > 14) {
result = null
} else if (dayCount >= 1) {
result = parseInt(dayCount) + ' ' + ctx.date_suffix.day
} else if (hourCount >= 1) {
result = parseInt(hourCount) + ' ' + ctx.date_suffix.hour
} else if (minuteCount >= 1) {
result = parseInt(minuteCount) + ' ' + ctx.date_suffix.min
} else {
result = ctx.date_suffix.just
}
} else {
result = parseInt(dateDiff / day)
}
return result
},

copy: (id, msg) => {
const el = document.getElementById(id);
if (el) {
el.select();
document.execCommand("Copy");
if (msg && msg.length > 0) {
hud.toast(msg, 2500);
}
}
},

toggle: (id) => {
const el = document.getElementById(id);
if (el) {
el.classList.toggle("display");
}
},

scrollTop: () => {
window.scrollTo({top: 0, behavior: "smooth"});
},

scrollComment: () => {
document.getElementById('comments').scrollIntoView({behavior: "smooth"});
},
}

const hud = {
toast: (msg, duration) => {
const d = Number(isNaN(duration) ? 2000 : duration);
var el = document.createElement('div');
el.classList.add('toast');
el.classList.add('show');
el.innerHTML = msg;
document.body.appendChild(el);

setTimeout(function(){ document.body.removeChild(el) }, d);

},

}

// defines

const l_body = document.querySelector('.l_body');


const init = {
toc: () => {
utils.jq(() => {
const scrollOffset = 32;
var segs = [];
$("article.md-text :header").each(function (idx, node) {
segs.push(node);
});
function activeTOC() {
var scrollTop = $(this).scrollTop();
var topSeg = null;
for (var idx in segs) {
var seg = $(segs[idx]);
if (seg.offset().top > scrollTop + scrollOffset) {
continue;
}
if (!topSeg) {
topSeg = seg;
} else if (seg.offset().top >= topSeg.offset().top) {
topSeg = seg;
}
}
if (topSeg) {
$("#data-toc a.toc-link").removeClass("active");
var link = "#" + topSeg.attr("id");
if (link != '#undefined') {
const highlightItem = $('#data-toc a.toc-link[href="' + encodeURI(link) + '"]');
if (highlightItem.length > 0) {
highlightItem.addClass("active");
}
} else {
$('#data-toc a.toc-link:first').addClass("active");
}
}
}
function scrollTOC() {
const e0 = document.querySelector('#data-toc .toc');
const e1 = document.querySelector('#data-toc .toc a.toc-link.active');
if (e0 == null || e1 == null) {
return;
}
const offsetBottom = e1.getBoundingClientRect().bottom - e0.getBoundingClientRect().bottom + 100;
const offsetTop = e1.getBoundingClientRect().top - e0.getBoundingClientRect().top - 64;
if (offsetTop < 0) {
e0.scrollBy({top: offsetTop, behavior: "smooth"});
} else if (offsetBottom > 0) {
e0.scrollBy({top: offsetBottom, behavior: "smooth"});
}
}

var timeout = null;
window.addEventListener('scroll', function() {
activeTOC();
if(timeout !== null) clearTimeout(timeout);
timeout = setTimeout(function() {
scrollTOC();
}.bind(this), 50);
});
})
},
sidebar: () => {
utils.jq(() => {
$("#data-toc a.toc-link").click(function (e) {
sidebar.dismiss();
});
})
},
relativeDate: (selector) => {
selector.forEach(item => {
const $this = item
const timeVal = $this.getAttribute('datetime')
let relativeValue = util.diffDate(timeVal, true)
if (relativeValue) {
$this.innerText = relativeValue
}
})
},
/**
* Tabs tag listener (without twitter bootstrap).
*/
registerTabsTag: function () {
// Binding `nav-tabs` & `tab-content` by real time permalink changing.
document.querySelectorAll('.tabs .nav-tabs .tab').forEach(element => {
element.addEventListener('click', event => {
event.preventDefault();
// Prevent selected tab to select again.
if (element.classList.contains('active')) return;
// Add & Remove active class on `nav-tabs` & `tab-content`.
[...element.parentNode.children].forEach(target => {
target.classList.toggle('active', target === element);
});
// https://stackoverflow.com/questions/20306204/using-queryselector-with-ids-that-are-numbers
const tActive = document.getElementById(element.querySelector('a').getAttribute('href').replace('#', ''));
[...tActive.parentNode.children].forEach(target => {
target.classList.toggle('active', target === tActive);
});
// Trigger event
tActive.dispatchEvent(new Event('tabs:click', {
bubbles: true
}));
});
});

window.dispatchEvent(new Event('tabs:register'));
},

}


// init
init.toc()
init.sidebar()
init.relativeDate(document.querySelectorAll('#post-meta time'))
init.registerTabsTag()
32 changes: 32 additions & 0 deletions js/plugins/copycode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
window.codeElements.forEach((codeElement) => {
// 创建复制按钮
const codeCopyBtn = document.createElement('div');
codeCopyBtn.className = 'copy-btn';
codeCopyBtn.textContent = ctx.copycode.default_text;
codeElement.appendChild(codeCopyBtn);

// 添加点击事件监听
codeCopyBtn.addEventListener('click', async () => {
const codeToCopy = codeElement.querySelector('pre')?.innerText || '';
if (navigator.clipboard) {
try {
await navigator.clipboard.writeText(codeToCopy);
codeCopyBtn.textContent = ctx.copycode.success_text;
codeCopyBtn.classList.add('success');
hud.toast(ctx.copycode.toast, 2500);
} catch (error) {
codeCopyBtn.textContent = '未获得用户许可';
codeCopyBtn.classList.add('warning');
}
} else {
codeCopyBtn.textContent = '浏览器不支持/非HTTPS';
codeCopyBtn.classList.add('warning');
}

// 3秒后恢复默认文本
setTimeout(() => {
codeCopyBtn.textContent = ctx.copycode.default_text;
codeCopyBtn.classList.remove('success', 'warning');
}, 3000);
});
});
75 changes: 75 additions & 0 deletions js/search/algolia-search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
utils.jq(() => {
var $inputArea = $("input#search-input");
if ($inputArea.length === 0) {
return;
}

var $resultArea = $("#search-result");
var $searchWrapper = $("#search-wrapper");
var client = algoliasearch(window.searchConfig.appId, window.searchConfig.apiKey);
var index = client.initIndex(window.searchConfig.indexName);

function filterResults(hits, filterPath) {
if (!filterPath || filterPath === '/') return hits;
var regex = new RegExp(filterPath);
return hits.filter(hit => regex.test(hit.url));
}

function displayResults(hits) {
var $resultList = $("<ul>").addClass("search-result-list");
if (hits.length === 0) {
$searchWrapper.addClass('noresult');
} else {
$searchWrapper.removeClass('noresult');
hits.forEach(function(hit) {
var contentSnippet = hit._snippetResult.content.value;
var title = hit.hierarchy.lvl1 || 'Untitled';
var $item = $("<li>").html(`<a href="${hit.url}"><span class='search-result-title'>${title}</span><p class="search-result-content">${contentSnippet}</p></a>`);
$resultList.append($item);
});
}
$resultArea.html($resultList);
}

$inputArea.on("input", function() {
var query = $(this).val().trim();
var filterPath = $inputArea.data('filter');

if (query.length <= 0) {
$searchWrapper.attr('searching', 'false');
$resultArea.empty();
return;
}

$searchWrapper.attr('searching', 'true');

index.search(query, {
hitsPerPage: window.searchConfig.hitsPerPage,
attributesToHighlight: ['content'],
attributesToSnippet: ['content:30'],
highlightPreTag: '<span class="search-keyword">',
highlightPostTag: '</span>',
restrictSearchableAttributes: ['content']
}).then(function(responses) {
displayResults(filterResults(responses.hits, filterPath));
});
});

$inputArea.on("keydown", function(e) {
if (e.which == 13) {
e.preventDefault();
}
});

var observer = new MutationObserver(function(mutationsList) {
if (mutationsList.length === 1) {
if (mutationsList[0].addedNodes.length) {
$searchWrapper.removeClass('noresult');
} else if (mutationsList[0].removedNodes.length) {
$searchWrapper.addClass('noresult');
}
}
});

observer.observe($resultArea[0], { childList: true });
});
Loading

0 comments on commit 315cbed

Please sign in to comment.