');
+ $(this).find('figcaption div.level-left').append($(this).find('figcaption').find('span'));
+ $(this).find('figcaption div.level-right').append($(this).find('figcaption').find('a'));
+ } else {
+ if (clipboard || fold) {
+ $(this).prepend('
');
+ }
+ }
+ });
+
+ if (typeof ClipboardJS !== 'undefined' && clipboard) {
+ $('figure.highlight').each(function() {
+ const id = 'code-' + Date.now() + (Math.random() * 1000 | 0);
+ const button = '
';
+ $(this).attr('id', id);
+ $(this).find('figcaption div.level-right').append(button);
+ });
+ new ClipboardJS('.highlight .copy'); // eslint-disable-line no-new
+ }
+
+ if (fold) {
+ $('figure.highlight').each(function() {
+ $(this).addClass('foldable'); // add 'foldable' class as long as fold is enabled
+
+ if ($(this).find('figcaption').find('span').length > 0) {
+ const span = $(this).find('figcaption').find('span');
+ if (span[0].innerText.indexOf('>folded') > -1) {
+ span[0].innerText = span[0].innerText.replace('>folded', '');
+ $(this).find('figcaption div.level-left').prepend(createFoldButton('folded'));
+ toggleFold(this, true);
+ return;
+ }
+ }
+ $(this).find('figcaption div.level-left').prepend(createFoldButton(fold));
+ toggleFold(this, fold === 'folded');
+ });
+
+ $('figure.highlight figcaption .level-left').click(function() {
+ const $code = $(this).closest('figure.highlight');
+ toggleFold($code.eq(0), !$code.hasClass('folded'));
+ });
+ }
+ }
+
+ const $toc = $('#toc');
+ if ($toc.length > 0) {
+ const $mask = $('
');
+ $mask.attr('id', 'toc-mask');
+
+ $('body').append($mask);
+
+ function toggleToc() { // eslint-disable-line no-inner-declarations
+ $toc.toggleClass('is-active');
+ $mask.toggleClass('is-active');
+ }
+
+ $toc.on('click', toggleToc);
+ $mask.on('click', toggleToc);
+ $('.navbar-main .catalogue').on('click', toggleToc);
+ }
+}(jQuery, window.moment, window.ClipboardJS, window.IcarusThemeSettings));
diff --git a/js/pjax.js b/js/pjax.js
new file mode 100644
index 000000000..19d752ee3
--- /dev/null
+++ b/js/pjax.js
@@ -0,0 +1,42 @@
+(function() {
+ // eslint-disable-next-line no-unused-vars
+ let pjax;
+
+ function initPjax() {
+ try {
+ const Pjax = window.Pjax || function() {};
+ pjax = new Pjax({
+ selectors: [
+ '[data-pjax]',
+ '.pjax-reload',
+ 'head title',
+ '.columns',
+ '.navbar-start',
+ '.navbar-end',
+ '.searchbox link',
+ '.searchbox script',
+ '#back-to-top',
+ '#comments link',
+ '#comments script'
+ ],
+ cacheBust: false
+ });
+ } catch (e) {
+ console.warn('PJAX error: ' + e);
+ }
+ }
+
+ // // Listen for start of Pjax
+ // document.addEventListener('pjax:send', function() {
+ // return;
+ // // TODO pace start loading animation
+ // })
+
+ // // Listen for completion of Pjax
+ // document.addEventListener('pjax:complete', function() {
+ // return;
+ // // TODO pace stop loading animation
+ // })
+
+ document.addEventListener('DOMContentLoaded', () => initPjax());
+}());
diff --git a/js/toc.js b/js/toc.js
new file mode 100644
index 000000000..dcdde5e6c
--- /dev/null
+++ b/js/toc.js
@@ -0,0 +1,80 @@
+(function (window, document) {
+ function register($toc) {
+ const currentInView = new Set();
+ const headingToMenu = new Map();
+ const $menus = Array.from($toc.querySelectorAll('.menu-list > li > a'));
+
+ for (const $menu of $menus) {
+ const elementId = $menu.getAttribute('href').trim().slice(1);
+ const $heading = document.getElementById(elementId);
+ if ($heading) {
+ headingToMenu.set($heading, $menu);
+ }
+ }
+
+ const $headings = Array.from(headingToMenu.keys());
+
+ const callback = (entries) => {
+ for (const entry of entries) {
+ if (entry.isIntersecting) {
+ currentInView.add(entry.target);
+ } else {
+ currentInView.delete(entry.target);
+ }
+ }
+ let $heading;
+ if (currentInView.size) {
+ // heading is the first in-view heading
+ $heading = [...currentInView].sort(($el1, $el2) => $el1.offsetTop - $el2.offsetTop)[0];
+ } else if ($headings.length) {
+ // heading is the closest heading above the viewport top
+ $heading = $headings
+ .filter(($heading) => $heading.offsetTop < window.scrollY)
+ .sort(($el1, $el2) => $el2.offsetTop - $el1.offsetTop)[0];
+ }
+ if ($heading && headingToMenu.has($heading)) {
+ $menus.forEach(($menu) => $menu.classList.remove('is-active'));
+
+ const $menu = headingToMenu.get($heading);
+ $menu.classList.add('is-active');
+ let $menuList = $menu.parentElement.parentElement;
+ while (
+ $menuList.classList.contains('menu-list') &&
+ $menuList.parentElement.tagName.toLowerCase() === 'li'
+ ) {
+ $menuList.parentElement.children[0].classList.add('is-active');
+ $menuList = $menuList.parentElement.parentElement;
+ }
+ }
+ };
+ const observer = new IntersectionObserver(callback, { threshold: 0 });
+
+ for (const $heading of $headings) {
+ observer.observe($heading);
+ // smooth scroll to the heading
+ if (headingToMenu.has($heading)) {
+ const $menu = headingToMenu.get($heading);
+ $menu.setAttribute('data-href', $menu.getAttribute('href'));
+ $menu.setAttribute('href', 'javascript:;');
+ $menu.addEventListener('click', () => {
+ if (typeof $heading.scrollIntoView === 'function') {
+ $heading.scrollIntoView({ behavior: 'smooth' });
+ }
+ const anchor = $menu.getAttribute('data-href');
+ if (history.pushState) {
+ history.pushState(null, null, anchor);
+ } else {
+ location.hash = anchor;
+ }
+ });
+ $heading.style.scrollMargin = '1em';
+ }
+ }
+ }
+
+ if (typeof window.IntersectionObserver === 'undefined') {
+ return;
+ }
+
+ document.querySelectorAll('#toc').forEach(register);
+})(window, document);
diff --git a/links/index.html b/links/index.html
new file mode 100644
index 000000000..4f40a214e
--- /dev/null
+++ b/links/index.html
@@ -0,0 +1,179 @@
+
+
友情链接 - 枫林·浅羽·云梦 友情链接 You need to set install_url
to use ShareThis. Please set it in _config.yml
.
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 000000000..7425be982
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1 @@
+{"name":"枫林·浅羽·云梦","short_name":"御枫林下","start_url":"/index.html","theme_color":null,"background_color":null,"display":"standalone","icons":[{"src":"","sizes":"","type":null}]}
\ No newline at end of file
diff --git a/placeholder b/placeholder
deleted file mode 100644
index e69de29bb..000000000
diff --git a/posts/index.html b/posts/index.html
new file mode 100644
index 000000000..a2bad184b
--- /dev/null
+++ b/posts/index.html
@@ -0,0 +1,77 @@
+
+
test1111 - 枫林·浅羽·云梦 2024-12-06 发表2024-12-06 更新几秒读完 (大约1个字)
test1111 You need to set install_url
to use ShareThis. Please set it in _config.yml
.
\ No newline at end of file
diff --git a/posts/undefined/index.html b/posts/undefined/index.html
new file mode 100644
index 000000000..7e6239cb9
--- /dev/null
+++ b/posts/undefined/index.html
@@ -0,0 +1,89 @@
+
+
Hello World - 枫林·浅羽·云梦 2024-12-06 发表2024-12-06 更新1 分钟读完 (大约123个字)
Hello World 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 .
+
Quick Start Create a new post 1 $ hexo new "My New Post"
+
+
More info: Writing
+
Run server
+
+
More info: Server
+
Generate static files
+
+
More info: Generating
+
Deploy to remote sites
+
+
More info: Deployment
+
You need to set install_url
to use ShareThis. Please set it in _config.yml
.
\ No newline at end of file
diff --git a/robots.txt b/robots.txt
new file mode 100644
index 000000000..2aa49602a
--- /dev/null
+++ b/robots.txt
@@ -0,0 +1,6 @@
+# robots.txt generated at http://www.w3cschool.cn/
+User-agent: *
+Disallow:
+Crawl-delay: 120
+Disallow: /cgi-bin/
+Sitemap: https://agen233.top/sitemap.xml
diff --git a/tags/index.html b/tags/index.html
new file mode 100644
index 000000000..5fac3684c
--- /dev/null
+++ b/tags/index.html
@@ -0,0 +1,76 @@
+
+
标签 - 枫林·浅羽·云梦
\ No newline at end of file