hexo-theme-redefine-x 2.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug-chinese.yml +115 -0
- package/.github/ISSUE_TEMPLATE/bug-english.yml +106 -0
- package/.github/ISSUE_TEMPLATE/enhancement-chinese.yml +55 -0
- package/.github/ISSUE_TEMPLATE/enhancement-english.yml +55 -0
- package/.github/workflows/build-and-commit.yml +49 -0
- package/.github/workflows/npm-publish.yml +34 -0
- package/.github/workflows/stale-issues.yml +20 -0
- package/CHANGELOG_REDEFINE_X.md +236 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/CONTRIBUTING.md +51 -0
- package/DONATION.md +82 -0
- package/LICENSE +674 -0
- package/README.md +135 -0
- package/README_zh-CN.md +138 -0
- package/README_zh-TW.md +137 -0
- package/TODO.md +215 -0
- package/_config.yml +489 -0
- package/languages/en.yml +93 -0
- package/languages/es.yml +92 -0
- package/languages/fr.yml +92 -0
- package/languages/ja.yml +92 -0
- package/languages/zh-CN.yml +95 -0
- package/languages/zh-TW.yml +94 -0
- package/layout/404.ejs +1 -0
- package/layout/archive.ejs +1 -0
- package/layout/category.ejs +1 -0
- package/layout/components/comments/comment.ejs +22 -0
- package/layout/components/comments/giscus.ejs +42 -0
- package/layout/components/comments/gitalk.ejs +47 -0
- package/layout/components/comments/twikoo.ejs +50 -0
- package/layout/components/comments/waline.ejs +34 -0
- package/layout/components/footer/footer.ejs +99 -0
- package/layout/components/header/head.ejs +222 -0
- package/layout/components/header/navbar.ejs +163 -0
- package/layout/components/header/preloader.ejs +148 -0
- package/layout/components/header/progress-bar.ejs +12 -0
- package/layout/components/plugins/aplayer.ejs +3 -0
- package/layout/components/scripts.ejs +90 -0
- package/layout/components/sidebar/author.ejs +6 -0
- package/layout/components/sidebar/avatar.ejs +3 -0
- package/layout/components/sidebar/statistics.ejs +14 -0
- package/layout/components/swup.ejs +27 -0
- package/layout/index.ejs +1 -0
- package/layout/layout.ejs +13 -0
- package/layout/page.ejs +57 -0
- package/layout/pages/archive/archive.ejs +3 -0
- package/layout/pages/bookmarks/bookmarks.ejs +68 -0
- package/layout/pages/category/categories.ejs +11 -0
- package/layout/pages/category/category-detail.ejs +6 -0
- package/layout/pages/friends/friends-link.ejs +59 -0
- package/layout/pages/home/home-article.ejs +52 -0
- package/layout/pages/home/home-background.ejs +33 -0
- package/layout/pages/home/home-banner.ejs +234 -0
- package/layout/pages/home/home-content.ejs +62 -0
- package/layout/pages/home/home-sidebar.ejs +78 -0
- package/layout/pages/masonry/masonry.ejs +28 -0
- package/layout/pages/notfound/notfound.ejs +8 -0
- package/layout/pages/page-template.ejs +23 -0
- package/layout/pages/post/article-content.ejs +153 -0
- package/layout/pages/post/article-copyright.ejs +69 -0
- package/layout/pages/post/article-info.ejs +78 -0
- package/layout/pages/post/post-tools.ejs +17 -0
- package/layout/pages/post/toc.ejs +15 -0
- package/layout/pages/shuoshuo/essays.ejs +23 -0
- package/layout/pages/tag/tag-detail.ejs +6 -0
- package/layout/pages/tag/tags.ejs +24 -0
- package/layout/post.ejs +1 -0
- package/layout/tag.ejs +1 -0
- package/layout/tags.ejs +1 -0
- package/layout/utils/image-viewer.ejs +3 -0
- package/layout/utils/local-search.ejs +20 -0
- package/layout/utils/paginator.ejs +8 -0
- package/layout/utils/posts-list.ejs +28 -0
- package/layout/utils/side-tools.ejs +51 -0
- package/package.json +45 -0
- package/scripts/config-export.js +66 -0
- package/scripts/data-handle.js +37 -0
- package/scripts/events/404.js +16 -0
- package/scripts/events/welcome.js +141 -0
- package/scripts/filters/delete-mask-handle.js +27 -0
- package/scripts/filters/encrypt.js +202 -0
- package/scripts/filters/img-handle.js +9 -0
- package/scripts/filters/lazyload-handle.js +350 -0
- package/scripts/filters/lib/hbe.default.js +15 -0
- package/scripts/filters/link-handle.js +42 -0
- package/scripts/filters/stylus-handle.js +9 -0
- package/scripts/filters/table-handle.js +11 -0
- package/scripts/helpers/meta-helpers.js +38 -0
- package/scripts/helpers/page-helpers.js +153 -0
- package/scripts/helpers/recommendation-helpers.js +367 -0
- package/scripts/helpers/theme-helpers.js +251 -0
- package/scripts/helpers/waline-helpers.js +33 -0
- package/scripts/modules/btn.js +85 -0
- package/scripts/modules/btns.js +71 -0
- package/scripts/modules/folding.js +34 -0
- package/scripts/modules/note-large.js +72 -0
- package/scripts/modules/note.js +64 -0
- package/scripts/modules/tabs.js +99 -0
- package/source/assets/hbe.style.css +220 -0
- package/source/assets/odometer-theme-minimal.css +81 -0
- package/source/css/build/tailwind.css +2 -0
- package/source/css/common/animated.styl +71 -0
- package/source/css/common/basic.styl +239 -0
- package/source/css/common/codeblock/code-block.styl +158 -0
- package/source/css/common/codeblock/code-theme.styl +82 -0
- package/source/css/common/codeblock/highlight.styl +189 -0
- package/source/css/common/codeblock/hljs-themes/dark/a11y-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/agate.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/atom-one-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/github-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/monokai-sublime.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/night-owl.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/nord.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/tokyo-night-dark.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/dark/vs2015.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/light/atom-one-light.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/light/default.styl +18 -0
- package/source/css/common/codeblock/hljs-themes/light/github.styl +18 -0
- package/source/css/common/colors.styl +112 -0
- package/source/css/common/markdown.styl +337 -0
- package/source/css/common/redefine-theme.styl +65 -0
- package/source/css/common/theme.styl +72 -0
- package/source/css/common/variables.styl +145 -0
- package/source/css/layout/_modules/aplayer.styl +799 -0
- package/source/css/layout/_modules/buttons.styl +42 -0
- package/source/css/layout/_modules/folding.styl +180 -0
- package/source/css/layout/_modules/notes.styl +181 -0
- package/source/css/layout/_modules/tabs.styl +105 -0
- package/source/css/layout/_partials/404.styl +14 -0
- package/source/css/layout/_partials/archive-list.styl +49 -0
- package/source/css/layout/_partials/article-copyright-info.styl +27 -0
- package/source/css/layout/_partials/article-meta-info.styl +62 -0
- package/source/css/layout/_partials/comments/comment.styl +11 -0
- package/source/css/layout/_partials/comments/gitalk.styl +529 -0
- package/source/css/layout/_partials/comments/twikoo.styl +62 -0
- package/source/css/layout/_partials/comments/waline.styl +1151 -0
- package/source/css/layout/_partials/footer.styl +59 -0
- package/source/css/layout/_partials/home-banner.styl +48 -0
- package/source/css/layout/_partials/image-viewer.styl +37 -0
- package/source/css/layout/_partials/local-search.styl +137 -0
- package/source/css/layout/_partials/navbar.styl +309 -0
- package/source/css/layout/_partials/page-template.styl +147 -0
- package/source/css/layout/_partials/paginator.styl +65 -0
- package/source/css/layout/_partials/post-tools.styl +43 -0
- package/source/css/layout/_partials/progress-bar.styl +33 -0
- package/source/css/layout/_partials/side-tools.styl +87 -0
- package/source/css/layout/_partials/tagcloud.styl +136 -0
- package/source/css/layout/_partials/toc.styl +105 -0
- package/source/css/layout/animations.styl +42 -0
- package/source/css/layout/archive-content.styl +8 -0
- package/source/css/layout/article-content.styl +257 -0
- package/source/css/layout/bookmarks.styl +8 -0
- package/source/css/layout/category-content.styl +21 -0
- package/source/css/layout/category-list.styl +119 -0
- package/source/css/layout/home-content.styl +114 -0
- package/source/css/layout/home-sidebar.styl +126 -0
- package/source/css/layout/page.styl +144 -0
- package/source/css/layout/tag-content.styl +30 -0
- package/source/css/style.styl +26 -0
- package/source/css/tailwind.source.css +236 -0
- package/source/fontawesome/all.min.css +6 -0
- package/source/fontawesome/brands.min.css +6 -0
- package/source/fontawesome/duotone.min.css +6 -0
- package/source/fontawesome/fontawesome.min.css +6 -0
- package/source/fontawesome/light.min.css +6 -0
- package/source/fontawesome/regular.min.css +6 -0
- package/source/fontawesome/sharp-solid.min.css +6 -0
- package/source/fontawesome/solid.min.css +6 -0
- package/source/fontawesome/svg-with-js.min.css +6 -0
- package/source/fontawesome/thin.min.css +6 -0
- package/source/fontawesome/v4-font-face.min.css +6 -0
- package/source/fontawesome/v4-shims.min.css +6 -0
- package/source/fontawesome/v5-font-face.min.css +6 -0
- package/source/fonts/Chillax/Chillax-Variable.eot +0 -0
- package/source/fonts/Chillax/Chillax-Variable.ttf +0 -0
- package/source/fonts/Chillax/Chillax-Variable.woff +0 -0
- package/source/fonts/Chillax/Chillax-Variable.woff2 +0 -0
- package/source/fonts/Chillax/chillax.css +39 -0
- package/source/fonts/Geist/GeistVF.ttf +0 -0
- package/source/fonts/Geist/GeistVF.woff +0 -0
- package/source/fonts/Geist/GeistVF.woff2 +0 -0
- package/source/fonts/Geist/geist.css +16 -0
- package/source/fonts/GeistMono/GeistMonoVF.ttf +0 -0
- package/source/fonts/GeistMono/GeistMonoVF.woff +0 -0
- package/source/fonts/GeistMono/GeistMonoVF.woff2 +0 -0
- package/source/fonts/GeistMono/geist-mono.css +16 -0
- package/source/images/bookmark-placeholder.svg +9 -0
- package/source/images/loading.svg +5 -0
- package/source/images/redefine-avatar.svg +1 -0
- package/source/images/redefine-favicon.svg +1 -0
- package/source/images/redefine-logo.svg +1 -0
- package/source/images/redefine-logo.webp +0 -0
- package/source/images/redefine-og.webp +0 -0
- package/source/images/wallhaven-wqery6-dark.webp +0 -0
- package/source/images/wallhaven-wqery6-light.webp +0 -0
- package/source/js/build/layouts/bookmarkNav.js +2 -0
- package/source/js/build/layouts/bookmarkNav.js.map +1 -0
- package/source/js/build/layouts/categoryList.js +2 -0
- package/source/js/build/layouts/categoryList.js.map +1 -0
- package/source/js/build/layouts/essays.js +2 -0
- package/source/js/build/layouts/essays.js.map +1 -0
- package/source/js/build/layouts/lazyload.js +2 -0
- package/source/js/build/layouts/lazyload.js.map +1 -0
- package/source/js/build/layouts/navbarShrink.js +2 -0
- package/source/js/build/layouts/navbarShrink.js.map +1 -0
- package/source/js/build/layouts/toc.js +2 -0
- package/source/js/build/layouts/toc.js.map +1 -0
- package/source/js/build/libs/APlayer.min.js +2 -0
- package/source/js/build/libs/Swup.min.js +2 -0
- package/source/js/build/libs/SwupPreloadPlugin.min.js +1 -0
- package/source/js/build/libs/SwupProgressPlugin.min.js +1 -0
- package/source/js/build/libs/SwupScriptsPlugin.min.js +1 -0
- package/source/js/build/libs/SwupScrollPlugin.min.js +1 -0
- package/source/js/build/libs/SwupSlideTheme.min.js +1 -0
- package/source/js/build/libs/Typed.min.js +10 -0
- package/source/js/build/libs/anime.min.js +8 -0
- package/source/js/build/libs/mermaid.min.js +2314 -0
- package/source/js/build/libs/minimasonry.min.js +1 -0
- package/source/js/build/libs/moment-with-locales.min.js +2 -0
- package/source/js/build/libs/moment.min.js +2 -0
- package/source/js/build/libs/odometer.min.js +2 -0
- package/source/js/build/libs/pangu.min.js +9 -0
- package/source/js/build/libs/pjax.min.js +1 -0
- package/source/js/build/libs/waline.js +84 -0
- package/source/js/build/main.js +2 -0
- package/source/js/build/main.js.map +1 -0
- package/source/js/build/plugins/aplayer.js +2 -0
- package/source/js/build/plugins/aplayer.js.map +1 -0
- package/source/js/build/plugins/hbe.js +2 -0
- package/source/js/build/plugins/hbe.js.map +1 -0
- package/source/js/build/plugins/masonry.js +2 -0
- package/source/js/build/plugins/masonry.js.map +1 -0
- package/source/js/build/plugins/mermaid.js +2 -0
- package/source/js/build/plugins/mermaid.js.map +1 -0
- package/source/js/build/plugins/pangu.js +2 -0
- package/source/js/build/plugins/pangu.js.map +1 -0
- package/source/js/build/plugins/tabs.js +2 -0
- package/source/js/build/plugins/tabs.js.map +1 -0
- package/source/js/build/plugins/typed.js +2 -0
- package/source/js/build/plugins/typed.js.map +1 -0
- package/source/js/build/tools/codeBlock.js +2 -0
- package/source/js/build/tools/codeBlock.js.map +1 -0
- package/source/js/build/tools/imageViewer.js +2 -0
- package/source/js/build/tools/imageViewer.js.map +1 -0
- package/source/js/build/tools/lightDarkSwitch.js +2 -0
- package/source/js/build/tools/lightDarkSwitch.js.map +1 -0
- package/source/js/build/tools/localSearch.js +2 -0
- package/source/js/build/tools/localSearch.js.map +1 -0
- package/source/js/build/tools/runtime.js +2 -0
- package/source/js/build/tools/runtime.js.map +1 -0
- package/source/js/build/tools/scrollTopBottom.js +2 -0
- package/source/js/build/tools/scrollTopBottom.js.map +1 -0
- package/source/js/build/tools/tocToggle.js +2 -0
- package/source/js/build/tools/tocToggle.js.map +1 -0
- package/source/js/build/utils.js +2 -0
- package/source/js/build/utils.js.map +1 -0
- package/source/js/build.js +148 -0
- package/source/js/layouts/bookmarkNav.js +65 -0
- package/source/js/layouts/categoryList.js +53 -0
- package/source/js/layouts/essays.js +25 -0
- package/source/js/layouts/lazyload.js +199 -0
- package/source/js/layouts/navbarShrink.js +135 -0
- package/source/js/layouts/toc.js +115 -0
- package/source/js/libs/APlayer.min.js +2 -0
- package/source/js/libs/APlayer.min.js.map +1 -0
- package/source/js/libs/Swup.min.js +2 -0
- package/source/js/libs/Swup.min.js.map +1 -0
- package/source/js/libs/SwupPreloadPlugin.min.js +1 -0
- package/source/js/libs/SwupPreloadPlugin.min.js.map +1 -0
- package/source/js/libs/SwupProgressPlugin.min.js +1 -0
- package/source/js/libs/SwupScriptsPlugin.min.js +1 -0
- package/source/js/libs/SwupScrollPlugin.min.js +1 -0
- package/source/js/libs/SwupScrollPlugin.min.js.map +1 -0
- package/source/js/libs/SwupSlideTheme.min.js +1 -0
- package/source/js/libs/Typed.min.js +10 -0
- package/source/js/libs/anime.min.js +8 -0
- package/source/js/libs/mermaid.min.js +2314 -0
- package/source/js/libs/mermaid.min.js.map +7 -0
- package/source/js/libs/minimasonry.min.js +1 -0
- package/source/js/libs/moment-with-locales.min.js +2 -0
- package/source/js/libs/moment.min.js +2 -0
- package/source/js/libs/odometer.min.js +2 -0
- package/source/js/libs/pangu.min.js +9 -0
- package/source/js/libs/pjax.min.js +1 -0
- package/source/js/libs/waline.js +84 -0
- package/source/js/libs/waline.js.map +1 -0
- package/source/js/main.js +95 -0
- package/source/js/plugins/aplayer.js +33 -0
- package/source/js/plugins/hbe.js +350 -0
- package/source/js/plugins/masonry.js +115 -0
- package/source/js/plugins/mermaid.js +7 -0
- package/source/js/plugins/pangu.js +12 -0
- package/source/js/plugins/tabs.js +29 -0
- package/source/js/plugins/typed.js +62 -0
- package/source/js/tools/codeBlock.js +48 -0
- package/source/js/tools/imageViewer.js +194 -0
- package/source/js/tools/lightDarkSwitch.js +165 -0
- package/source/js/tools/localSearch.js +327 -0
- package/source/js/tools/runtime.js +28 -0
- package/source/js/tools/scrollTopBottom.js +34 -0
- package/source/js/tools/tocToggle.js +58 -0
- package/source/js/utils.js +383 -0
- package/source/webfonts/fa-brands-400.ttf +0 -0
- package/source/webfonts/fa-brands-400.woff2 +0 -0
- package/source/webfonts/fa-duotone-900.ttf +0 -0
- package/source/webfonts/fa-duotone-900.woff2 +0 -0
- package/source/webfonts/fa-light-300.ttf +0 -0
- package/source/webfonts/fa-light-300.woff2 +0 -0
- package/source/webfonts/fa-regular-400.ttf +0 -0
- package/source/webfonts/fa-regular-400.woff2 +0 -0
- package/source/webfonts/fa-sharp-solid-900.ttf +0 -0
- package/source/webfonts/fa-sharp-solid-900.woff2 +0 -0
- package/source/webfonts/fa-solid-900.ttf +0 -0
- package/source/webfonts/fa-solid-900.woff2 +0 -0
- package/source/webfonts/fa-thin-100.ttf +0 -0
- package/source/webfonts/fa-thin-100.woff2 +0 -0
- package/source/webfonts/fa-v4compatibility.ttf +0 -0
- package/source/webfonts/fa-v4compatibility.woff2 +0 -0
- package/vercel.json +7 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<meta charset="utf-8">
|
|
3
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
4
|
+
<meta name="keywords" content="<%= page.keywords || config.keywords || 'Hexo Theme Redefine' %>">
|
|
5
|
+
<% if (!theme.global.open_graph) { %>
|
|
6
|
+
<meta name="description" content="<%= page.description || config.description || 'Hexo Theme Redefine' %>">
|
|
7
|
+
<% }%>
|
|
8
|
+
<meta name="author" content="<%= theme.info.author || config.author || 'Redefine Team' %>">
|
|
9
|
+
|
|
10
|
+
<!-- Completely eliminate flash of wrong theme -->
|
|
11
|
+
<script>
|
|
12
|
+
(function() {
|
|
13
|
+
const THEME_KEY = "REDEFINE-X-STATUS";
|
|
14
|
+
const DARK = "dark", LIGHT = "light";
|
|
15
|
+
|
|
16
|
+
// Get preferred theme
|
|
17
|
+
function getTheme() {
|
|
18
|
+
try {
|
|
19
|
+
const saved = localStorage.getItem(THEME_KEY);
|
|
20
|
+
if (saved) {
|
|
21
|
+
const { isDark } = JSON.parse(saved);
|
|
22
|
+
return isDark ? DARK : LIGHT;
|
|
23
|
+
}
|
|
24
|
+
} catch (e) {}
|
|
25
|
+
|
|
26
|
+
return matchMedia("(prefers-color-scheme: dark)").matches ? DARK : LIGHT;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Apply theme to document
|
|
30
|
+
function applyTheme(theme) {
|
|
31
|
+
const isDark = theme === DARK;
|
|
32
|
+
const root = document.documentElement;
|
|
33
|
+
|
|
34
|
+
// Set classes for compatibility
|
|
35
|
+
root.classList.add(theme);
|
|
36
|
+
root.classList.remove(isDark ? LIGHT : DARK);
|
|
37
|
+
root.style.colorScheme = theme;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Initial application
|
|
41
|
+
const theme = getTheme();
|
|
42
|
+
applyTheme(theme);
|
|
43
|
+
|
|
44
|
+
// Listen for system preference changes
|
|
45
|
+
matchMedia("(prefers-color-scheme: dark)").addEventListener("change", ({ matches }) => {
|
|
46
|
+
// Only update if using system preference (no localStorage entry)
|
|
47
|
+
if (!localStorage.getItem(THEME_KEY)) {
|
|
48
|
+
applyTheme(matches ? DARK : LIGHT);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// Set body classes ASAP (before DOMContentLoaded)
|
|
53
|
+
(function() {
|
|
54
|
+
const addBodyClass = () => {
|
|
55
|
+
const b = document.body;
|
|
56
|
+
if (!b) return false;
|
|
57
|
+
b.classList.add(theme + "-mode");
|
|
58
|
+
return true;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// Try immediately
|
|
62
|
+
if (addBodyClass()) return;
|
|
63
|
+
|
|
64
|
+
// Observe until body exists
|
|
65
|
+
const mo = new MutationObserver(() => {
|
|
66
|
+
if (addBodyClass()) mo.disconnect();
|
|
67
|
+
});
|
|
68
|
+
mo.observe(document.documentElement, { childList: true, subtree: true });
|
|
69
|
+
})();
|
|
70
|
+
})();
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<!-- preconnect -->
|
|
74
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
75
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
76
|
+
|
|
77
|
+
<% if (theme.cdn.enable) { %>
|
|
78
|
+
<% const provider = theme.cdn.provider; %>
|
|
79
|
+
<% const cdnLinks = {
|
|
80
|
+
'jsdelivr': 'https://cdn.jsdelivr.net',
|
|
81
|
+
'unpkg': 'https://unpkg.com',
|
|
82
|
+
'aliyun': 'https://evan.beee.top',
|
|
83
|
+
'cdnjs': 'https://cdnjs.cloudflare.com',
|
|
84
|
+
'zstatic': 'https://s4.zstatic.net',
|
|
85
|
+
'npmmirror': 'https://registry.npmmirror.com',
|
|
86
|
+
}; %>
|
|
87
|
+
<% if (cdnLinks[provider]) { %>
|
|
88
|
+
<link rel="preconnect" href="<%= cdnLinks[provider] %>" crossorigin>
|
|
89
|
+
<% } %>
|
|
90
|
+
<% } %>
|
|
91
|
+
<!--- Seo Part-->
|
|
92
|
+
<%- generateMeta(theme, page) %>
|
|
93
|
+
<%- autoCanonical(config, page) %>
|
|
94
|
+
<meta name="robots" content="index,follow">
|
|
95
|
+
<meta name="googlebot" content="index,follow">
|
|
96
|
+
<meta name="revisit-after" content="1 days">
|
|
97
|
+
|
|
98
|
+
<% checkDeprecation(
|
|
99
|
+
theme.global.open_graph === true,
|
|
100
|
+
'open_graph',
|
|
101
|
+
"Using 'open_graph: true' is deprecated. Please update to the new format:\nglobal:\n open_graph:\n enable: true\n image: your_image_path\n description: your_description"
|
|
102
|
+
) %>
|
|
103
|
+
<% if (theme.global.open_graph?.enable || theme.global.open_graph === true) { %>
|
|
104
|
+
<%
|
|
105
|
+
let ogImage = page.og_image || theme.global.open_graph?.image;
|
|
106
|
+
let ogDescription = page.og_description || theme.global.open_graph?.description || page.description || config.description;
|
|
107
|
+
let author = page.author || config.author || 'Redefine Team';
|
|
108
|
+
%>
|
|
109
|
+
<%- open_graph({
|
|
110
|
+
image: ogImage,
|
|
111
|
+
author: author,
|
|
112
|
+
description: ogDescription,
|
|
113
|
+
twitter_card: 'summary',
|
|
114
|
+
twitter_image: ogImage,
|
|
115
|
+
}) %>
|
|
116
|
+
<% } %>
|
|
117
|
+
<% if (theme.global.google_analytics.enable) { %>
|
|
118
|
+
<!-- Google tag (gtag.js) -->
|
|
119
|
+
<script src="https://www.googletagmanager.com/gtag/js?id=<%= theme.global.google_analytics.id %>"></script>
|
|
120
|
+
<script>
|
|
121
|
+
window.dataLayer = window.dataLayer || [];
|
|
122
|
+
function gtag(){dataLayer.push(arguments);}
|
|
123
|
+
gtag('js', new Date());
|
|
124
|
+
|
|
125
|
+
gtag('config', '<%= theme.global.google_analytics.id %>');
|
|
126
|
+
</script>
|
|
127
|
+
<% } %>
|
|
128
|
+
<!--- Icon Part-->
|
|
129
|
+
<link rel="icon" type="image/png" href="<%= url_for(theme.defaults.favicon) %>" sizes="192x192">
|
|
130
|
+
<link rel="apple-touch-icon" sizes="180x180" href="<%= url_for(theme.defaults.favicon) %>">
|
|
131
|
+
<meta name="theme-color" content="<%= theme.colors.primary %>">
|
|
132
|
+
<%- favicon_tag(theme.defaults.favicon) %>
|
|
133
|
+
<!--- Page Info-->
|
|
134
|
+
<%
|
|
135
|
+
let title = page.title;
|
|
136
|
+
if (is_archive()) {
|
|
137
|
+
title = __('archive');
|
|
138
|
+
if (is_month()) {
|
|
139
|
+
title += ': ' + page.year + '/' + page.month;
|
|
140
|
+
} else if (is_year()) {
|
|
141
|
+
title += ': ' + page.year;
|
|
142
|
+
}
|
|
143
|
+
} else if (is_category()) {
|
|
144
|
+
title = __('category') + ': ' + page.category;
|
|
145
|
+
} else if (is_tag()) {
|
|
146
|
+
title = __('tag') + ': ' + page.tag;
|
|
147
|
+
} else {
|
|
148
|
+
title = __(page.title);
|
|
149
|
+
}
|
|
150
|
+
%>
|
|
151
|
+
<title>
|
|
152
|
+
<% if (title) { %>
|
|
153
|
+
<%= title %> | <%= theme.info.title || config.title || 'Redefine Theme' %>
|
|
154
|
+
<% } else { %>
|
|
155
|
+
<%= theme.info.title || config.title || 'Redefine Theme' %> - <%= theme.info.subtitle || config.subtitle || 'Redefine Your Hexo Journey.' %>
|
|
156
|
+
<% } %>
|
|
157
|
+
</title>
|
|
158
|
+
|
|
159
|
+
<%- renderCSS('fonts/Chillax/chillax.css') %>
|
|
160
|
+
|
|
161
|
+
<!--- Inject Part-->
|
|
162
|
+
<% if (theme.inject.enable == true) { %>
|
|
163
|
+
<% for (let i in theme.inject.head) { %>
|
|
164
|
+
<% if (theme.inject.head[i] !== null){ %>
|
|
165
|
+
<% if (theme.global.single_page == true) { %>
|
|
166
|
+
<%- theme.inject.head[i].replace("<script", "<script data-swup-reload-script") %>
|
|
167
|
+
<% } else { %>
|
|
168
|
+
<%- theme.inject.head[i] %>
|
|
169
|
+
<% } }%>
|
|
170
|
+
<% } }%>
|
|
171
|
+
|
|
172
|
+
<%- css('css/style') %>
|
|
173
|
+
|
|
174
|
+
<% if (theme.developer && theme.developer.enable) {%>
|
|
175
|
+
<%- css('css/build/tailwind.css') %>
|
|
176
|
+
<% } else {%>
|
|
177
|
+
<%- renderCSS('css/build/tailwind.css') %>
|
|
178
|
+
<% } %>
|
|
179
|
+
|
|
180
|
+
<%- renderCSS('fonts/GeistMono/geist-mono.css') %>
|
|
181
|
+
<%- renderCSS('fonts/Geist/geist.css') %>
|
|
182
|
+
<!--- Font Part-->
|
|
183
|
+
<% if (theme.home_banner.custom_font.enable) { %>
|
|
184
|
+
<link href="<%- theme.home_banner.custom_font.url %>" rel="stylesheet">
|
|
185
|
+
<% } %>
|
|
186
|
+
<% if (theme.articles.code_block.font.enable) { %>
|
|
187
|
+
<link href="<%- theme.articles.code_block.font.url %>" rel="stylesheet">
|
|
188
|
+
<% } %>
|
|
189
|
+
<% if (theme.global.fonts.chinese.enable) { %>
|
|
190
|
+
<link href="<%- theme.global.fonts.chinese.url %>" rel="stylesheet">
|
|
191
|
+
<% } %>
|
|
192
|
+
<% if (theme.global.fonts.english.enable) { %>
|
|
193
|
+
<link href="<%- theme.global.fonts.english.url %>" rel="stylesheet">
|
|
194
|
+
<% } %>
|
|
195
|
+
<% if (theme.global.fonts.title.enable) { %>
|
|
196
|
+
<link href="<%- theme.global.fonts.title.url %>" rel="stylesheet">
|
|
197
|
+
<% } %>
|
|
198
|
+
<% if (theme.global.preloader === true || theme.global.preloader.enable === true) { %>
|
|
199
|
+
<%- renderJS('libs/anime.min.js')%>
|
|
200
|
+
<% } %>
|
|
201
|
+
|
|
202
|
+
<%- export_config() %>
|
|
203
|
+
|
|
204
|
+
<!--- Fontawesome Part-->
|
|
205
|
+
<%- renderCSS('fontawesome/fontawesome.min.css') %>
|
|
206
|
+
<%- renderCSS('fontawesome/brands.min.css') %>
|
|
207
|
+
<%- renderCSS('fontawesome/solid.min.css') %>
|
|
208
|
+
<%- renderCSS('fontawesome/regular.min.css') %>
|
|
209
|
+
<% if (theme.fontawesome.thin == true) { %>
|
|
210
|
+
<%- renderCSS('fontawesome/thin.min.css') %>
|
|
211
|
+
<% } %>
|
|
212
|
+
<% if (theme.fontawesome.light == true) { %>
|
|
213
|
+
<%- renderCSS('fontawesome/light.min.css') %>
|
|
214
|
+
<% } %>
|
|
215
|
+
<% if (theme.fontawesome.duotone == true) { %>
|
|
216
|
+
<%- renderCSS('fontawesome/duotone.min.css') %>
|
|
217
|
+
<% } %>
|
|
218
|
+
<% if (theme.fontawesome.sharp_solid == true) { %>
|
|
219
|
+
<%- renderCSS('fontawesome/sharp-solid.min.css') %>
|
|
220
|
+
<% } %>
|
|
221
|
+
</head>
|
|
222
|
+
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<header class="navbar-container px-6 md:px-12">
|
|
2
|
+
<div class="navbar-content transition-navbar <%- (theme.home_banner.enable === true && is_home() && !page.prev) ? 'has-home-banner' : '' %>">
|
|
3
|
+
<div class="left">
|
|
4
|
+
<% if (theme.defaults.hasOwnProperty('logo') && theme.defaults.logo) { %>
|
|
5
|
+
<a class="logo-image h-8 w-8 sm:w-10 sm:h-10 mr-3" href="<%= config.root %>">
|
|
6
|
+
<%- image_tag(theme.defaults.logo, {
|
|
7
|
+
class: "w-full h-full rounded-xs"
|
|
8
|
+
}) %>
|
|
9
|
+
</a>
|
|
10
|
+
<% } %>
|
|
11
|
+
<a class="logo-title" href="<%= config.root %>">
|
|
12
|
+
<%- is_home() ? '<h1>' : '' %>
|
|
13
|
+
<%= theme.info.title || config.title || 'Redefine Theme' %>
|
|
14
|
+
<%- is_home() ? '</h1>' : '' %>
|
|
15
|
+
</a>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="right">
|
|
19
|
+
<!-- PC -->
|
|
20
|
+
<div class="desktop">
|
|
21
|
+
<ul class="navbar-list">
|
|
22
|
+
<% for (let i in theme.navbar.links) { %>
|
|
23
|
+
<% if (theme.navbar.links[i].path === 'none') {
|
|
24
|
+
} else { %>
|
|
25
|
+
<%
|
|
26
|
+
let link = theme.navbar.links[i];
|
|
27
|
+
let hasSubmenus = link.submenus;
|
|
28
|
+
let isActive = isHomePagePagination(page.path, link.path) || is_current(link.path);
|
|
29
|
+
let linkHref = hasSubmenus ? '#' : url_for(link.path);
|
|
30
|
+
let onClickAction = hasSubmenus ? 'onClick="return false;"' : '';
|
|
31
|
+
let iconClass = link.icon ? `<i class="${link.icon} fa-fw"></i>` : '';
|
|
32
|
+
let linkText = __(i.toLowerCase()).toUpperCase();
|
|
33
|
+
let dropdownIcon = hasSubmenus ? '<i class="fa-solid fa-chevron-down fa-fw"></i>' : '';
|
|
34
|
+
%>
|
|
35
|
+
|
|
36
|
+
<li class="navbar-item">
|
|
37
|
+
<!-- Menu -->
|
|
38
|
+
<a class="<%= hasSubmenus ? 'has-dropdown' : (isActive ? 'active' : '') %>"
|
|
39
|
+
href="<%= linkHref %>"
|
|
40
|
+
<%= onClickAction %>>
|
|
41
|
+
<%- iconClass %>
|
|
42
|
+
<%= linkText %>
|
|
43
|
+
<%- dropdownIcon %>
|
|
44
|
+
</a>
|
|
45
|
+
|
|
46
|
+
<!-- Submenu -->
|
|
47
|
+
<% if (hasSubmenus) { %>
|
|
48
|
+
<ul class="sub-menu">
|
|
49
|
+
<% for (var submenu in link.submenus) { %>
|
|
50
|
+
<li>
|
|
51
|
+
<a href="<%- url_for(link.submenus[submenu]) %>">
|
|
52
|
+
<%= __(submenu.toLowerCase()).toUpperCase() %>
|
|
53
|
+
</a>
|
|
54
|
+
</li>
|
|
55
|
+
<% } %>
|
|
56
|
+
</ul>
|
|
57
|
+
<% } %>
|
|
58
|
+
</li>
|
|
59
|
+
<% } } %>
|
|
60
|
+
<% if (theme.navbar.search.enable === true) { %>
|
|
61
|
+
<li class="navbar-item search search-popup-trigger">
|
|
62
|
+
<i class="fa-solid fa-magnifying-glass"></i>
|
|
63
|
+
</li>
|
|
64
|
+
<% } %>
|
|
65
|
+
</ul>
|
|
66
|
+
</div>
|
|
67
|
+
<!-- Mobile -->
|
|
68
|
+
<div class="mobile">
|
|
69
|
+
<% if (theme.navbar.search.enable === true) { %>
|
|
70
|
+
<div class="icon-item search search-popup-trigger"><i class="fa-solid fa-magnifying-glass"></i>
|
|
71
|
+
</div>
|
|
72
|
+
<% } %>
|
|
73
|
+
<div class="icon-item navbar-bar">
|
|
74
|
+
<div class="navbar-bar-middle"></div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<!-- Mobile sheet -->
|
|
81
|
+
<div class="navbar-drawer h-dvh w-full absolute top-0 left-0 bg-background-color flex flex-col justify-between">
|
|
82
|
+
<ul class="drawer-navbar-list flex flex-col px-4 justify-center items-start">
|
|
83
|
+
<% for (let i in theme.navbar.links) { %>
|
|
84
|
+
<% if (theme.navbar.links[i].path !== 'none') { %>
|
|
85
|
+
<%
|
|
86
|
+
// Function to check if link is active
|
|
87
|
+
function isActiveLink(pagePath, linkPath) {
|
|
88
|
+
return isHomePagePagination(pagePath, linkPath) || is_current(linkPath);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Variables for cleaner code
|
|
92
|
+
let linkData = theme.navbar.links[i];
|
|
93
|
+
let hasSubmenus = linkData.submenus;
|
|
94
|
+
let isActive = isActiveLink(page.path, linkData.path);
|
|
95
|
+
let iconClass = linkData.icon;
|
|
96
|
+
let linkText = __(i.toLowerCase()).toUpperCase();
|
|
97
|
+
let linkPath = hasSubmenus ? '#' : url_for(linkData.path);
|
|
98
|
+
let drawerNavbarItemClass = hasSubmenus ? 'drawer-navbar-item-sub' : 'drawer-navbar-item';
|
|
99
|
+
%>
|
|
100
|
+
|
|
101
|
+
<li class="<%= drawerNavbarItemClass %> text-base my-1.5 flex flex-col w-full">
|
|
102
|
+
<% if (hasSubmenus) {%>
|
|
103
|
+
<div class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary cursor-pointer text-2xl font-semibold group border-b border-border-color hover:border-primary w-full <%= isActive ? 'active' : '' %>"
|
|
104
|
+
navbar-data-toggle="submenu-<%= i %>"
|
|
105
|
+
>
|
|
106
|
+
<span>
|
|
107
|
+
<%= linkText %>
|
|
108
|
+
</span>
|
|
109
|
+
<% if (iconClass) { %>
|
|
110
|
+
<i class="fa-solid fa-chevron-right fa-sm fa-fw transition-all"></i>
|
|
111
|
+
<% } %>
|
|
112
|
+
</div>
|
|
113
|
+
<% } else { %>
|
|
114
|
+
<a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full <%= isActive ? 'active' : '' %>"
|
|
115
|
+
href="<%= linkPath %>"
|
|
116
|
+
>
|
|
117
|
+
<span>
|
|
118
|
+
<%= linkText %>
|
|
119
|
+
</span>
|
|
120
|
+
<% if (iconClass) { %>
|
|
121
|
+
<i class="<%= iconClass %> fa-sm fa-fw"></i>
|
|
122
|
+
<% } %>
|
|
123
|
+
</a>
|
|
124
|
+
<% } %>
|
|
125
|
+
|
|
126
|
+
<% if (hasSubmenus) { %>
|
|
127
|
+
<div class="flex-col items-start px-2 py-2 hidden" data-target="submenu-<%= i %>">
|
|
128
|
+
<% for (var submenu in linkData.submenus) { %>
|
|
129
|
+
<div class="drawer-navbar-item text-base flex flex-col justify-center items-start hover:underline active:underline hover:underline-offset-1 rounded-3xl">
|
|
130
|
+
<a class=" text-third-text-color text-xl"
|
|
131
|
+
href="<%- url_for(linkData.submenus[submenu]) %>"><%= __(submenu.toLowerCase()).toUpperCase() %></a>
|
|
132
|
+
</div>
|
|
133
|
+
<% } %>
|
|
134
|
+
</div>
|
|
135
|
+
<% } %>
|
|
136
|
+
</li>
|
|
137
|
+
<% } } %>
|
|
138
|
+
|
|
139
|
+
<%# Add sidebar links %>
|
|
140
|
+
<% if (theme.home.sidebar.links !== null && theme.home.sidebar.show_on_mobile !== false) {%>
|
|
141
|
+
<% for (let i in theme.home.sidebar.links) { %>
|
|
142
|
+
<% if (theme.navbar.links && theme.navbar.links.hasOwnProperty(i)) {
|
|
143
|
+
continue;
|
|
144
|
+
} %>
|
|
145
|
+
<li class="drawer-navbar-item text-base my-1.5 flex flex-col w-full">
|
|
146
|
+
<a class="py-1.5 px-2 flex flex-row items-center justify-between gap-1 hover:!text-primary active:!text-primary text-2xl font-semibold group border-b border-border-color hover:border-primary w-full active"
|
|
147
|
+
href="<%= url_for(theme.home.sidebar.links[i].path) %>"
|
|
148
|
+
>
|
|
149
|
+
<span><%= __(i) %></span>
|
|
150
|
+
<i class="<%= theme.home.sidebar.links[i].icon %> fa-sm fa-fw"></i>
|
|
151
|
+
</a>
|
|
152
|
+
</li>
|
|
153
|
+
<% } %>
|
|
154
|
+
<% } %>
|
|
155
|
+
</ul>
|
|
156
|
+
|
|
157
|
+
<%- partial("components/sidebar/statistics") %>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div class="window-mask"></div>
|
|
161
|
+
|
|
162
|
+
</header>
|
|
163
|
+
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
:root {
|
|
3
|
+
--preloader-background-color: #fff;
|
|
4
|
+
--preloader-text-color: #000;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@media (prefers-color-scheme: dark) {
|
|
8
|
+
:root {
|
|
9
|
+
--preloader-background-color: #202124;
|
|
10
|
+
--preloader-text-color: #fff;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (prefers-color-scheme: light) {
|
|
15
|
+
:root {
|
|
16
|
+
--preloader-background-color: #fff;
|
|
17
|
+
--preloader-text-color: #000;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@media (max-width: 600px) {
|
|
22
|
+
.ml13 {
|
|
23
|
+
font-size: 2.6rem !important; /* Adjust this value as needed */
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.preloader {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: 1rem; /* Tailwind 'gap-4' is 1rem */
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
position: fixed;
|
|
34
|
+
padding: 12px;
|
|
35
|
+
top: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
bottom: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
width: 100vw;
|
|
40
|
+
height: 100vh; /* 'h-screen' is 100% of the viewport height */
|
|
41
|
+
background-color: var(--preloader-background-color);
|
|
42
|
+
z-index: 1100; /* 'z-[1100]' sets the z-index */
|
|
43
|
+
transition: opacity 0.2s ease-in-out;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ml13 {
|
|
47
|
+
font-size: 3.2rem;
|
|
48
|
+
/* text-transform: uppercase; */
|
|
49
|
+
color: var(--preloader-text-color);
|
|
50
|
+
letter-spacing: -1px;
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
font-family: 'Chillax-Variable', sans-serif;
|
|
53
|
+
text-align: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ml13 .word {
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ml13 .letter {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
line-height: 1em;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
67
|
+
|
|
68
|
+
<div class="preloader">
|
|
69
|
+
<h2 class="ml13">
|
|
70
|
+
<%=
|
|
71
|
+
theme.global.preloader.custom_message || theme.info.title
|
|
72
|
+
%>
|
|
73
|
+
</h2>
|
|
74
|
+
<script>
|
|
75
|
+
var textWrapper = document.querySelector('.ml13');
|
|
76
|
+
// Split text into words
|
|
77
|
+
var words = textWrapper.textContent.trim().split(' ');
|
|
78
|
+
|
|
79
|
+
// Clear the existing content
|
|
80
|
+
textWrapper.innerHTML = '';
|
|
81
|
+
|
|
82
|
+
// Wrap each word and its letters in spans
|
|
83
|
+
words.forEach(function(word) {
|
|
84
|
+
var wordSpan = document.createElement('span');
|
|
85
|
+
wordSpan.classList.add('word');
|
|
86
|
+
wordSpan.innerHTML = word.replace(/\S/g, "<span class='letter'>$&</span>");
|
|
87
|
+
textWrapper.appendChild(wordSpan);
|
|
88
|
+
textWrapper.appendChild(document.createTextNode(' ')); // Add space between words
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
var animation = anime.timeline({ loop: true })
|
|
92
|
+
.add({
|
|
93
|
+
targets: '.ml13 .letter',
|
|
94
|
+
translateY: [20, 0],
|
|
95
|
+
translateZ: 0,
|
|
96
|
+
opacity: [0, 1],
|
|
97
|
+
filter: ['blur(5px)', 'blur(0px)'],
|
|
98
|
+
easing: "easeOutExpo",
|
|
99
|
+
duration: 1200,
|
|
100
|
+
delay: (el, i) => 300 + 20 * i,
|
|
101
|
+
})
|
|
102
|
+
.add({
|
|
103
|
+
targets: '.ml13 .letter',
|
|
104
|
+
translateY: [0, -20],
|
|
105
|
+
opacity: [1, 0],
|
|
106
|
+
filter: ['blur(0px)', 'blur(5px)'],
|
|
107
|
+
easing: "easeInExpo",
|
|
108
|
+
duration: 1000,
|
|
109
|
+
delay: (el, i) => 15 * i,
|
|
110
|
+
complete: function() {
|
|
111
|
+
hidePreloader();
|
|
112
|
+
}
|
|
113
|
+
}, '-=700');
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
let themeStatus = JSON.parse(localStorage.getItem('REDEFINE-X-STATUS'))?.isDark;
|
|
117
|
+
|
|
118
|
+
// If the theme status is not found in local storage, check the preferred color scheme
|
|
119
|
+
if (themeStatus === undefined || themeStatus === null) {
|
|
120
|
+
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
121
|
+
themeStatus = 'dark';
|
|
122
|
+
} else {
|
|
123
|
+
themeStatus = 'light';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Now you can use the themeStatus variable in your code
|
|
128
|
+
if (themeStatus) {
|
|
129
|
+
document.documentElement.style.setProperty('--preloader-background-color', '#202124');
|
|
130
|
+
document.documentElement.style.setProperty('--preloader-text-color', '#fff');
|
|
131
|
+
} else {
|
|
132
|
+
document.documentElement.style.setProperty('--preloader-background-color', '#fff');
|
|
133
|
+
document.documentElement.style.setProperty('--preloader-text-color', '#000');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
window.addEventListener('load', function () {
|
|
137
|
+
setTimeout(hidePreloader, 5000); // Call hidePreloader after 5000 milliseconds if not already called by animation
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
function hidePreloader() {
|
|
141
|
+
var preloader = document.querySelector('.preloader');
|
|
142
|
+
preloader.style.opacity = '0';
|
|
143
|
+
setTimeout(function () {
|
|
144
|
+
preloader.style.display = 'none';
|
|
145
|
+
}, 200);
|
|
146
|
+
}
|
|
147
|
+
</script>
|
|
148
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="progress-bar-container">
|
|
2
|
+
<% if (theme.global.scroll_progress.bar === true) { %>
|
|
3
|
+
<span class="scroll-progress-bar"></span>
|
|
4
|
+
<% } %>
|
|
5
|
+
|
|
6
|
+
<% if (theme.global.single_page === true) { %>
|
|
7
|
+
<span class="pjax-progress-bar"></span>
|
|
8
|
+
<!-- <span class="swup-progress-icon">-->
|
|
9
|
+
<!-- <i class="fa-solid fa-circle-notch fa-spin"></i>-->
|
|
10
|
+
<!-- </span>-->
|
|
11
|
+
<% } %>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<%- renderJS([
|
|
2
|
+
'tools/imageViewer.js',
|
|
3
|
+
'utils.js',
|
|
4
|
+
'main.js',
|
|
5
|
+
'layouts/navbarShrink.js',
|
|
6
|
+
'tools/scrollTopBottom.js',
|
|
7
|
+
'tools/lightDarkSwitch.js',
|
|
8
|
+
'layouts/categoryList.js'
|
|
9
|
+
],{
|
|
10
|
+
module: true
|
|
11
|
+
}) %>
|
|
12
|
+
|
|
13
|
+
<% if (theme.navbar.search.enable) { %>
|
|
14
|
+
<%- renderJS('tools/localSearch.js', {
|
|
15
|
+
module: true
|
|
16
|
+
}) %>
|
|
17
|
+
<% } %>
|
|
18
|
+
|
|
19
|
+
<% if (theme.articles.code_block.copy) { %>
|
|
20
|
+
<%- renderJS('tools/codeBlock.js', {
|
|
21
|
+
module: true
|
|
22
|
+
}) %>
|
|
23
|
+
<% } %>
|
|
24
|
+
|
|
25
|
+
<% if (theme.articles.lazyload) { %>
|
|
26
|
+
<%- renderJS('layouts/lazyload.js', {
|
|
27
|
+
module: true
|
|
28
|
+
}) %>
|
|
29
|
+
<% } %>
|
|
30
|
+
|
|
31
|
+
<% if (theme.footer.runtime) { %>
|
|
32
|
+
<%- renderJS('tools/runtime.js') %>
|
|
33
|
+
<%- renderJS('libs/odometer.min.js') %>
|
|
34
|
+
<%- renderCSS('assets/odometer-theme-minimal.css') %>
|
|
35
|
+
<% } %>
|
|
36
|
+
|
|
37
|
+
<% if (theme.home_banner.subtitle.length !== 0) { %>
|
|
38
|
+
<%- renderJS('libs/Typed.min.js') %>
|
|
39
|
+
<%- renderJS('plugins/typed.js', {
|
|
40
|
+
module: true
|
|
41
|
+
}) %>
|
|
42
|
+
<% } %>
|
|
43
|
+
|
|
44
|
+
<% if (theme.plugins.mermaid.enable) { %>
|
|
45
|
+
<% if (theme.plugins.mermaid.version === '11.4.1') { %>
|
|
46
|
+
<%- renderJS('libs/mermaid.min.js') %>
|
|
47
|
+
<% } else { %>
|
|
48
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@<%= theme.plugins.mermaid.version %>/dist/mermaid.min.js"></script>
|
|
49
|
+
<% } %>
|
|
50
|
+
<%- renderJS('plugins/mermaid.js') %>
|
|
51
|
+
<% } %>
|
|
52
|
+
|
|
53
|
+
<% if (theme.masonry || theme.photos || theme.gallery) { %>
|
|
54
|
+
<%- renderJS('libs/minimasonry.min.js') %>
|
|
55
|
+
<%- renderJS('plugins/masonry.js', {
|
|
56
|
+
module: true
|
|
57
|
+
}) %>
|
|
58
|
+
<% } %>
|
|
59
|
+
|
|
60
|
+
<% if (theme.global.preloader === false || theme.global.preloader.enable === false) { %>
|
|
61
|
+
<%- renderJS('libs/anime.min.js')%>
|
|
62
|
+
<% } %>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<% if (theme.articles.toc.enable) { %>
|
|
66
|
+
<%- renderJS([
|
|
67
|
+
'tools/tocToggle.js',
|
|
68
|
+
'layouts/toc.js',
|
|
69
|
+
'plugins/tabs.js'
|
|
70
|
+
], {
|
|
71
|
+
module: true,
|
|
72
|
+
swupReload: true
|
|
73
|
+
}) %>
|
|
74
|
+
<% } %>
|
|
75
|
+
|
|
76
|
+
<%- renderJS('libs/moment-with-locales.min.js', { swupReload: true }) %>
|
|
77
|
+
<%- renderJS('layouts/essays.js', { swupReload: true, module: true }) %>
|
|
78
|
+
|
|
79
|
+
<% if (theme.articles.pangu_js) { %>
|
|
80
|
+
<%- renderJS([
|
|
81
|
+
'libs/pangu.min.js',
|
|
82
|
+
'plugins/pangu.js'
|
|
83
|
+
]) %>
|
|
84
|
+
<% } %>
|
|
85
|
+
|
|
86
|
+
<% if (theme.bookmarks && theme.bookmarks.length !== 0) { %>
|
|
87
|
+
<%- renderJS('layouts/bookmarkNav.js', {
|
|
88
|
+
module: true
|
|
89
|
+
}) %>
|
|
90
|
+
<% } %>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<div class="author flex flex-col justify-center my-2.5 mx-0">
|
|
2
|
+
<div class="name"><%= theme.info.author || config.author %></div>
|
|
3
|
+
<% if (theme.hasOwnProperty('articles') && theme.articles.author_label.enable === true) { %>
|
|
4
|
+
<div class="label"><%- getAuthorLabel(site.posts.length, theme.articles.author_label.auto, theme.articles.author_label.list) %></div>
|
|
5
|
+
<% } %>
|
|
6
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="statistics flex justify-around my-2.5">
|
|
2
|
+
<a class="item tag-count-item flex flex-col justify-center items-center w-20" href="<%- url_for(config.tag_dir) %>">
|
|
3
|
+
<div class="number text-2xl sm:text-xl text-second-text-color font-semibold"><%= site.tags.length %></div>
|
|
4
|
+
<div class="label text-third-text-color text-sm"><%- __('tags') %></div>
|
|
5
|
+
</a>
|
|
6
|
+
<a class="item tag-count-item flex flex-col justify-center items-center w-20" href="<%- url_for(config.category_dir) %>">
|
|
7
|
+
<div class="number text-2xl sm:text-xl text-second-text-color font-semibold"><%= site.categories.length %></div>
|
|
8
|
+
<div class="label text-third-text-color text-sm"><%- __('categories') %></div>
|
|
9
|
+
</a>
|
|
10
|
+
<a class="item tag-count-item flex flex-col justify-center items-center w-20" href="<%- url_for(config.archive_dir) %>">
|
|
11
|
+
<div class="number text-2xl sm:text-xl text-second-text-color font-semibold"><%= site.posts.length %></div>
|
|
12
|
+
<div class="label text-third-text-color text-sm"><%- __('posts') %></div>
|
|
13
|
+
</a>
|
|
14
|
+
</div>
|