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,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Single Button module for Hexo theme Redefine
|
|
5
|
+
* Creates standalone button elements
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a single button
|
|
10
|
+
*
|
|
11
|
+
* @param {Array} args - Button arguments (class, text, url, icon)
|
|
12
|
+
* @returns {String} HTML for a single button
|
|
13
|
+
*/
|
|
14
|
+
function postBtn(args) {
|
|
15
|
+
// Parse arguments - support both '::' and ',' as separators
|
|
16
|
+
let parsedArgs;
|
|
17
|
+
const argsStr = args.join(" ");
|
|
18
|
+
|
|
19
|
+
if (argsStr.includes("::")) {
|
|
20
|
+
parsedArgs = argsStr.split("::");
|
|
21
|
+
} else {
|
|
22
|
+
parsedArgs = argsStr.split(",");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Default values
|
|
26
|
+
let cls = "";
|
|
27
|
+
let text = "";
|
|
28
|
+
let url = "";
|
|
29
|
+
let icon = "";
|
|
30
|
+
|
|
31
|
+
// Parse arguments based on count
|
|
32
|
+
switch(parsedArgs.length) {
|
|
33
|
+
case 4: // class, text, url, icon
|
|
34
|
+
cls = parsedArgs[0];
|
|
35
|
+
text = parsedArgs[1];
|
|
36
|
+
url = parsedArgs[2];
|
|
37
|
+
icon = parsedArgs[3];
|
|
38
|
+
break;
|
|
39
|
+
|
|
40
|
+
case 3:
|
|
41
|
+
// Check if third arg is an icon (contains fa-)
|
|
42
|
+
if (parsedArgs[2].includes("fa-")) {
|
|
43
|
+
// text, url, icon
|
|
44
|
+
text = parsedArgs[0];
|
|
45
|
+
url = parsedArgs[1];
|
|
46
|
+
icon = parsedArgs[2];
|
|
47
|
+
} else {
|
|
48
|
+
// class, text, url
|
|
49
|
+
cls = parsedArgs[0];
|
|
50
|
+
text = parsedArgs[1];
|
|
51
|
+
url = parsedArgs[2];
|
|
52
|
+
}
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 2: // text, url
|
|
56
|
+
text = parsedArgs[0];
|
|
57
|
+
url = parsedArgs[1];
|
|
58
|
+
break;
|
|
59
|
+
|
|
60
|
+
case 1: // text only
|
|
61
|
+
text = parsedArgs[0];
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Clean up values
|
|
66
|
+
cls = cls.trim();
|
|
67
|
+
icon = icon.trim();
|
|
68
|
+
text = text.trim();
|
|
69
|
+
url = url.trim();
|
|
70
|
+
|
|
71
|
+
// Build attributes
|
|
72
|
+
const hrefAttr = url ? `href='${url}'` : '';
|
|
73
|
+
const classAttr = cls ? `${cls}` : '';
|
|
74
|
+
|
|
75
|
+
// Build button HTML
|
|
76
|
+
if (icon) {
|
|
77
|
+
return `<a class="button ${classAttr}" ${hrefAttr} title='${text}'><i class='${icon}'></i> ${text}</a>`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return `<a class="button ${classAttr}" ${hrefAttr} title='${text}'>${text}</a>`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Register Hexo tags
|
|
84
|
+
hexo.extend.tag.register("btn", postBtn);
|
|
85
|
+
hexo.extend.tag.register("button", postBtn);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Buttons module for Hexo theme Redefine
|
|
5
|
+
* Creates button containers and button elements
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a buttons container
|
|
10
|
+
*
|
|
11
|
+
* @param {Array} args - Class names for the container
|
|
12
|
+
* @param {String} content - Button content (cells)
|
|
13
|
+
* @returns {String} HTML for the buttons container
|
|
14
|
+
*/
|
|
15
|
+
function postBtns(args, content) {
|
|
16
|
+
const classes = args.join(' ');
|
|
17
|
+
return `<div class="btns ${classes}">
|
|
18
|
+
${content}
|
|
19
|
+
</div>`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Creates a single button cell
|
|
24
|
+
*
|
|
25
|
+
* @param {Array} args - Button properties (text, url, icon/image)
|
|
26
|
+
* @returns {String} HTML for a single button
|
|
27
|
+
*/
|
|
28
|
+
function postCell(args, content) {
|
|
29
|
+
// Parse arguments - support both '::' and ',' as separators
|
|
30
|
+
let parsedArgs;
|
|
31
|
+
const argsStr = args.join(' ');
|
|
32
|
+
|
|
33
|
+
if (argsStr.includes('::')) {
|
|
34
|
+
parsedArgs = argsStr.split('::');
|
|
35
|
+
} else {
|
|
36
|
+
parsedArgs = argsStr.split(',');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Extract button properties
|
|
40
|
+
const text = (parsedArgs[0] || '').trim();
|
|
41
|
+
const url = (parsedArgs[1] || '').trim();
|
|
42
|
+
const buttonClasses = ['button'];
|
|
43
|
+
|
|
44
|
+
// Handle URL
|
|
45
|
+
const hrefAttr = url ? `href='${url}'` : '';
|
|
46
|
+
|
|
47
|
+
// Handle icon or image
|
|
48
|
+
let iconOrImage = '';
|
|
49
|
+
|
|
50
|
+
if (parsedArgs.length > 2) {
|
|
51
|
+
const iconOrImgSrc = parsedArgs[2].trim();
|
|
52
|
+
|
|
53
|
+
// Check if it's a FontAwesome icon
|
|
54
|
+
if (iconOrImgSrc.includes('fa-')) {
|
|
55
|
+
iconOrImage = `<i class='${iconOrImgSrc}'></i> `;
|
|
56
|
+
} else {
|
|
57
|
+
// Use specified image or default
|
|
58
|
+
const imgSrc = iconOrImgSrc || hexo.theme.config.default.image;
|
|
59
|
+
iconOrImage = `<img src='${imgSrc}'>`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Return complete button HTML
|
|
64
|
+
return `<a class="${buttonClasses.join(' ')}" ${hrefAttr} title='${text}'>${iconOrImage}${text}</a>`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Register Hexo tags
|
|
68
|
+
hexo.extend.tag.register('btns', postBtns, {ends: true});
|
|
69
|
+
hexo.extend.tag.register('buttons', postBtns, {ends: true});
|
|
70
|
+
hexo.extend.tag.register('cell', postCell);
|
|
71
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const postFolding = (args, content) => {
|
|
4
|
+
// Parse arguments - support both '::' and ',' as delimiters
|
|
5
|
+
const delimiter = args.join(' ').includes('::') ? '::' : ',';
|
|
6
|
+
const [style, title = ''] = args.join(' ').split(delimiter).map(arg => arg.trim());
|
|
7
|
+
|
|
8
|
+
// Render markdown content
|
|
9
|
+
const renderedContent = hexo.render.renderSync({
|
|
10
|
+
text: content,
|
|
11
|
+
engine: 'markdown'
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// Replace heading tags with paragraph tags that have heading classes
|
|
15
|
+
const processedContent = renderedContent.replace(
|
|
16
|
+
/<(h[1-6])>/g,
|
|
17
|
+
(_, tag) => `<p class='${tag}'>`
|
|
18
|
+
).replace(
|
|
19
|
+
/<\/(h[1-6])>/g,
|
|
20
|
+
() => '</p>'
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// Build the HTML with or without custom style
|
|
24
|
+
const styleAttr = style ? ` class="${style}"` : '';
|
|
25
|
+
|
|
26
|
+
return `<details${styleAttr} data-header-exclude>
|
|
27
|
+
<summary><i class="fa-solid fa-chevron-right"></i>${title} </summary>
|
|
28
|
+
<div class='content markdown-body'>
|
|
29
|
+
${processedContent}
|
|
30
|
+
</div>
|
|
31
|
+
</details>`;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
hexo.extend.tag.register('folding', postFolding, {ends: true});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
function postNoteLarge(args, content) {
|
|
2
|
+
if (args.length === 0) {
|
|
3
|
+
args.push("default", "Warning");
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
let icon = "";
|
|
7
|
+
let title = "";
|
|
8
|
+
|
|
9
|
+
// Extract color from args[0]
|
|
10
|
+
const color = args[0];
|
|
11
|
+
|
|
12
|
+
// Process all arguments after color to build icon and title
|
|
13
|
+
const remainingArgs = args.slice(1);
|
|
14
|
+
|
|
15
|
+
// Find all fa- prefixed arguments
|
|
16
|
+
const faArgs = [];
|
|
17
|
+
const faIndices = [];
|
|
18
|
+
|
|
19
|
+
remainingArgs.forEach((arg, index) => {
|
|
20
|
+
if (arg && arg.startsWith('fa-')) {
|
|
21
|
+
faArgs.push(arg);
|
|
22
|
+
faIndices.push(index);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Handle FontAwesome icons based on how many fa- args we found
|
|
27
|
+
if (faArgs.length === 2) {
|
|
28
|
+
// Two fa- args: first is style, second is icon
|
|
29
|
+
icon = `<i class="notel-icon ${faArgs[0]} ${faArgs[1]}"></i>`;
|
|
30
|
+
|
|
31
|
+
// Remove both FA args (remove higher index first to preserve positions)
|
|
32
|
+
remainingArgs.splice(faIndices[1], 1);
|
|
33
|
+
remainingArgs.splice(faIndices[0], 1);
|
|
34
|
+
} else if (faArgs.length === 1) {
|
|
35
|
+
// One fa- arg: it's the icon, default to fa-solid
|
|
36
|
+
icon = `<i class="notel-icon fa-solid ${faArgs[0]}"></i>`;
|
|
37
|
+
|
|
38
|
+
// Remove the FA arg
|
|
39
|
+
remainingArgs.splice(faIndices[0], 1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Join all remaining args as the title
|
|
43
|
+
title = remainingArgs.join(" ");
|
|
44
|
+
|
|
45
|
+
// If no title was provided, set a default
|
|
46
|
+
if (!title) {
|
|
47
|
+
title = "Note";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return `
|
|
51
|
+
<div class="note-large ${color}">
|
|
52
|
+
<div class="notel-title rounded-t-lg p-3 font-bold text-lg flex flex-row gap-2 items-center">
|
|
53
|
+
${icon}${hexo.render.renderSync({
|
|
54
|
+
text: title,
|
|
55
|
+
engine: "markdown",
|
|
56
|
+
})}
|
|
57
|
+
</div>
|
|
58
|
+
<div class="notel-content markdown-body">
|
|
59
|
+
${hexo.render.renderSync({
|
|
60
|
+
text: content,
|
|
61
|
+
engine: "markdown",
|
|
62
|
+
})}
|
|
63
|
+
</div>
|
|
64
|
+
</div>`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
hexo.extend.tag.register("noteL", postNoteLarge, { ends: true });
|
|
68
|
+
hexo.extend.tag.register("notel", postNoteLarge, { ends: true });
|
|
69
|
+
hexo.extend.tag.register("notelarge", postNoteLarge, { ends: true });
|
|
70
|
+
hexo.extend.tag.register("notel-large", postNoteLarge, { ends: true });
|
|
71
|
+
hexo.extend.tag.register("notes-large", postNoteLarge, { ends: true });
|
|
72
|
+
hexo.extend.tag.register("subwarning", postNoteLarge, { ends: true });
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function postNote(args, content) {
|
|
2
|
+
if (args.length === 0) {
|
|
3
|
+
args.push("default");
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
let icon = "";
|
|
7
|
+
|
|
8
|
+
// Extract style classes from all args except potential icon classes
|
|
9
|
+
let classes = [];
|
|
10
|
+
const remainingArgs = [...args]; // Copy args array
|
|
11
|
+
|
|
12
|
+
// Add first arg as main class
|
|
13
|
+
if (remainingArgs.length > 0) {
|
|
14
|
+
classes.push(remainingArgs[0]);
|
|
15
|
+
remainingArgs.shift();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Find all fa- prefixed arguments
|
|
19
|
+
const faArgs = [];
|
|
20
|
+
const faIndices = [];
|
|
21
|
+
|
|
22
|
+
remainingArgs.forEach((arg, index) => {
|
|
23
|
+
if (arg && arg.startsWith('fa-')) {
|
|
24
|
+
faArgs.push(arg);
|
|
25
|
+
faIndices.push(index);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// Handle FontAwesome icons based on how many fa- args we found
|
|
30
|
+
if (faArgs.length === 2) {
|
|
31
|
+
// Two fa- args: first is style, second is icon
|
|
32
|
+
icon = `<i class="note-icon ${faArgs[0]} ${faArgs[1]}"></i>`;
|
|
33
|
+
|
|
34
|
+
// Remove both FA args (remove higher index first to preserve positions)
|
|
35
|
+
remainingArgs.splice(faIndices[1], 1);
|
|
36
|
+
remainingArgs.splice(faIndices[0], 1);
|
|
37
|
+
} else if (faArgs.length === 1) {
|
|
38
|
+
// One fa- arg: it's the icon, default to fa-solid
|
|
39
|
+
icon = `<i class="note-icon fa-solid ${faArgs[0]}"></i>`;
|
|
40
|
+
|
|
41
|
+
// Remove the FA arg
|
|
42
|
+
remainingArgs.splice(faIndices[0], 1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Add any remaining args as additional classes
|
|
46
|
+
classes = classes.concat(remainingArgs);
|
|
47
|
+
|
|
48
|
+
// Add icon-padding class if icon exists
|
|
49
|
+
if (icon) {
|
|
50
|
+
classes.push("icon-padding");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return `
|
|
54
|
+
<div class="note p-4 mb-4 rounded-small markdown-body ${classes.join(" ")}">
|
|
55
|
+
${icon}${hexo.render.renderSync({
|
|
56
|
+
text: content,
|
|
57
|
+
engine: "markdown",
|
|
58
|
+
})}
|
|
59
|
+
</div>`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
hexo.extend.tag.register("note", postNote, { ends: true });
|
|
63
|
+
hexo.extend.tag.register("notes", postNote, { ends: true });
|
|
64
|
+
hexo.extend.tag.register("subnote", postNote, { ends: true });
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module: Tabs
|
|
3
|
+
* hexo-theme-redefine
|
|
4
|
+
* By Evan
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
const TAB_BLOCK_REGEX = /<!--\s*tab (.*?)\s*-->\n([\w\W\s\S]*?)<!--\s*endtab\s*-->/g;
|
|
10
|
+
const APLAYER_TAG_REGEX = /\<div.*class=\"aplayer aplayer-tag-marker\"(.|\n)*\<\/script\>/g;
|
|
11
|
+
const FANCYBOX_TAG_REGEX = /\<div.*galleryFlag(.|\n)*\<\/span\>\<\/div\>\<\/div\>/g;
|
|
12
|
+
|
|
13
|
+
function parseArgs(args) {
|
|
14
|
+
if (/::/g.test(args)) {
|
|
15
|
+
return args.join(' ').split('::');
|
|
16
|
+
} else {
|
|
17
|
+
return args.join(' ').split(',');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function extractMatches(content) {
|
|
22
|
+
const matches = [];
|
|
23
|
+
let match;
|
|
24
|
+
|
|
25
|
+
while ((match = TAB_BLOCK_REGEX.exec(content)) !== null) {
|
|
26
|
+
matches.push(match[1]);
|
|
27
|
+
matches.push(match[2]);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return matches;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function processAplayerTag(content) {
|
|
34
|
+
let aplayerTag = 0;
|
|
35
|
+
|
|
36
|
+
if (/class="aplayer aplayer-tag-marker"/g.test(content)) {
|
|
37
|
+
aplayerTag = APLAYER_TAG_REGEX.exec(content)[0];
|
|
38
|
+
content = content.replace(APLAYER_TAG_REGEX, "@aplayerTag@");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return { content, aplayerTag };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function processFancyboxTag(content) {
|
|
45
|
+
let fancyboxTag = 0;
|
|
46
|
+
|
|
47
|
+
if (/galleryFlag/g.test(content)) {
|
|
48
|
+
fancyboxTag = FANCYBOX_TAG_REGEX.exec(content)[0];
|
|
49
|
+
content = content.replace(FANCYBOX_TAG_REGEX, "@fancyboxTag@");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return { content, fancyboxTag };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function buildTabNavAndContent(matches, tabName, tabActive) {
|
|
56
|
+
let tabNav = '';
|
|
57
|
+
let tabContent = '';
|
|
58
|
+
|
|
59
|
+
for (let i = 0; i < matches.length; i += 2) {
|
|
60
|
+
const tabParameters = matches[i].split('@');
|
|
61
|
+
const postContent = matches[i + 1];
|
|
62
|
+
const tabCaption = tabParameters[0] || '';
|
|
63
|
+
const tabIcon = tabParameters[1] || '';
|
|
64
|
+
const tabHref = (tabName + ' ' + (i / 2 + 1)).toLowerCase().split(' ').join('-');
|
|
65
|
+
|
|
66
|
+
const { content: contentWithAplayerTag, aplayerTag } = processAplayerTag(postContent);
|
|
67
|
+
const { content: contentWithFancyboxTag, fancyboxTag } = processFancyboxTag(contentWithAplayerTag);
|
|
68
|
+
|
|
69
|
+
const renderedContent = hexo.render.renderSync({ text: contentWithFancyboxTag, engine: 'markdown' }).trim();
|
|
70
|
+
|
|
71
|
+
const finalContent = renderedContent.replace(/\<pre\>\<code\>.*@aplayerTag@.*\<\/code><\/pre>/, aplayerTag)
|
|
72
|
+
.replace(/.*@fancyboxTag@.*/, fancyboxTag);
|
|
73
|
+
|
|
74
|
+
const isActive = (tabActive > 0 && tabActive === (i / 2 + 1)) || (tabActive === 0 && i === 0) ? ' active' : '';
|
|
75
|
+
|
|
76
|
+
tabNav += `<li class="tab${isActive}"><a class="#${tabHref}">${tabIcon + tabCaption.trim()}</a></li>`;
|
|
77
|
+
tabContent += `<div class="tab-pane${isActive}" id="${tabHref}">${finalContent}</div>`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return { tabNav, tabContent };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function postTabs(args, content) {
|
|
84
|
+
const [tabName, tabActive] = parseArgs(args);
|
|
85
|
+
const activeTabIndex = Number(tabActive) || 0;
|
|
86
|
+
|
|
87
|
+
!tabName && hexo.log.warn('Tabs block must have unique name!');
|
|
88
|
+
|
|
89
|
+
const matches = extractMatches(content);
|
|
90
|
+
const { tabNav, tabContent } = buildTabNavAndContent(matches, tabName, activeTabIndex);
|
|
91
|
+
|
|
92
|
+
const finalTabNav = `<ul class="nav-tabs">${tabNav}</ul>`;
|
|
93
|
+
const finalTabContent = `<div class="tab-content">${tabContent}</div>`;
|
|
94
|
+
return `<div class="tabs" id="tab-${tabName.toLowerCase().split(' ').join('-')}">${finalTabNav + finalTabContent}</div>`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
hexo.extend.tag.register('tabs', postTabs, { ends: true });
|
|
98
|
+
hexo.extend.tag.register('subtabs', postTabs, { ends: true });
|
|
99
|
+
hexo.extend.tag.register('subsubtabs', postTabs, { ends: true });
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
.hbe,
|
|
2
|
+
.hbe:after,
|
|
3
|
+
.hbe:before {
|
|
4
|
+
-webkit-box-sizing: border-box;
|
|
5
|
+
-moz-box-sizing: border-box;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.hbe-container{
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
}
|
|
13
|
+
.hbe-content {
|
|
14
|
+
text-align: center;
|
|
15
|
+
font-size: 150%;
|
|
16
|
+
padding: 1em 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.hbe-input {
|
|
20
|
+
position: relative;
|
|
21
|
+
z-index: 1;
|
|
22
|
+
display: inline-block;
|
|
23
|
+
margin: 1em;
|
|
24
|
+
width: 80%;
|
|
25
|
+
min-width: 200px;
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.hbe-input-field {
|
|
30
|
+
line-height: normal;
|
|
31
|
+
font-size: 100%;
|
|
32
|
+
margin: 0;
|
|
33
|
+
position: relative;
|
|
34
|
+
display: block;
|
|
35
|
+
float: right;
|
|
36
|
+
padding: 0.8em;
|
|
37
|
+
width: 60%;
|
|
38
|
+
border: none;
|
|
39
|
+
border-radius: 0;
|
|
40
|
+
background: #f0f0f0;
|
|
41
|
+
color: #aaa;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
44
|
+
-webkit-appearance: none; /* for box shadows to show on iOS */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.hbe-input-field:focus {
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.hbe-input-label {
|
|
52
|
+
display: inline-block;
|
|
53
|
+
float: right;
|
|
54
|
+
padding: 0 1em;
|
|
55
|
+
width: 40%;
|
|
56
|
+
color: #696969;
|
|
57
|
+
font-weight: bold;
|
|
58
|
+
font-size: 70.25%;
|
|
59
|
+
-webkit-font-smoothing: antialiased;
|
|
60
|
+
-moz-osx-font-smoothing: grayscale;
|
|
61
|
+
-webkit-touch-callout: none;
|
|
62
|
+
-webkit-user-select: none;
|
|
63
|
+
-khtml-user-select: none;
|
|
64
|
+
-moz-user-select: none;
|
|
65
|
+
-ms-user-select: none;
|
|
66
|
+
user-select: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.hbe-input-label-content {
|
|
70
|
+
position: relative;
|
|
71
|
+
display: block;
|
|
72
|
+
padding: 1.6em 0;
|
|
73
|
+
width: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.hbe-graphic {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 0;
|
|
79
|
+
left: 0;
|
|
80
|
+
fill: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* hbe button in post page */
|
|
84
|
+
.hbe-button {
|
|
85
|
+
width: 130px;
|
|
86
|
+
height: 40px;
|
|
87
|
+
background: linear-gradient(to bottom, #4eb5e5 0%,#389ed5 100%); /* W3C */
|
|
88
|
+
border: none;
|
|
89
|
+
border-radius: 5px;
|
|
90
|
+
position: relative;
|
|
91
|
+
border-bottom: 4px solid #2b8bc6;
|
|
92
|
+
color: #fbfbfb;
|
|
93
|
+
font-weight: 600;
|
|
94
|
+
font-family: 'Open Sans', sans-serif;
|
|
95
|
+
text-shadow: 1px 1px 1px rgba(0,0,0,.4);
|
|
96
|
+
font-size: 15px;
|
|
97
|
+
text-align: left;
|
|
98
|
+
text-indent: 5px;
|
|
99
|
+
box-shadow: 0px 3px 0px 0px rgba(0,0,0,.2);
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
|
|
102
|
+
display: block;
|
|
103
|
+
margin: 0 auto;
|
|
104
|
+
margin-bottom: 20px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.hbe-button:active {
|
|
108
|
+
box-shadow: 0px 2px 0px 0px rgba(0,0,0,.2);
|
|
109
|
+
top: 1px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.hbe-button:after {
|
|
113
|
+
content: "";
|
|
114
|
+
width: 0;
|
|
115
|
+
height: 0;
|
|
116
|
+
display: block;
|
|
117
|
+
border-top: 20px solid #187dbc;
|
|
118
|
+
border-bottom: 20px solid #187dbc;
|
|
119
|
+
border-left: 16px solid transparent;
|
|
120
|
+
border-right: 20px solid #187dbc;
|
|
121
|
+
position: absolute;
|
|
122
|
+
opacity: 0.6;
|
|
123
|
+
right: 0;
|
|
124
|
+
top: 0;
|
|
125
|
+
border-radius: 0 5px 5px 0;
|
|
126
|
+
}
|
|
127
|
+
/* hbe button in post page */
|
|
128
|
+
|
|
129
|
+
/* default theme {{{ */
|
|
130
|
+
.hbe-input-default {
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.hbe-input-field-default {
|
|
135
|
+
width: 100%;
|
|
136
|
+
background: transparent;
|
|
137
|
+
padding: 0.5em;
|
|
138
|
+
margin-bottom: 2em;
|
|
139
|
+
color: #f9f7f6;
|
|
140
|
+
z-index: 100;
|
|
141
|
+
opacity: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.hbe-input-label-default {
|
|
145
|
+
width: 100%;
|
|
146
|
+
position: absolute;
|
|
147
|
+
text-align: left;
|
|
148
|
+
padding: 0.5em 0;
|
|
149
|
+
pointer-events: none;
|
|
150
|
+
font-size: 1em;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.hbe-input-label-default::before,
|
|
154
|
+
.hbe-input-label-default::after {
|
|
155
|
+
content: '';
|
|
156
|
+
position: absolute;
|
|
157
|
+
width: 100%;
|
|
158
|
+
left: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hbe-input-label-default::before {
|
|
162
|
+
height: 100%;
|
|
163
|
+
background: #666666;
|
|
164
|
+
top: 0;
|
|
165
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
166
|
+
transform: translate3d(0, -100%, 0);
|
|
167
|
+
-webkit-transition: -webkit-transform 0.2s;
|
|
168
|
+
transition: transform 0.2s;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.hbe-input-label-default::after {
|
|
172
|
+
height: 2px;
|
|
173
|
+
background: #666666;
|
|
174
|
+
top: 100%;
|
|
175
|
+
-webkit-transition: opacity 0.2s;
|
|
176
|
+
transition: opacity 0.2s;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.hbe-input-label-content-default {
|
|
180
|
+
padding: 0;
|
|
181
|
+
-webkit-transform-origin: 0 0;
|
|
182
|
+
transform-origin: 0 0;
|
|
183
|
+
-webkit-transition: -webkit-transform 0.2s, color 0.2s;
|
|
184
|
+
transition: transform 0.2s, color 0.2s;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.hbe-input-field-default:focus,
|
|
188
|
+
.hbe-input--filled .hbe-input-field-default {
|
|
189
|
+
opacity: 1;
|
|
190
|
+
-webkit-transition: opacity 0s 0.2s;
|
|
191
|
+
transition: opacity 0s 0.2s;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.hbe-input-label-default::before,
|
|
195
|
+
.hbe-input-label-default::after,
|
|
196
|
+
.hbe-input-label-content-default,
|
|
197
|
+
.hbe-input-field-default:focus,
|
|
198
|
+
.hbe-input--filled .hbe-input-field-default {
|
|
199
|
+
-webkit-transition-timing-function: cubic-bezier(0, 0.25, 0.5, 1);
|
|
200
|
+
transition-timing-function: cubic-bezier(0, 0.25, 0.5, 1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.hbe-input-field-default:focus + .hbe-input-label-default::before,
|
|
204
|
+
.hbe-input--filled .hbe-input-label-default::before {
|
|
205
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
206
|
+
transform: translate3d(0, 0, 0);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.hbe-input-field-default:focus + .hbe-input-label-default::after,
|
|
210
|
+
.hbe-input--filled .hbe-input-label-default::after {
|
|
211
|
+
opacity: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.hbe-input-field-default:focus + .hbe-input-label-default .hbe-input-label-content-default,
|
|
215
|
+
.hbe-input--filled .hbe-input-label-default .hbe-input-label-content-default {
|
|
216
|
+
color: #555555;
|
|
217
|
+
-webkit-transform: translate3d(0, 2.1em, 0) scale3d(0.65, 0.65, 1);
|
|
218
|
+
transform: translate3d(0, 2.1em, 0) scale3d(0.65, 0.65, 1);
|
|
219
|
+
}
|
|
220
|
+
/* default theme }}} */
|