├── .gitignore ├── .npmignore ├── source ├── images │ ├── off_on.png │ ├── favicon.png │ ├── logo@2x.png │ ├── search_icon.png │ ├── flags │ │ ├── flag-cn.png │ │ └── flag-us.png │ ├── logo_dark@2x.png │ ├── logos │ │ ├── github.png │ │ └── myblog.png │ ├── logo-collapsed@2x.png │ ├── webstack_banner_cn.png │ └── webstack_icon_producthunt.png ├── css │ ├── fonts │ │ ├── linecons │ │ │ ├── font │ │ │ │ ├── linecons.eot │ │ │ │ ├── linecons.ttf │ │ │ │ ├── linecons.woff │ │ │ │ └── linecons.svg │ │ │ └── css │ │ │ │ ├── linecons.min.css │ │ │ │ ├── linecons-codes.css │ │ │ │ ├── linecons-ie7-codes.css │ │ │ │ └── linecons-ie7.css │ │ └── fontawesome │ │ │ ├── webfonts │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-solid-900.woff │ │ │ ├── fa-solid-900.woff2 │ │ │ └── fa-regular-400.woff2 │ │ │ └── css │ │ │ └── webfonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-regular-400.woff2 │ │ │ └── fa-solid-900.woff2 │ ├── nav.min.css │ └── hclonely.css └── js │ ├── resizeable.min.js │ ├── xenon-api.min.js │ ├── resizeable.js │ ├── html5shiv.min.js │ ├── footer.js │ ├── lozad.min.js │ ├── respond.min.js │ ├── xenon-toggles.min.js │ ├── header.js │ ├── joinable.js │ └── xenon-custom.min.js ├── screenshot └── screenshot.png ├── layout ├── page.pug ├── layout.pug ├── common │ ├── group.pug │ ├── head.pug │ ├── footer.pug │ └── header.pug ├── about.pug └── index.pug ├── index.js ├── scripts └── replace_config.js ├── move_config.js ├── .github └── workflows │ └── npmpublish.yml ├── package.json ├── LICENSE ├── _config.example.yml ├── README_CN.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .vscode 3 | .history 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | screenshot/ 2 | .github/ 3 | .history/ 4 | -------------------------------------------------------------------------------- /source/images/off_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/off_on.png -------------------------------------------------------------------------------- /screenshot/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/screenshot/screenshot.png -------------------------------------------------------------------------------- /source/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/favicon.png -------------------------------------------------------------------------------- /source/images/logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/logo@2x.png -------------------------------------------------------------------------------- /layout/page.pug: -------------------------------------------------------------------------------- 1 | if page.type === 'about' 2 | include about 3 | else if page.type === 'child' 4 | include index 5 | -------------------------------------------------------------------------------- /source/images/search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/search_icon.png -------------------------------------------------------------------------------- /source/images/flags/flag-cn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/flags/flag-cn.png -------------------------------------------------------------------------------- /source/images/flags/flag-us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/flags/flag-us.png -------------------------------------------------------------------------------- /source/images/logo_dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/logo_dark@2x.png -------------------------------------------------------------------------------- /source/images/logos/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/logos/github.png -------------------------------------------------------------------------------- /source/images/logos/myblog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/logos/myblog.png -------------------------------------------------------------------------------- /source/images/logo-collapsed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/logo-collapsed@2x.png -------------------------------------------------------------------------------- /source/images/webstack_banner_cn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/webstack_banner_cn.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // 这个文件用来防止 hexo 5.0.0 使用 "hexo clean" 命令报错。 2 | // This file is used to prevent hexo 5.0.0 from using "hexo clean" command error. 3 | -------------------------------------------------------------------------------- /source/css/fonts/linecons/font/linecons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/linecons/font/linecons.eot -------------------------------------------------------------------------------- /source/css/fonts/linecons/font/linecons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/linecons/font/linecons.ttf -------------------------------------------------------------------------------- /source/css/fonts/linecons/font/linecons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/linecons/font/linecons.woff -------------------------------------------------------------------------------- /source/images/webstack_icon_producthunt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/images/webstack_icon_producthunt.png -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /source/css/fonts/fontawesome/css/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HCLonely/hexo-theme-webstack/HEAD/source/css/fonts/fontawesome/css/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /scripts/replace_config.js: -------------------------------------------------------------------------------- 1 | hexo.on('generateBefore', function () { 2 | const rootConfig = hexo.config 3 | if (hexo.locals.get) { 4 | const data = hexo.locals.get('data') 5 | data && data.webstack && (hexo.theme.config = data.webstack) 6 | } 7 | hexo.theme.config.rootConfig = rootConfig 8 | }) 9 | -------------------------------------------------------------------------------- /layout/layout.pug: -------------------------------------------------------------------------------- 1 | doctype html 2 | html(lang=config.language) 3 | - const setting = page ? Object.assign({}, theme, page) : theme 4 | head 5 | include common/head 6 | 7 | != body 8 | include common/footer 9 | 10 | if setting.custom && setting.custom.body 11 | != setting.custom.body 12 | -------------------------------------------------------------------------------- /move_config.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | 3 | if (fs.existsSync('../hexo/package.json')){ 4 | const version = JSON.parse(fs.readFileSync('../hexo/package.json')).version 5 | if (parseInt(version.split('.')[0] || '7', 10) >= 5) { 6 | const oldConfigPath = '../../source/_data/webstack.yml' 7 | const configPath = '../../_config.webstack.yml' 8 | if (!fs.existsSync(configPath) && !fs.existsSync(oldConfigPath)) { 9 | fs.writeFileSync(configPath, fs.readFileSync('./_config.example.yml')) 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.github/workflows/npmpublish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | publish-npm: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v1 16 | with: 17 | node-version: 22 18 | registry-url: https://registry.npmjs.org/ 19 | - run: npm publish 20 | env: 21 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 22 | -------------------------------------------------------------------------------- /layout/common/group.pug: -------------------------------------------------------------------------------- 1 | h4.text-gray 2 | i.linecons-tag(style='margin-right: 7px;' id=menuName.replace(/[\s]+/g, '-')) 3 | = menuName 4 | 5 | .row 6 | each menu in menus 7 | .col-sm-3 8 | .xe-widget.xe-conversations.box2.label-info(onclick='window.open("' + url_for(menu.url) + '", "_blank")' data-toggle='tooltip' data-placement='bottom' title='' data-original-title=url_for(menu.url)) 9 | .xe-comment-entry 10 | a.xe-user-img 11 | img.lozad.img-circle(data-src=url_for(menu.img) width='40') 12 | .xe-comment 13 | a.xe-user-name.overflowClip_1(href='#') 14 | strong= menu.name 15 | p.overflowClip_2= menu.description 16 | 17 | br 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-theme-webstack", 3 | "version": "3.0.5", 4 | "description": "A hexo theme based on webstack.", 5 | "keywords": [ 6 | "hexo", 7 | "theme", 8 | "webstack" 9 | ], 10 | "main": "index.js", 11 | "engines": { 12 | "node": ">=18.0.0" 13 | }, 14 | "scripts": { 15 | "postinstall": "node ./move_config.js" 16 | }, 17 | "author": "HCLonely ", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/HCLonely/hexo-theme-webstack/issues", 21 | "email": "h1606051253@gmail.com" 22 | }, 23 | "repository": { 24 | "type": "git", 25 | "url": "https://github.com/HCLonely/hexo-theme-webstack.git" 26 | }, 27 | "dependencies": { 28 | "hexo-renderer-pug": "^3.0.0", 29 | "pug": "^3.0.3" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /source/css/nav.min.css: -------------------------------------------------------------------------------- 1 | .box2{height:86px;cursor:pointer;border-radius:4px;padding:0 30px 0 30px;background-color:#fff;border-radius:4px;border:1px solid #e4ecf3;margin:20px 0 0 0;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}.box2:hover{transform:translateY(-6px);-webkit-transform:translateY(-6px);-moz-transform:translateY(-6px);box-shadow:0 26px 40px -24px rgba(0,36,100,.3);-webkit-box-shadow:0 26px 40px -24px rgba(0,36,100,.3);-moz-box-shadow:0 26px 40px -24px rgba(0,36,100,.3);-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease}.xe-comment-entry img{float:left;display:block;margin-right:10px}.xe-comment{transform:translateY(-50%);position:absolute;margin-left:50px;top:50%}.xe-comment p{margin-bottom:0;margin-right:15px}.overflowClip_1{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.overflowClip_2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.submit-tag{margin-top:50px}.img-circle{padding:7px 0} -------------------------------------------------------------------------------- /source/js/resizeable.min.js: -------------------------------------------------------------------------------- 1 | var public_vars=public_vars||{};jQuery.extend(public_vars,{breakpoints:{largescreen:[991,-1],tabletscreen:[768,990],devicescreen:[420,767],sdevicescreen:[0,419]},lastBreakpoint:null});function resizable(breakpoint){var sb_with_animation;if(is("largescreen")){}if(ismdxl()){}if(is("tabletscreen")){}if(is("tabletscreen")){public_vars.$sidebarMenu.addClass("collapsed");ps_destroy()}if(isxs()){}jQuery(window).trigger("xenon.resize")}function get_current_breakpoint(){var width=jQuery(window).width(),breakpoints=public_vars.breakpoints;for(var breakpont_label in breakpoints){var bp_arr=breakpoints[breakpont_label],min=bp_arr[0],max=bp_arr[1];if(max==-1)max=width;if(min<=width&&max>=width){return breakpont_label}}return null}function is(screen_label){return get_current_breakpoint()==screen_label}function isxs(){return is("devicescreen")||is("sdevicescreen")}function ismdxl(){return is("tabletscreen")||is("largescreen")}function trigger_resizable(){if(public_vars.lastBreakpoint!=get_current_breakpoint()){public_vars.lastBreakpoint=get_current_breakpoint();resizable(public_vars.lastBreakpoint)}jQuery(window).trigger("xenon.resized")} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 HCLonely 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/js/xenon-api.min.js: -------------------------------------------------------------------------------- 1 | function rtl(){if(typeof window.isRTL=="boolean")return window.isRTL;window.isRTL=jQuery("html").get(0).dir=="rtl"?true:false;return window.isRTL}function show_loading_bar(options){var defaults={pct:0,delay:1.3,wait:0,before:function(){},finish:function(){},resetOnEnd:true};if(typeof options=="object")defaults=jQuery.extend(defaults,options);else if(typeof options=="number")defaults.pct=options;if(defaults.pct>100)defaults.pct=100;else if(defaults.pct<0)defaults.pct=0;var $=jQuery,$loading_bar=$(".xenon-loading-bar");if($loading_bar.length==0){$loading_bar=$('
');public_vars.$body.append($loading_bar)}var $pct=$loading_bar.find("span"),current_pct=$pct.data("pct"),is_regress=current_pct>defaults.pct;defaults.before(current_pct);TweenMax.to($pct,defaults.delay,{css:{width:defaults.pct+"%"},delay:defaults.wait,ease:is_regress?Expo.easeOut:Expo.easeIn,onStart:function(){$loading_bar.removeClass("progress-is-hidden")},onComplete:function(){var pct=$pct.data("pct");if(pct==100&&defaults.resetOnEnd){hide_loading_bar()}defaults.finish(pct)},onUpdate:function(){$pct.data("pct",parseInt($pct.get(0).style.width,10))}})}function hide_loading_bar(){var $=jQuery,$loading_bar=$(".xenon-loading-bar"),$pct=$loading_bar.find("span");$loading_bar.addClass("progress-is-hidden");$pct.width(0).data("pct",0)} -------------------------------------------------------------------------------- /layout/common/head.pug: -------------------------------------------------------------------------------- 1 | head 2 | meta(charset="utf-8") 3 | meta(http-equiv="X-UA-Compatible" content="IE=edge") 4 | meta(name="viewport" content="width=device-width, initial-scale=1.0") 5 | meta(name="author" content="viggo") 6 | title #{setting.tittle || config.title} - #{setting.subtitle || config.subtitle} 7 | meta(name="keywords" content=setting.keywords || config.keywords) 8 | meta(name="description" content=setting.description || config.description) 9 | link(rel="shortcut icon" href=url_for(setting.favicon)) 10 | 11 | != css(Object.values(setting.css)) 12 | != js(setting.js.jquery) 13 | 14 | script. 15 | var userDefinedSearchData = !{JSON.stringify(setting.userDefinedSearchData || {})}; 16 | var expandAll = #{setting.expandAll ? 'true' : 'false'}; 17 | 18 | != js(setting.js.header) 19 | 20 | //[if lt IE 9] 21 | != js(setting.js.html5shiv) 22 | != js(setting.js.respond) 23 | 24 | // FB Open Graph 25 | meta(property="og:type" content="article") 26 | meta(property="og:url" content=url) 27 | meta(property="og:title" content=`${setting.tittle || config.title} - ${setting.subtitle || config.subtitle}`) 28 | meta(property="og:description" content=setting.description || config.description) 29 | meta(property="og:site_name" content=`${setting.tittle || config.title} - ${setting.subtitle || config.subtitle}`) 30 | 31 | if setting.banner 32 | meta(property="og:image" content=setting.banner) 33 | 34 | // Twitter Cards 35 | meta(name="twitter:card" content="summary_large_image") 36 | meta(name="twitter:title" content=`${setting.tittle || config.title} - ${setting.subtitle || config.subtitle}`) 37 | meta(name="twitter:description" content=setting.description || config.description) 38 | 39 | if setting.banner 40 | meta(name="twitter:image" content=setting.banner) 41 | 42 | if setting.custom && setting.custom.head 43 | != setting.custom.head 44 | -------------------------------------------------------------------------------- /layout/common/footer.pug: -------------------------------------------------------------------------------- 1 | footer.main-footer.sticky.footer-type-1 2 | .footer-inner 3 | p 4 | - var now = new Date().getFullYear() 5 | | © #{setting.since === now ? setting.since : (setting.since + " - " + now)} 6 | | 7 | a(href="javascript:void(0);") 8 | strong= config.author 9 | | | Design by 10 | a(href="http://viggoz.com", target="_blank") 11 | strong Viggo 12 | | | Power by 13 | a(href="https://hexo.io/", target="_blank") 14 | strong Hexo 15 | | & 16 | a(href="https://github.com/HCLonely/hexo-theme-webstack/", target="_blank") 17 | strong hexo-theme-webstack 18 | 19 | if setting.busuanzi.enable && setting.busuanzi.position === 'footer' 20 | p 21 | span#busuanzi_container_site_pv!= setting.busuanzi.pv.replace(/\$pv/i,'') 22 | | | 23 | span#busuanzi_container_site_uv!= setting.busuanzi.uv.replace(/\$uv/i,'') 24 | 25 | .go-up 26 | a(href="#", rel="go-top") 27 | i.fas.fa-angle-up 28 | 29 | . 30 | . 31 | 32 | //- 引入 JavaScript 文件 33 | each jsFile in [setting.js.bootstrap, setting.js.TweenMax, setting.js.resizeable, setting.js.joinable, setting.js.xenonApi, setting.js.xenonToggles, setting.js.xenonCustom] 34 | script(src=jsFile) 35 | 36 | if setting.busuanzi.enable 37 | script(async, src=url_for(setting.js.busuanzi)) 38 | 39 | if page.type !== "about" 40 | script(src=setting.js.lozad) 41 | else 42 | textarea#autosizejs.autosizejs(tabindex="-1", style="position: absolute; top: -999px; left: 0px; right: auto; bottom: auto; border: 0px; padding: 0px; box-sizing: content-box; word-wrap: break-word; overflow: hidden; transition: none; height: 0px !important; min-height: 0px !important; font-family: Arimo, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-weight: 400; font-style: normal; letter-spacing: 0px; text-transform: none; word-spacing: 0px; text-indent: 0px; line-height: 18.5714px; width: 53px;") 43 | -------------------------------------------------------------------------------- /layout/about.pug: -------------------------------------------------------------------------------- 1 | body.page-body.boxed-container 2 | nav.navbar.horizontal-menu.navbar-fixed-top 3 | .navbar-inner 4 | .navbar-brand 5 | a(href=url_for('/index.html')).logo 6 | img.hidden-xs(src=url_for(theme.logo.dark), width='180px', alt='') 7 | img.visible-xs(src=url_for(theme.logo.expanded), width='180px', alt='') 8 | .navbar-mobile-clear 9 | if theme.githubCorner 10 | != theme.githubCorner 11 | 12 | .page-container 13 | .main-content 14 | .row 15 | .col-md-12 16 | .panel.panel-default 17 | if theme.aboutPage && theme.aboutPage.website 18 | h4.text-gray= theme.aboutPage.website.head 19 | .panel-body 20 | .row 21 | .col-sm-12 22 | != theme.aboutPage.website.html 23 | else 24 | .panel-body 25 | 26 | if theme.aboutPage && theme.aboutPage.webmaster 27 | h4.text-gray= theme.aboutPage.webmaster.head 28 | .row 29 | .col-sm-4 30 | .xe-widget.xe-conversations.box2.label-info( 31 | onclick='window.open("' + url_for(theme.aboutPage.webmaster.url) + '", "_blank")' 32 | data-toggle='tooltip' 33 | data-placement='bottom' 34 | data-original-title=url_for(theme.aboutPage.webmaster.url) 35 | ) 36 | .xe-comment-entry 37 | a.xe-user-img 38 | img.img-circle(src=url_for(theme.aboutPage.webmaster.img), width='40') 39 | .xe-comment 40 | a.xe-user-name.overflowClip_1(href='#') 41 | strong= theme.aboutPage.webmaster.name 42 | p.overflowClip_2= theme.aboutPage.webmaster.description 43 | .col-md-8 44 | .row 45 | .col-sm-12 46 | != theme.aboutPage.webmaster.html 47 | br 48 | -------------------------------------------------------------------------------- /layout/common/header.pug: -------------------------------------------------------------------------------- 1 | .sidebar-menu.toggle-others.fixed 2 | .sidebar-menu-inner 3 | header.logo-env 4 | .logo 5 | a(href=url_for('/index.html')).logo-expanded 6 | img(src=url_for(setting.logo ? setting.logo.expanded : ''), width='100%', alt='') 7 | a(href=url_for('/index.html')).logo-collapsed 8 | img(src=url_for(setting.logo ? setting.logo.collapsed : ''), width='40', alt='') 9 | .mobile-menu-toggle.visible-xs 10 | a(href='javascript:void(0)', data-toggle='user-info-menu') 11 | i.linecons-cog 12 | a(href='javascript:void(0)', data-toggle='mobile-menu') 13 | i.fas.fa-bars 14 | ul#main-menu.main-menu 15 | each e in setting.menu 16 | li(class=e.submenu && setting.expandAll ? 'expanded' : '') 17 | if e.submenu 18 | a.fas.fa-angle-down(style='cursor: pointer;') 19 | i(class=e.icon) 20 | span.title= e.name 21 | ul(style=`display: ${setting.expandAll ? 'block' : 'none'}`) 22 | each submenu in e.submenu 23 | li 24 | a.smooth(href=`#${submenu.name.replace(/[\s]+/g, '-')}`) 25 | i(class=submenu.icon) 26 | span.title= submenu.name 27 | else 28 | a.smooth(href=`#${e.name.replace(/[\s]+/g, '-')}`) 29 | i(class=e.icon) 30 | span.title= e.name 31 | if setting.about 32 | li.submit-tag 33 | a(href=url_for(setting.about.url)) 34 | i(class=setting.about.icon) 35 | span.tooltip-blue= setting.about.name 36 | if setting.busuanzi && setting.busuanzi.enable && setting.busuanzi.position === 'sidebar' 37 | li 38 | a(href='javascript:void(0)') 39 | i.fas.fa-eye 40 | span#busuanzi_container_site_pv!= setting.busuanzi.pv.replace(/\$pv/i,'') 41 | li 42 | a(href='javascript:void(0)') 43 | i.fas.fa-users 44 | span#busuanzi_container_site_uv!= setting.busuanzi.uv.replace(/\$uv/i,'') 45 | -------------------------------------------------------------------------------- /source/css/fonts/linecons/css/linecons.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:linecons;src:url(../font/linecons.eot?24293614);src:url(../font/linecons.eot?24293614#iefix) format('embedded-opentype'),url(../font/linecons.woff?24293614) format('woff'),url(../font/linecons.ttf?24293614) format('truetype'),url(../font/linecons.svg?24293614#linecons) format('svg');font-weight:400;font-style:normal}[class*=" linecons-"]:before,[class^=linecons-]:before{font-family:linecons;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.linecons-music:before{content:'\e800'}.linecons-search:before{content:'\e801'}.linecons-mail:before{content:'\e802'}.linecons-heart:before{content:'\e803'}.linecons-star:before{content:'\e804'}.linecons-user:before{content:'\e805'}.linecons-videocam:before{content:'\e806'}.linecons-camera:before{content:'\e807'}.linecons-photo:before{content:'\e808'}.linecons-attach:before{content:'\e809'}.linecons-lock:before{content:'\e80a'}.linecons-eye:before{content:'\e80b'}.linecons-tag:before{content:'\e80c'}.linecons-thumbs-up:before{content:'\e80d'}.linecons-pencil:before{content:'\e80e'}.linecons-comment:before{content:'\e80f'}.linecons-location:before{content:'\e810'}.linecons-cup:before{content:'\e811'}.linecons-trash:before{content:'\e812'}.linecons-doc:before{content:'\e813'}.linecons-note:before{content:'\e814'}.linecons-cog:before{content:'\e815'}.linecons-params:before{content:'\e816'}.linecons-calendar:before{content:'\e817'}.linecons-sound:before{content:'\e818'}.linecons-clock:before{content:'\e819'}.linecons-lightbulb:before{content:'\e81a'}.linecons-tv:before{content:'\e81b'}.linecons-desktop:before{content:'\e81c'}.linecons-mobile:before{content:'\e81d'}.linecons-cd:before{content:'\e81e'}.linecons-inbox:before{content:'\e81f'}.linecons-globe:before{content:'\e820'}.linecons-cloud:before{content:'\e821'}.linecons-paper-plane:before{content:'\e822'}.linecons-fire:before{content:'\e823'}.linecons-graduation-cap:before{content:'\e824'}.linecons-megaphone:before{content:'\e825'}.linecons-database:before{content:'\e826'}.linecons-key:before{content:'\e827'}.linecons-beaker:before{content:'\e828'}.linecons-truck:before{content:'\e829'}.linecons-money:before{content:'\e82a'}.linecons-food:before{content:'\e82b'}.linecons-shop:before{content:'\e82c'}.linecons-diamond:before{content:'\e82d'}.linecons-t-shirt:before{content:'\e82e'}.linecons-wallet:before{content:'\e82f'} -------------------------------------------------------------------------------- /source/js/resizeable.js: -------------------------------------------------------------------------------- 1 | /* 2 | This function will be called in the event when browser breakpoint changes 3 | */ 4 | 5 | var public_vars = public_vars || {}; 6 | 7 | jQuery.extend(public_vars, { 8 | 9 | breakpoints: { 10 | largescreen: [991, -1], 11 | tabletscreen: [768, 990], 12 | devicescreen: [420, 767], 13 | sdevicescreen: [0, 419] 14 | }, 15 | 16 | lastBreakpoint: null 17 | }); 18 | 19 | 20 | /* Main Function that will be called each time when the screen breakpoint changes */ 21 | function resizable(breakpoint) 22 | { 23 | var sb_with_animation; 24 | 25 | // Large Screen Specific Script 26 | if(is('largescreen')) 27 | { 28 | } 29 | 30 | 31 | // Tablet or larger screen 32 | if(ismdxl()) 33 | { 34 | } 35 | 36 | 37 | // Tablet Screen Specific Script 38 | if(is('tabletscreen')) 39 | { 40 | } 41 | 42 | 43 | // Tablet device screen 44 | if(is('tabletscreen')) 45 | { 46 | public_vars.$sidebarMenu.addClass('collapsed'); 47 | ps_destroy(); 48 | } 49 | 50 | 51 | // Tablet Screen Specific Script 52 | if(isxs()) 53 | { 54 | } 55 | 56 | 57 | // Trigger Event 58 | jQuery(window).trigger('xenon.resize'); 59 | } 60 | 61 | 62 | 63 | /* Functions */ 64 | 65 | // Get current breakpoint 66 | function get_current_breakpoint() 67 | { 68 | var width = jQuery(window).width(), 69 | breakpoints = public_vars.breakpoints; 70 | 71 | for(var breakpont_label in breakpoints) 72 | { 73 | var bp_arr = breakpoints[breakpont_label], 74 | min = bp_arr[0], 75 | max = bp_arr[1]; 76 | 77 | if(max == -1) 78 | max = width; 79 | 80 | if(min <= width && max >= width) 81 | { 82 | return breakpont_label; 83 | } 84 | } 85 | 86 | return null; 87 | } 88 | 89 | 90 | // Check current screen breakpoint 91 | function is(screen_label) 92 | { 93 | return get_current_breakpoint() == screen_label; 94 | } 95 | 96 | 97 | // Is xs device 98 | function isxs() 99 | { 100 | return is('devicescreen') || is('sdevicescreen'); 101 | } 102 | 103 | // Is md or xl 104 | function ismdxl() 105 | { 106 | return is('tabletscreen') || is('largescreen'); 107 | } 108 | 109 | 110 | // Trigger Resizable Function 111 | function trigger_resizable() 112 | { 113 | if(public_vars.lastBreakpoint != get_current_breakpoint()) 114 | { 115 | public_vars.lastBreakpoint = get_current_breakpoint(); 116 | resizable(public_vars.lastBreakpoint); 117 | } 118 | 119 | 120 | // Trigger Event (Repeated) 121 | jQuery(window).trigger('xenon.resized'); 122 | } -------------------------------------------------------------------------------- /source/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document); -------------------------------------------------------------------------------- /source/js/footer.js: -------------------------------------------------------------------------------- 1 | 2 | $(document).ready(function () { 3 | //img lazy loaded 4 | const observer = lozad(); 5 | observer.observe(); 6 | 7 | $(document).on('click', '.has-sub', function () { 8 | var _this = $(this) 9 | if (!$(this).hasClass('expanded')) { 10 | setTimeout(function () { 11 | _this.find('ul').attr("style", "") 12 | }, 300); 13 | 14 | } else { 15 | $('.has-sub ul').each(function (id, ele) { 16 | var _that = $(this) 17 | if (_this.find('ul')[0] != ele && !expandAll) { 18 | setTimeout(function () { 19 | _that.attr("style", "") 20 | }, 300); 21 | } 22 | }) 23 | } 24 | }) 25 | $('.user-info-menu .hidden-sm').click(function () { 26 | if ($('.sidebar-menu').hasClass('collapsed')) { 27 | $('.has-sub.expanded > ul').attr("style", "") 28 | } else { 29 | $('.has-sub.expanded > ul').show() 30 | } 31 | }) 32 | $("#main-menu li ul li").click(function () { 33 | $(this).siblings('li').removeClass('active'); // 删除其他兄弟元素的样式 34 | $(this).addClass('active'); // 添加当前元素的样式 35 | }); 36 | $("a.smooth").click(function (ev) { 37 | ev.preventDefault(); 38 | 39 | public_vars.$mainMenu.add(public_vars.$sidebarProfile).toggleClass('mobile-is-visible'); 40 | ps_destroy(); 41 | $("html, body").animate({ 42 | scrollTop: $($(this).attr("href")).offset().top - 30 43 | }, { 44 | duration: 500, 45 | easing: "swing" 46 | }); 47 | }); 48 | return false; 49 | }); 50 | 51 | var href = ""; 52 | var pos = 0; 53 | $("a.smooth").click(function (e) { 54 | $("#main-menu li").each(function () { 55 | $(this).removeClass("active"); 56 | }); 57 | $(this).parent("li").addClass("active"); 58 | e.preventDefault(); 59 | href = $(this).attr("href"); 60 | pos = $(href).position().top - 30; 61 | }); 62 | (function () { 63 | if (document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") === '') { 64 | if (new Date().getHours() > 22 || new Date().getHours() < 6) { 65 | document.body.classList.add('night'); 66 | document.cookie = "night=1;path=/"; 67 | console.log('夜间模式开启'); 68 | } else { 69 | document.body.classList.remove('night'); 70 | document.cookie = "night=0;path=/"; 71 | console.log('夜间模式关闭'); 72 | } 73 | } else { 74 | var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0'; 75 | if (night == '0') { 76 | document.body.classList.remove('night'); 77 | } else if (night == '1') { 78 | document.body.classList.add('night'); 79 | } 80 | } 81 | })(); 82 | -------------------------------------------------------------------------------- /source/css/fonts/linecons/css/linecons-codes.css: -------------------------------------------------------------------------------- 1 | 2 | .linecons-music:before { content: '\e800'; } /* '' */ 3 | .linecons-search:before { content: '\e801'; } /* '' */ 4 | .linecons-mail:before { content: '\e802'; } /* '' */ 5 | .linecons-heart:before { content: '\e803'; } /* '' */ 6 | .linecons-star:before { content: '\e804'; } /* '' */ 7 | .linecons-user:before { content: '\e805'; } /* '' */ 8 | .linecons-videocam:before { content: '\e806'; } /* '' */ 9 | .linecons-camera:before { content: '\e807'; } /* '' */ 10 | .linecons-photo:before { content: '\e808'; } /* '' */ 11 | .linecons-attach:before { content: '\e809'; } /* '' */ 12 | .linecons-lock:before { content: '\e80a'; } /* '' */ 13 | .linecons-eye:before { content: '\e80b'; } /* '' */ 14 | .linecons-tag:before { content: '\e80c'; } /* '' */ 15 | .linecons-thumbs-up:before { content: '\e80d'; } /* '' */ 16 | .linecons-pencil:before { content: '\e80e'; } /* '' */ 17 | .linecons-comment:before { content: '\e80f'; } /* '' */ 18 | .linecons-location:before { content: '\e810'; } /* '' */ 19 | .linecons-cup:before { content: '\e811'; } /* '' */ 20 | .linecons-trash:before { content: '\e812'; } /* '' */ 21 | .linecons-doc:before { content: '\e813'; } /* '' */ 22 | .linecons-note:before { content: '\e814'; } /* '' */ 23 | .linecons-cog:before { content: '\e815'; } /* '' */ 24 | .linecons-params:before { content: '\e816'; } /* '' */ 25 | .linecons-calendar:before { content: '\e817'; } /* '' */ 26 | .linecons-sound:before { content: '\e818'; } /* '' */ 27 | .linecons-clock:before { content: '\e819'; } /* '' */ 28 | .linecons-lightbulb:before { content: '\e81a'; } /* '' */ 29 | .linecons-tv:before { content: '\e81b'; } /* '' */ 30 | .linecons-desktop:before { content: '\e81c'; } /* '' */ 31 | .linecons-mobile:before { content: '\e81d'; } /* '' */ 32 | .linecons-cd:before { content: '\e81e'; } /* '' */ 33 | .linecons-inbox:before { content: '\e81f'; } /* '' */ 34 | .linecons-globe:before { content: '\e820'; } /* '' */ 35 | .linecons-cloud:before { content: '\e821'; } /* '' */ 36 | .linecons-paper-plane:before { content: '\e822'; } /* '' */ 37 | .linecons-fire:before { content: '\e823'; } /* '' */ 38 | .linecons-graduation-cap:before { content: '\e824'; } /* '' */ 39 | .linecons-megaphone:before { content: '\e825'; } /* '' */ 40 | .linecons-database:before { content: '\e826'; } /* '' */ 41 | .linecons-key:before { content: '\e827'; } /* '' */ 42 | .linecons-beaker:before { content: '\e828'; } /* '' */ 43 | .linecons-truck:before { content: '\e829'; } /* '' */ 44 | .linecons-money:before { content: '\e82a'; } /* '' */ 45 | .linecons-food:before { content: '\e82b'; } /* '' */ 46 | .linecons-shop:before { content: '\e82c'; } /* '' */ 47 | .linecons-diamond:before { content: '\e82d'; } /* '' */ 48 | .linecons-t-shirt:before { content: '\e82e'; } /* '' */ 49 | .linecons-wallet:before { content: '\e82f'; } /* '' */ -------------------------------------------------------------------------------- /source/js/lozad.min.js: -------------------------------------------------------------------------------- 1 | (function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=global||self,global.lozad=factory())})(this,function(){"use strict";var isIE=typeof document!=="undefined"&&document.documentMode;var defaultConfig={rootMargin:"0px",threshold:0,load:function load(element){if(element.nodeName.toLowerCase()==="picture"){var img=document.createElement("img");if(isIE&&element.getAttribute("data-iesrc")){img.src=element.getAttribute("data-iesrc")}if(element.getAttribute("data-alt")){img.alt=element.getAttribute("data-alt")}element.append(img)}if(element.nodeName.toLowerCase()==="video"&&!element.getAttribute("data-src")){if(element.children){var childs=element.children;var childSrc=void 0;for(var i=0;i<=childs.length-1;i++){childSrc=childs[i].getAttribute("data-src");if(childSrc){childs[i].src=childSrc}}element.load()}}if(element.getAttribute("data-src")){element.src=element.getAttribute("data-src")}if(element.getAttribute("data-srcset")){element.setAttribute("srcset",element.getAttribute("data-srcset"))}if(element.getAttribute("data-background-image")){element.style.backgroundImage="url('"+element.getAttribute("data-background-image").split(",").join("'),url('")+"')"}else if(element.getAttribute("data-background-image-set")){var imageSetLinks=element.getAttribute("data-background-image-set").split(",");var firstUrlLink=imageSetLinks[0].substr(0,imageSetLinks[0].indexOf(" "))||imageSetLinks[0];firstUrlLink=firstUrlLink.indexOf("url(")===-1?"url("+firstUrlLink+")":firstUrlLink;if(imageSetLinks.length===1){element.style.backgroundImage=firstUrlLink}else{element.setAttribute("style",(element.getAttribute("style")||"")+("background-image: "+firstUrlLink+"; background-image: -webkit-image-set("+imageSetLinks+"); background-image: image-set("+imageSetLinks+")"))}}if(element.getAttribute("data-toggle-class")){element.classList.toggle(element.getAttribute("data-toggle-class"))}},loaded:function loaded(){}};function markAsLoaded(element){element.setAttribute("data-loaded",true)}var isLoaded=function isLoaded(element){return element.getAttribute("data-loaded")==="true"};var onIntersection=function onIntersection(load,loaded){return function(entries,observer){entries.forEach(function(entry){if(entry.intersectionRatio>0||entry.isIntersecting){observer.unobserve(entry.target);if(!isLoaded(entry.target)){load(entry.target);markAsLoaded(entry.target);loaded(entry.target)}}})}};var getElements=function getElements(selector){var root=arguments.length>1&&arguments[1]!==undefined?arguments[1]:document;if(selector instanceof Element){return[selector]}if(selector instanceof NodeList){return selector}return root.querySelectorAll(selector)};function lozad(){var selector=arguments.length>0&&arguments[0]!==undefined?arguments[0]:".lozad";var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var _Object$assign=Object.assign({},defaultConfig,options),root=_Object$assign.root,rootMargin=_Object$assign.rootMargin,threshold=_Object$assign.threshold,load=_Object$assign.load,loaded=_Object$assign.loaded;var observer=void 0;if(typeof window!=="undefined"&&window.IntersectionObserver){observer=new IntersectionObserver(onIntersection(load,loaded),{root:root,rootMargin:rootMargin,threshold:threshold})}return{observe:function observe(){var elements=getElements(selector,root);for(var i=0;i #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b
');var $pd=$panel.find(".panel-disabled");setTimeout(function(){$pd.fadeOut("fast",function(){$pd.remove()})},500+300*(Math.random()*5))});$("body").on("click",'.panel a[data-toggle="panel"]',function(ev){ev.preventDefault();var $panel=$(this).closest(".panel");$panel.toggleClass("collapsed")});$("[data-loading-text]").each(function(i,el){var $this=$(el);$this.on("click",function(ev){$this.button("loading");setTimeout(function(){$this.button("reset")},1800)})});$('[data-toggle="popover"]').each(function(i,el){var $this=$(el),placement=attrDefault($this,"placement","right"),trigger=attrDefault($this,"trigger","click"),popover_class=$this.get(0).className.match(/(popover-[a-z0-9]+)/i);$this.popover({placement:placement,trigger:trigger});if(popover_class){$this.removeClass(popover_class[1]);$this.on("show.bs.popover",function(ev){setTimeout(function(){var $popover=$this.next();$popover.addClass(popover_class[1])},0)})}});$('[data-toggle="tooltip"]').each(function(i,el){var $this=$(el),placement=attrDefault($this,"placement","top"),trigger=attrDefault($this,"trigger","hover"),tooltip_class=$this.get(0).className.match(/(tooltip-[a-z0-9]+)/i);$this.tooltip({placement:placement,trigger:trigger});if(tooltip_class){$this.removeClass(tooltip_class[1]);$this.on("show.bs.tooltip",function(ev){setTimeout(function(){var $tooltip=$this.next();$tooltip.addClass(tooltip_class[1])},0)})}})})})(jQuery,window); -------------------------------------------------------------------------------- /layout/index.pug: -------------------------------------------------------------------------------- 1 | - const isChildPage = page.type === 'child' 2 | - const setting = isChildPage ? Object.assign({}, theme, page) : theme 3 | 4 | body.page-body 5 | .page-container 6 | include common/header 7 | 8 | .main-content 9 | nav.navbar.user-info-navbar(role='navigation') 10 | ul.user-info-menu.left-links.list-inline.list-unstyled 11 | li.hidden-sm.hidden-xs.hover-line 12 | a(href='#' data-toggle='sidebar') 13 | i.fas.fa-bars 14 | 15 | li.dropdown.hover-line.language-switcher 16 | - const defaultFlag = Array.isArray(setting.flag) ? (setting.flag.find(flag => flag.default) || setting.flag[0]) : setting.flag 17 | a.dropdown-toggle(href=url_for(defaultFlag.index || '/index.html') data-toggle='dropdown') 18 | img(src=url_for('images/flags/' + defaultFlag.icon + '.png') alt=defaultFlag.icon) 19 | = ' ' + defaultFlag.name 20 | 21 | ul.dropdown-menu.languages 22 | if Array.isArray(setting.flag) 23 | each flag in setting.flag 24 | li(class=flag.default ? 'active' : '') 25 | a(href=url_for(flag.index)) 26 | img(src=url_for('images/flags/' + flag.icon + '.png') alt=flag.icon) 27 | = ' ' + flag.name 28 | else 29 | li.active 30 | a(href=url_for(defaultFlag.index || '/index.html')) 31 | img(src=url_for('images/flags/' + defaultFlag.icon + '.png') alt=defaultFlag.icon) 32 | = ' ' + defaultFlag.name 33 | 34 | li.switch-mode.hover-line(onclick='switchNightMode()') 35 | a(href='#') 36 | svg.icon(t='1593061068148' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1681' width='16' height='16') 37 | path(d='M582.4 326.4c-140.8 0-256 115.2-256 256s115.2 256 256 256 256-115.2 256-256-115.2-256-256-256z m0 448c-70.4 0-131.2-36.8-164.8-92.8 12.8 3.2 27.2 4.8 40 4.8 121.6 0 219.2-99.2 219.2-219.2 0-17.6-1.6-35.2-6.4-52.8 60.8 32 102.4 96 102.4 169.6 1.6 104-84.8 190.4-190.4 190.4zM582.4 262.4c17.6 0 32-14.4 32-32v-128c0-17.6-14.4-32-32-32s-32 14.4-32 32v128c0 17.6 14.4 32 32 32zM262.4 582.4c0-17.6-14.4-32-32-32h-128c-17.6 0-32 14.4-32 32s14.4 32 32 32h128c17.6 0 32-14.4 32-32zM310.4 356.8c6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6 12.8-12.8 12.8-32 0-44.8l-91.2-91.2c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8l91.2 91.2zM944 220.8c-12.8-12.8-32-12.8-44.8 0l-91.2 91.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6l91.2-91.2c12.8-12.8 12.8-33.6 0-44.8zM310.4 808l-91.2 91.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6l91.2-91.2c12.8-12.8 12.8-32 0-44.8-11.2-11.2-32-11.2-44.8 0z' p-id='1682' fill='#707070') 38 | 39 | if setting.githubCorner 40 | != setting.githubCorner 41 | 42 | if setting.search 43 | section.sousuo 44 | .search 45 | .search-box 46 | span.search-icon(style='background: url(' + url_for('/images/search_icon.png') + ') 0px 0px; opacity: 1;') 47 | input#txt.search-input(type='text' autocomplete='off' placeholder='请输入关键字,按回车 / Enter 搜索') 48 | button#search-btn.search-btn 49 | i.fa.fa-search 50 | 51 | .box.search-hot-text#box(style='display: none;') 52 | ul 53 | 54 | .search-engine(style='display: none;') 55 | .search-engine-head 56 | strong.search-engine-tit 选择您的默认搜索引擎: 57 | .search-engine-tool 58 | | 搜索热词: 59 | span#hot-btn(style='background-image: url(' + url_for('/images/off_on.png') + ');') 60 | ul.search-engine-list.search-engine-list_zmki_ul 61 | 62 | script 63 | | search('#{url_for('/images/search_icon.png')}') 64 | 65 | if is_home() || isChildPage 66 | - const menuSetting = isChildPage ? page : theme 67 | - console.log(menuSetting); 68 | each e in menuSetting.menu 69 | if e.submenu 70 | each subMenu in e.submenu 71 | - const childPath = page.path.replace('index.html', '') + subMenu.config 72 | - const key = isChildPage ? childPath : subMenu.config 73 | - var menus = (site.data && site.data[key]) ? site.data[key] : (menuSetting[subMenu.config] || []) 74 | - const menuName = subMenu.name 75 | include common/group 76 | else 77 | - const childPath = page.path.replace('index.html', '') + e.config 78 | - const key = isChildPage ? childPath : e.config 79 | - var menus = (site.data && site.data[key]) ? site.data[key] : (menuSetting[e.config] || []) 80 | - const menuName = e.name 81 | include common/group 82 | 83 | if setting.js && setting.js.footer 84 | script(src=url_for(setting.js.footer)) 85 | -------------------------------------------------------------------------------- /_config.example.yml: -------------------------------------------------------------------------------- 1 | favicon: /favicon.ico 2 | banner: /images/webstack_banner_cn.png 3 | 4 | logo: 5 | expanded: /images/logo@2x.png 6 | collapsed: /images/logo-collapsed@2x.png 7 | dark: /images/logo_dark@2x.png 8 | 9 | flag: 10 | - name: Chinese 11 | default: true 12 | icon: flag-cn 13 | index: /index.html 14 | 15 | search: true 16 | 17 | userDefinedSearchData: 18 | custom: false 19 | thisSearch: https://www.baidu.com/s?wd= 20 | thisSearchIcon: url(https://www.baidu.com/favicon.ico) 21 | hotStatus: true 22 | data: 23 | - name: 百度 24 | img: url(https://www.baidu.com/favicon.ico) 25 | url: https://www.baidu.com/s?wd= 26 | 27 | githubCorner: '' 28 | 29 | expandAll: false 30 | menu: 31 | - name: 测试页面 32 | icon: far fa-star 33 | config: testPage 34 | - name: 常用工具 35 | icon: far fa-star 36 | config: hotTools 37 | - name: 其他工具 38 | icon: fas fa-tools 39 | submenu: 40 | - name: 开发工具 41 | icon: fas fa-tools 42 | config: devTools 43 | - name: 我的博客 44 | icon: fas fa-blog 45 | config: myBlog 46 | 47 | testPage: 48 | - name: Child Page 49 | url: /child 50 | img: /images/logos/myblog.png 51 | description: 子页面测试 52 | devTools: 53 | - name: Github 54 | url: https://github.com/ 55 | img: /images/logos/github.png 56 | description: 面向开源及私有软件项目的托管平台。 57 | - name: Github 58 | url: https://github.com/ 59 | img: /images/logos/github.png 60 | description: 面向开源及私有软件项目的托管平台。 61 | 62 | myBlog: 63 | - name: HCLonely Blog 64 | url: https://blog.hclonely.com/ 65 | img: /images/logos/myBlog.png 66 | description: 一个懒人的博客。 67 | 68 | about: 69 | url: /about/ 70 | icon: far fa-heart 71 | name: 关于本站 72 | 73 | aboutPage: 74 | website: 75 | head: 关于本站 76 | html: '

本站是hexo主题hexo-theme-webstack的demo站。

' 77 | webmaster: 78 | head: 关于站长 79 | name: HCLonely 80 | url: https://blog.hclonely.com/ 81 | img: /images/logos/myblog.png 82 | description: 懒人一个 83 | html: '

本站是HCLonely基于WebStackPage项目做的一款Hexo主题。

' 84 | 85 | since: 2020 86 | 87 | busuanzi: 88 | enable: true 89 | position: sidebar # 'footer','sidebar' 90 | pv: 本站总访问量$pv 91 | uv: 本站总访客数$uv 92 | 93 | custom: 94 | head: |- # 以下内容插入到标签内,可设置多行,注意每行开头至少四个空格 95 | 96 | 97 | body: |- # 以下内容插入到标签之前,可设置多行,注意每行开头至少四个空格 98 | 99 | 100 | 101 | js: 102 | header: /js/header.js 103 | footer: /js/footer.js 104 | jquery: /js/jquery-1.11.1.min.js 105 | bootstrap: /js/bootstrap.min.js 106 | TweenMax: /js/TweenMax.min.js 107 | resizeable: /js/resizeable.min.js 108 | joinable: /js/joinable.js 109 | xenonApi: /js/xenon-api.min.js 110 | xenonToggles: /js/xenon-toggles.min.js 111 | xenonCustom: /js/xenon-custom.min.js 112 | lozad: /js/lozad.min.js 113 | html5shiv: /js/html5shiv.min.js 114 | respond: /js/respond.min.js 115 | busuanzi: https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js 116 | 117 | css: 118 | hclonely: /css/hclonely.css 119 | fonts: //fonts.loli.net/css?family=Arimo:400,700,400italic 120 | linecons: /css/fonts/linecons/css/linecons.min.css 121 | fontawesome: /css/fonts/fontawesome/css/all.min.css 122 | bootstrap: /css/bootstrap.min.css 123 | xenonCore: /css/xenon-core.min.css 124 | xenonComponents: /css/xenon-components.min.css 125 | xenonSkins: /css/xenon-skins.min.css 126 | nav: /css/nav.min.css 127 | -------------------------------------------------------------------------------- /source/css/fonts/linecons/css/linecons-ie7-codes.css: -------------------------------------------------------------------------------- 1 | 2 | .linecons-music { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 3 | .linecons-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 4 | .linecons-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 5 | .linecons-heart { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 6 | .linecons-star { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 7 | .linecons-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 8 | .linecons-videocam { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 9 | .linecons-camera { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 10 | .linecons-photo { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 11 | .linecons-attach { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 12 | .linecons-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 13 | .linecons-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 14 | .linecons-tag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 15 | .linecons-thumbs-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 16 | .linecons-pencil { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 17 | .linecons-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 18 | .linecons-location { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 19 | .linecons-cup { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 20 | .linecons-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 21 | .linecons-doc { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 22 | .linecons-note { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 23 | .linecons-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 24 | .linecons-params { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 25 | .linecons-calendar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 26 | .linecons-sound { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 27 | .linecons-clock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 28 | .linecons-lightbulb { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 29 | .linecons-tv { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 30 | .linecons-desktop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 31 | .linecons-mobile { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 32 | .linecons-cd { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 33 | .linecons-inbox { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 34 | .linecons-globe { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 35 | .linecons-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 36 | .linecons-paper-plane { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 37 | .linecons-fire { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 38 | .linecons-graduation-cap { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 39 | .linecons-megaphone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 40 | .linecons-database { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 41 | .linecons-key { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 42 | .linecons-beaker { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 43 | .linecons-truck { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 44 | .linecons-money { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 45 | .linecons-food { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 46 | .linecons-shop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 47 | .linecons-diamond { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 48 | .linecons-t-shirt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 49 | .linecons-wallet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } -------------------------------------------------------------------------------- /source/css/fonts/linecons/css/linecons-ie7.css: -------------------------------------------------------------------------------- 1 | [class^="linecons-"], [class*=" linecons-"] { 2 | font-family: 'linecons'; 3 | font-style: normal; 4 | font-weight: normal; 5 | 6 | /* fix buttons height */ 7 | line-height: 1em; 8 | 9 | /* you can be more comfortable with increased icons size */ 10 | /* font-size: 120%; */ 11 | } 12 | 13 | .linecons-music { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 14 | .linecons-search { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 15 | .linecons-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 16 | .linecons-heart { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 17 | .linecons-star { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 18 | .linecons-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 19 | .linecons-videocam { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 20 | .linecons-camera { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 21 | .linecons-photo { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 22 | .linecons-attach { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 23 | .linecons-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 24 | .linecons-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 25 | .linecons-tag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 26 | .linecons-thumbs-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 27 | .linecons-pencil { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 28 | .linecons-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 29 | .linecons-location { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 30 | .linecons-cup { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 31 | .linecons-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 32 | .linecons-doc { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 33 | .linecons-note { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 34 | .linecons-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 35 | .linecons-params { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 36 | .linecons-calendar { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 37 | .linecons-sound { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 38 | .linecons-clock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 39 | .linecons-lightbulb { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 40 | .linecons-tv { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 41 | .linecons-desktop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 42 | .linecons-mobile { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 43 | .linecons-cd { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 44 | .linecons-inbox { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 45 | .linecons-globe { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 46 | .linecons-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 47 | .linecons-paper-plane { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 48 | .linecons-fire { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 49 | .linecons-graduation-cap { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 50 | .linecons-megaphone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 51 | .linecons-database { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 52 | .linecons-key { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 53 | .linecons-beaker { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 54 | .linecons-truck { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 55 | .linecons-money { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 56 | .linecons-food { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 57 | .linecons-shop { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 58 | .linecons-diamond { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 59 | .linecons-t-shirt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } 60 | .linecons-wallet { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); } -------------------------------------------------------------------------------- /README_CN.md: -------------------------------------------------------------------------------- 1 | # hexo-theme-webstack 2 | 3 | > 一款基于[WebStackPage](https://github.com/WebStackPage/WebStackPage.github.io)的 Hexo 主题。 4 | 5 | ![screenshot](https://github.com/HCLonely/hexo-theme-webstack/raw/master/screenshot/screenshot.png) 6 | 7 | ## 安装 8 | 9 | ### hexo >= 4.0 10 | 11 | ```shell 12 | git clone https://github.com/HCLonely/hexo-theme-webstack themes/webstack 13 | 14 | # 安装依赖 15 | npm install hexo-renderer-pug pug --save 16 | ``` 17 | 18 | ### hexo >= 5.0 19 | 20 | ```shell 21 | npm install hexo-theme-webstack --save 22 | ``` 23 | 24 | or 25 | 26 | ```shell 27 | cnpm install hexo-theme-webstack --save 28 | ``` 29 | 30 | ## 配置 31 | 32 | ### hexo >= 4.0 33 | 34 | 将`themes/webstack/`目录内的`_config.example.yml`文件复制到`博客根目录/source/_data/`目录内,并重命名为`webstack.yml`. 35 | 36 | 通过编辑`webstack.yml`进行配置。 37 | 38 | ### hexo >= 5.0 39 | 40 | - 如果是新安装本主题,安装完成后会在根目录生成一个`_config.webstack.yml`文件,直接编辑`_config.webstack.yml`文件进行配置即可。 41 | - 如果是主题升级,可以使用 hexo >= 4.0 的配置方法,也可以将原来的配置文件移动到根目录,并重命名为`_config.webstack.yml`. 42 | 43 | > 注意:`博客根目录/_config.webstack.yml`和`博客根目录/source/_data/webstack.yml`请只保留一个! 44 | 45 | ### favicon 46 | 47 | > 网站图标 48 | 49 | 示例: 50 | 51 | ```yml 52 | favicon: /favicon.ico 53 | ``` 54 | 55 | ### banner 56 | 57 | > [可选]分享网站到 twitter 和 facebook 时的图片。 58 | 59 | 示例: 60 | 61 | ```yml 62 | banner: /images/webstack_banner_cn.png 63 | ``` 64 | 65 | ### logo 66 | 67 | > 网站 logo 68 | 69 | - `expanded`: 侧边栏展开式左上角的 logo 70 | - `collapsed`: 侧边栏收起式左上角的 logo 71 | - `dark`: 顶栏为暗色时左上角的 logo, 仅 `about` 页面生效 72 | 73 | 示例: 74 | 75 | ```yml 76 | logo: 77 | expanded: /images/logo@2x.png 78 | collapsed: /images/logo-collapsed@2x.png 79 | dark: /images/logo_dark@2x.png 80 | ``` 81 | 82 | ### flag 83 | 84 | > 语言标识,多语言请配合[子页面](#子页面配置)使用 85 | 86 | - icon: 语言图标,默认仅有`flag-cn`和`flag-us`, 其他图标自行寻找存放于`主题目录/source/images/flags/` 87 | - name: 语言名称 88 | - default: 该语言是否为默认语言 89 | - index: 页面链接 90 | 91 | 示例: 92 | 93 | ```yml 94 | flag: 95 | - name: Chinese 96 | default: true 97 | icon: flag-cn 98 | index: /index.html 99 | ``` 100 | 101 | ### search 102 | 103 | > 是否显示搜索框 104 | 105 | 示例: 106 | 107 | ```yml 108 | search: true 109 | ``` 110 | 111 | ### userDefinedSearchData 112 | 113 | > 自定义搜索引擎 114 | 115 | - custom: 是否启用自定义配置 116 | - thisSearch: 当前搜索引擎的搜索链接 117 | - thisSearchIcon: 当前搜索引擎的图标链接,格式为`url(图片链接)` 118 | - hotStatus: 是否启用搜热词功能 119 | - data: 多搜索引擎配置 120 | - name: 搜索引擎名字 121 | img: 搜索引擎的搜索链接 122 | url: 搜索引擎的图标链接,格式为`url(图片链接)` 123 | 124 | 示例: 125 | 126 | ```yml 127 | userDefinedSearchData: 128 | custom: true 129 | thisSearch: https://www.baidu.com/s?wd= 130 | thisSearchIcon: url(https://www.baidu.com/favicon.ico) 131 | hotStatus: true 132 | data: 133 | - name: 百度 134 | img: url(https://www.baidu.com/favicon.ico) 135 | url: https://www.baidu.com/s?wd= 136 | - name: 谷歌 137 | img: url(https://www.google.com/favicon.ico) 138 | url: https://www.google.com/search?q= 139 | ``` 140 | 141 | ### githubCorner 142 | 143 | > 右上角的 [github corner](http://tholman.com/github-corners/) 144 | 145 | 示例: 146 | 147 | ```yml 148 | githubCorner: '' 149 | ``` 150 | 151 | ### since 152 | 153 | > 建站年份,显示在页面底部 154 | 155 | 示例: 156 | 157 | ```yml 158 | since: 2020 159 | ``` 160 | 161 | ### menu 162 | 163 | > **[主要]侧边栏菜单设置** 164 | 165 | - name: 分组名 166 | - icon: 分组图标 167 | - config: [主要]分组内容(详细设置查看[Config](#config)),如果有二级菜单则不需要此项! 168 | - submenu: 二级菜单,如果有二级菜单则不需要`config`, 此选项内容包含`name`, `icon`, `config`选项 169 | 170 | 示例: 171 | 172 | ```yml 173 | menu: 174 | - name: 常用工具 175 | icon: far fa-star 176 | config: hotTools 177 | - name: 其他工具 178 | icon: fas fa-tools 179 | submenu: 180 | - name: 开发工具 181 | icon: fas fa-tools 182 | config: devTools 183 | - name: 我的博客 184 | icon: fas fa-blog 185 | config: myBlog 186 | ``` 187 | 188 | ### expandAll 189 | 190 | > 是否将侧边栏全部展开 191 | 192 | 示例: 193 | 194 | ```yml 195 | expandAll: true 196 | ``` 197 | 198 | ### about 199 | 200 | > 侧边栏的关于本站 201 | 202 | - url: 关于页面链接 203 | - name: 在侧边栏显示的文字 204 | - icon: 图标 205 | 206 | 示例: 207 | 208 | ```yml 209 | about: 210 | url: /about/ 211 | icon: far fa-heart 212 | name: 关于本站 213 | ``` 214 | 215 | ### aboutPage 216 | 217 | > 关于页面设置 218 | 219 | 1. 生成关于页面 220 | 221 | ```shell 222 | hexo new page about 223 | ``` 224 | 225 | 2. 编辑`source/about/index.md`, 添加`type: 'about'` 226 | 227 | ```yml 228 | --- 229 | title: about 230 | date: 2020-06-04 18:11:54 231 | type: 'about' 232 | --- 233 | ``` 234 | 235 | 3. 编辑主题配置文件的`aboutPage` 236 | 237 | - website: 关于本站内容 238 | - head: 标题 239 | - html: 内容,支持`html`语法 240 | - webmaster: 关于站长内容 241 | - head: 标题 242 | - name: 站长名字 243 | - url: 链接 244 | - img: 头像 245 | - description: 描述 246 | - html: 其他内容,支持`html`语法 247 | 248 | 示例: 249 | 250 | ```yml 251 | aboutPage: 252 | website: 253 | head: 关于本站 254 | html: '

本站是hexo主题hexo-theme-webstack的demo站。

' 255 | webmaster: 256 | head: 关于站长 257 | name: HCLonely 258 | url: https://blog.hclonely.com/ 259 | img: /images/logos/myblog.png 260 | description: 懒人一个 261 | html: '

本站是HCLonely基于WebStackPage项目做的一款Hexo主题。

' 262 | ``` 263 | 264 | ### busuanzi 265 | 266 | > 不蒜子统计 267 | 268 | - enable: 是否启用不蒜子统计 269 | - position: 访问量显示位置, `footer`显示在页脚, `sidebar`显示在侧边栏 270 | - pv: 访问量显示的内容, `$pv`会被替换为访问量 271 | - uv: 访客数显示的内容, `$uv`会被替换为访客数 272 | 273 | 示例: 274 | 275 | ```yml 276 | busuanzi: 277 | enable: true 278 | position: sidebar 279 | pv: 本站总访问量$pv 280 | uv: 本站总访客数$uv 281 | ``` 282 | 283 | ### custom 284 | 285 | > 自定义`html`内容 286 | 287 | - head: 插入到``标签内的内容 288 | - body: 插入到``标签之前的内容 289 | 290 | 示例: 291 | 292 | ```yml 293 | custom: 294 | head: |- # 以下内容插入到标签内,可设置多行,注意每行开头至少四个空格 295 | 296 | 297 | body: |- # 以下内容插入到标签之前,可设置多行,注意每行开头至少四个空格 298 |
custom text
299 | 300 | ``` 301 | 302 | ## config 303 | 304 | > [主要]网站内容设置 305 | 306 | ### 参数 307 | 308 | - name: 网站名称 309 | - url: 网站链接 310 | - img: 网站图标 311 | - description: 网站描述 312 | 313 | 示例: 314 | 315 | ```yml 316 | - name: HCLonely Blog 317 | url: https://blog.hclonely.com/ 318 | img: /images/logos/myBlog.png 319 | description: 一个懒人的博客。 320 | ``` 321 | 322 | ### 关联设置名称并添加网站 323 | 324 | 在`menu`和`submenu`中设置的`config`的内容为此选项的名称。 325 | 326 | 例`menu`: 327 | 328 | ```yml 329 | menu: 330 | - name: 常用工具 331 | icon: far fa-star 332 | config: hotTools 333 | ``` 334 | 335 | 则`常用工具`分组里的网站有以下两种添加方式: 336 | 337 | - 在主题的`_config.yml`里添加: 338 | 339 | ```yml 340 | hotTools: 341 | - name: HCLonely Blog 342 | url: https://blog.hclonely.com/ 343 | img: /images/logos/myBlog.png 344 | description: 一个懒人的博客。 345 | - name: Github 346 | url: https://github.com/ 347 | img: /images/logos/github.png 348 | description: 面向开源及私有软件项目的托管平台。 349 | ``` 350 | 351 | - 在`站点根目录/source/_data/`(没有自行创建)内新建`hotTools.yml`文件,文件内容如下: 352 | 353 | ```yml 354 | - name: HCLonely Blog 355 | url: https://blog.hclonely.com/ 356 | img: /images/logos/myBlog.png 357 | description: 一个懒人的博客。 358 | - name: Github 359 | url: https://github.com/ 360 | img: /images/logos/github.png 361 | description: 面向开源及私有软件项目的托管平台。 362 | ``` 363 | 364 | > 以上两种方式任选一种即可,建议使用第二种。 365 | 366 | [配置详情](https://blog.hclonely.com/posts/3cd4fb34/) 367 | 368 | ## 子页面配置 369 | 370 | ### 创建子页面 371 | 372 | 使用`hexo new page xxx`创建子页面,这里包括下面的说明都以`hexo new page child`为例。 373 | 374 | ### 修改子页面配置文件 375 | 376 | 使用上面的命令生成子页面后,打开`根目录/source/child/index.md`文件(子页面配置文件),在两个`---`之间添加一行`type: 'child'`使此配置文件生效,子页面默认使用主页的配置,子页面优先使用子页面配置文件两个`---`之间的配置,各配置项和主页的配置功能相同。 377 | 378 | 示例请看[https://github.com/HCLonely/hexo-theme-webstack/raw/refs/heads/gh-pages/source/child/index.md](https://github.com/HCLonely/hexo-theme-webstack/raw/refs/heads/gh-pages/source/child/index.md) 379 | 380 | > 由于子页面在很久之前就基本做完了,后来比较忙就鸽了,可能有些配置或 bug 给忘了,有问题请及时反馈! 381 | -------------------------------------------------------------------------------- /source/css/hclonely.css: -------------------------------------------------------------------------------- 1 | .sousuo{ 2 | padding: 25px 0 35px 0; 3 | max-width: 717px; 4 | margin: 0 auto; 5 | } 6 | .search{ 7 | position: relative; 8 | width: 100%; 9 | margin: 0 auto; 10 | } 11 | .search-box{ 12 | position: relative; 13 | } 14 | .search-icon{ 15 | position: absolute; 16 | left: 3px; 17 | top: 5px; 18 | width: 40px; 19 | height: 40px; 20 | overflow: hidden; 21 | border-radius: 25px; 22 | cursor: pointer; 23 | opacity: 0; 24 | } 25 | .search-input{ 26 | width: 100%; 27 | height: 50px; 28 | line-height: 50px; 29 | font-size: 16px; 30 | color: #999; 31 | border: none; 32 | outline: none; 33 | padding-left: 45px; 34 | border: 1px solid #e6e6e6; 35 | border-radius: 10px; 36 | } 37 | .search-input:focus{ 38 | outline: none; 39 | border: 1px solid #2188ff; 40 | -webkit-box-shadow: 0 0 5px 0px rgba(71, 158, 245, 0.5); 41 | box-shadow: 0 0 5px 0px rgba(71, 158, 245, 0.5); 42 | } 43 | input::-webkit-input-placeholder{ 44 | font-size: 12px; 45 | letter-spacing: 1px; 46 | color: #ccc; 47 | } 48 | .search-btn{ 49 | position: absolute; 50 | right: 0; 51 | top: 0; 52 | width: 50px; 53 | line-height: 48px; 54 | background: transparent; 55 | border: none; 56 | font-size: 25px; 57 | color: #ddd; 58 | font-weight: bold; 59 | outline: none; 60 | padding: 0 10px; 61 | } 62 | .search-btn:hover{ color: #6b7184 } 63 | .search-btn i { margin: 0 } 64 | .search-hot-text{ 65 | position: absolute; 66 | z-index: 100; 67 | width: 100%; 68 | border-radius: 0 0 10px 10px; 69 | background: #FFF; 70 | box-shadow: 0px 4px 5px 0px #cccccc94; 71 | overflow: hidden; 72 | } 73 | .search-hot-text ul{ 74 | margin: 0; 75 | padding: 5px 0; 76 | } 77 | .search-hot-text ul li{ 78 | border-top: 1px solid #f2f2f2; 79 | line-height: 30px; 80 | font-size: 14px; 81 | padding: 0px 25px; 82 | color: #777; 83 | cursor: pointer; 84 | } 85 | .search-hot-text ul li.current{ 86 | background: #f1f1f1; 87 | color: #2196f3; 88 | } 89 | .search-hot-text ul li:hover{ 90 | background: #f1f1f1; 91 | color: #2196f3; 92 | cursor: pointer; 93 | } 94 | .search-hot-text ul li span{ 95 | display: inline-block; 96 | width: 20px; 97 | height: 20px; 98 | font-size: 12px; 99 | line-height: 20px; 100 | text-align: center; 101 | background: #e5e5e5; 102 | margin-right: 10px; 103 | border-radius: 10px; 104 | color: #999; 105 | } 106 | /* 搜索引擎 */ 107 | .search-engine{ 108 | position: absolute; 109 | top: 60px; 110 | left: 0; 111 | width: 100%; 112 | background: #FFF; 113 | padding: 15px 0 0 15px; 114 | border-radius: 5px; 115 | box-shadow: 0px 5px 20px 0px #d8d7d7; 116 | transition: all 0.3s; 117 | -moz-transition: all 0.3s; 118 | -webkit-transition: all 0.3s; 119 | -o-transition: all 0.3s; 120 | display: none; 121 | z-index: 999 122 | } 123 | .search-engine-head{ 124 | overflow: hidden; 125 | margin-bottom: 10px; 126 | padding-right: 15px; 127 | } 128 | .search-engine-tit{ 129 | float: left; 130 | margin: 0; 131 | font-size: 14px; 132 | color: #999; 133 | } 134 | .search-engine-tool{ 135 | float: right; 136 | font-size: 12px; 137 | color: #999; 138 | } 139 | .search-engine-tool > span{ 140 | float: right; 141 | display: inline-block; 142 | width: 25px; 143 | height: 15px; 144 | background-position: 0px 0px; 145 | cursor: pointer 146 | } 147 | .search-engine-tool > span.off{ background-position: -30px 0px } 148 | 149 | .search-engine ul::before{ 150 | content: ''; 151 | width: 0px; 152 | height: 0px; 153 | position: absolute; 154 | top: -15px; 155 | border-top: 8px solid transparent; 156 | border-right: 8px solid transparent; 157 | border-bottom: 8px solid #fff; 158 | border-left: 8px solid transparent; 159 | 160 | } 161 | .search-engine-list::after{ 162 | content: ''; 163 | width: 90px; 164 | height: 20px; 165 | position: absolute; 166 | top: -20px; 167 | left: 1px; 168 | } 169 | .search-engine-list li{ 170 | float: left; 171 | width: 30%; 172 | line-height: 30px; 173 | font-size: 14px; 174 | padding: 5px 10px 5px 10px; 175 | margin: 0 10px 10px 0; 176 | background: #f9f9f9; 177 | color: #999; 178 | cursor: pointer; 179 | padding: 0; 180 | } 181 | .search-engine-list li span{ 182 | width: 25px; 183 | height: 25px; 184 | border-radius: 15px; 185 | float: left; 186 | margin-right: 5px; 187 | margin-top: 2.5px; 188 | } 189 | body.night .board { 190 | background: #2c2e2f; 191 | box-shadow: 0px 0px 6px #00000061; 192 | } 193 | 194 | body.night .board a { 195 | color: #d6d6d6; 196 | } 197 | 198 | body.night .tpwidget_title_hook, 199 | body.night .tpwidget_text_hook { 200 | color: #fdfdfd; 201 | } 202 | 203 | body.night .sidebar-menu { 204 | border-right: #7f8080 1px solid; 205 | } 206 | 207 | body.night .user-info-navbar { 208 | background-color: #232323 !important; 209 | } 210 | body.night .dropdown-menu { 211 | background-color: #232323 !important; 212 | border: 1px solid #888686 !important; 213 | } 214 | 215 | body.night .user-info-navbar .user-info-menu>li>a { 216 | border-bottom: 1px solid #232323 !important; 217 | border-right: 1px solid #232323 !important; 218 | border-left: 1px solid #232323 !important; 219 | } 220 | 221 | body.night .user-info-navbar .user-info-menu>li>a, 222 | .user-info-navbar .user-info-menu>li>a { 223 | height: 76px !important; 224 | } 225 | 226 | body.night .user-info-navbar .user-info-menu>li>a:hover { 227 | border-right: 1px solid #888686 !important; 228 | border-left: 1px solid #888686 !important; 229 | } 230 | 231 | body.night .user-info-navbar .user-info-menu>li { 232 | border: 1px solid #232323 !important; 233 | } 234 | 235 | body.night .user-info-navbar .user-info-menu>li .dropdown-menu.languages li.active a { 236 | background-color: #232323 !important; 237 | color: #979898 !important; 238 | } 239 | 240 | body.night, 241 | body.night #body { 242 | background-color: #2c2e2f !important; 243 | color: #a9a9a9 !important; 244 | } 245 | 246 | body.night .text-gray { 247 | color: #f8f8f8; 248 | } 249 | 250 | body.night .xe-widget.xe-conversations { 251 | background: #2c2e2f; 252 | } 253 | 254 | body.night .box2 { 255 | border: 1px solid #3f4142; 256 | } 257 | 258 | body.night .xe-comment a { 259 | color: #d8d8d8; 260 | } 261 | 262 | body.night .xe-comment p { 263 | color: #979898 !important; 264 | } 265 | 266 | body.night .box2:hover { 267 | box-shadow: 0 26px 40px -24px rgb(255, 255, 255); 268 | -webkit-box-shadow: 0 26px 40px -24px rgba(130, 130, 130, 0.13); 269 | -moz-box-shadow: 0 26px 40px -24px rgba(0, 36, 100, 0.3); 270 | -webkit-transition: all 0.3s cubic-bezier(0.25, 0.1, 0.14, 1.43); 271 | -moz-transition: all 0.3s ease; 272 | -o-transition: all 0.3s ease; 273 | transition: all 0.3s ease-out; 274 | background-color: #232323 !important; 275 | } 276 | 277 | body.night .tpwthwidt .front_37Zqj25, 278 | body.night .tpwthwidt .widget_ctONpAN { 279 | background: #535656; 280 | color: red !important; 281 | } 282 | 283 | body.night .tpwthwidt .weakText_3SLbaEo { 284 | color: rgb(253, 253, 253); 285 | } 286 | 287 | body.night .tpwthwidt .baseText_31obwQ4 { 288 | color: #cccccc; 289 | } 290 | 291 | body.night footer.main-footer { 292 | border-top: 1px solid #414344b5; 293 | background-color: #2c2e2f; 294 | } 295 | 296 | body.night .footer-text a { 297 | color: #a9a9a9; 298 | } 299 | 300 | body.night .footer-text a:hover, 301 | body.night footer-text a:focus { 302 | color: #ffffff; 303 | text-decoration: none 304 | } 305 | 306 | body.night .panel { 307 | background: #2c2e2f; 308 | } 309 | 310 | body.night blockquote { 311 | border-left: 5px solid #000; 312 | } 313 | 314 | body.night .respond a { 315 | color: #cecece; 316 | } 317 | 318 | body.night .respond .textarea { 319 | background-color: #2b2b2b; 320 | margin-top: 50px; 321 | border-radius: 15px; 322 | padding: 10px; 323 | } 324 | 325 | body.night .submit { 326 | color: #a5a5a5; 327 | background-color: #0000008f; 328 | border: 0px; 329 | border-radius: 5px; 330 | padding: 5px 10px; 331 | font-size: 15px; 332 | float: right; 333 | margin-top: 10px; 334 | } 335 | 336 | body.night #search button i { 337 | color: #b1b1b1; 338 | } 339 | 340 | body.night #search-text { 341 | background-color: #464646; 342 | color: #bdbdbd; 343 | } 344 | 345 | body.night .search-type input:checked+label, 346 | .search-type input:hover+label { 347 | background-color: #969696; 348 | } 349 | 350 | body.night .s-type-list { 351 | display: none; 352 | position: absolute; 353 | top: 31px; 354 | padding: 9pt 0; 355 | width: 20pc; 356 | background: #535656; 357 | border-radius: 4px; 358 | box-shadow: 0 0 6px rgba(0, 0, 0, .16); 359 | } 360 | 361 | body.night .xe-comment-entry img { 362 | filter: brightness(95%); 363 | } 364 | 365 | body.night .search-input { 366 | border: 1px solid #424242; 367 | border-radius: 10px; 368 | background-color: #424242; 369 | } 370 | 371 | body.night .search-engine { 372 | background: #424242; 373 | box-shadow: 0px 5px 20px 0px #2c2e2f; 374 | } 375 | 376 | body.night .search-engine-list li { 377 | background: #424242; 378 | } 379 | 380 | .go-up{ 381 | right: 10px !important; 382 | position: fixed !important; 383 | bottom: 20px !important; 384 | height: 20px; 385 | z-index: 100; 386 | } 387 | 388 | body.night .go-up a { 389 | background-color: rgb(88 88 88) !important; 390 | padding: 15px 20px !important; 391 | border-radius: 50% !important; 392 | } 393 | 394 | body.night .go-up a:hover { 395 | background-color: rgb(123 123 123) !important; 396 | } 397 | 398 | .footer-inner #busuanzi_container_site_pv, 399 | .footer-inner #busuanzi_container_site_uv { 400 | font-weight: bold; 401 | } 402 | 403 | .footer-inner #busuanzi_value_site_pv, 404 | .footer-inner #busuanzi_value_site_uv { 405 | color: #373e4a; 406 | } 407 | 408 | .main-menu #busuanzi_value_site_pv, 409 | .main-menu #busuanzi_value_site_uv { 410 | float: right; 411 | } 412 | 413 | .sidebar-menu .main-menu a>i{ 414 | width: 16px; 415 | } 416 | -------------------------------------------------------------------------------- /source/js/header.js: -------------------------------------------------------------------------------- 1 | function search(searchIconUrl) { 2 | $(".search-icon").css("opacity", "1"); 3 | var listIndex = -1; 4 | var hotList = 0; 5 | var searchData = userDefinedSearchData.custom ? userDefinedSearchData : { 6 | "thisSearch": "https://www.baidu.com/s?wd=", 7 | "thisSearchIcon": "url(" + searchIconUrl + ")", 8 | "hotStatus": true, 9 | "custom": false, 10 | "data": [{ 11 | name: "百度", 12 | img: "url(" + searchIconUrl + ") -80px 0px", 13 | position: "0px 0px", 14 | url: "https://www.baidu.com/s?wd=" 15 | }, { 16 | name: "谷歌", 17 | img: "url(" + searchIconUrl + ") -105px 0px", 18 | position: "-40px 0px", 19 | url: "https://www.google.com/search?q=" 20 | }, { 21 | name: "必应", 22 | img: "url(" + searchIconUrl + ") -80px -25px", 23 | position: "0px -40px", 24 | url: "https://cn.bing.com/search?q=" 25 | }, { 26 | name: "好搜", 27 | img: "url(" + searchIconUrl + ") -105px -25px", 28 | position: "-40px -40px", 29 | url: "https://www.so.com/s?q=" 30 | }, { 31 | name: "搜狗", 32 | img: "url(" + searchIconUrl + ") -80px -50px", 33 | position: "0px -80px", 34 | url: "https://www.sogou.com/web?query=" 35 | }, { 36 | name: "淘宝", 37 | img: "url(" + searchIconUrl + ") -105px -50px", 38 | position: "-40px -80px", 39 | url: "https://s.taobao.com/search?q=" 40 | }, { 41 | name: "京东", 42 | img: "url(" + searchIconUrl + ") -80px -75px", 43 | position: "0px -120px", 44 | url: "http://search.jd.com/Search?keyword=" 45 | }, { 46 | name: "天猫", 47 | img: "url(" + searchIconUrl + ") -105px -75px", 48 | position: "-40px -120px", 49 | url: "https://list.tmall.com/search_product.htm?q=" 50 | }, { 51 | name: "1688", 52 | img: "url(" + searchIconUrl + ") -80px -100px", 53 | position: "0px -160px", 54 | url: "https://s.1688.com/selloffer/offer_search.htm?keywords=" 55 | }, { 56 | name: "知乎", 57 | img: "url(" + searchIconUrl + ") -105px -100px", 58 | position: "-40px -160px", 59 | url: "https://www.zhihu.com/search?type=content&q=" 60 | }, { 61 | name: "微博", 62 | img: "url(" + searchIconUrl + ") -80px -125px", 63 | position: "0px -200px", 64 | url: "https://s.weibo.com/weibo/" 65 | }, { 66 | name: "B站", 67 | img: "url(" + searchIconUrl + ") -105px -125px", 68 | position: "-40px -200px", 69 | url: "http://search.bilibili.com/all?keyword=" 70 | }, { 71 | name: "豆瓣", 72 | img: "url(" + searchIconUrl + ") -80px -150px", 73 | position: "0px -240px", 74 | url: "https://www.douban.com/search?source=suggest&q=" 75 | }, { 76 | name: "优酷", 77 | img: "url(" + searchIconUrl + ") -105px -150px", 78 | position: "-40px -240px", 79 | url: "https://so.youku.com/search_video/q_" 80 | }, { 81 | name: "GitHub", 82 | img: "url(" + searchIconUrl + ") -80px -175px", 83 | position: "0px -280px", 84 | url: "https://github.com/search?utf8=✓&q=" 85 | }] 86 | }; 87 | var localSearchData = localStorage.getItem("searchData"); 88 | if (localSearchData && (searchData.custom === localSearchData.custom)) { 89 | searchData = JSON.parse(localSearchData) 90 | } 91 | function filterChildren(element) { 92 | var thisText = $(element).contents().filter(function (index, content) { 93 | return content.nodeType === 3 94 | }).text().trim(); 95 | return thisText 96 | } 97 | function getHotkeyword(value) { 98 | $.ajax({ 99 | type: "GET", 100 | url: "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su", 101 | async: true, 102 | data: { 103 | wd: value 104 | }, 105 | dataType: "jsonp", 106 | jsonp: "cb", 107 | success: function (res) { 108 | $("#box ul").text(""); 109 | hotList = res.s.length; 110 | if (hotList) { 111 | $("#box").css("display", "block"); 112 | for (var i = 0; i < hotList; i++) { 113 | $("#box ul").append("
  • " + (i + 1) + " " + res.s[i] + "
  • "); 114 | $("#box ul li").eq(i).click(function () { 115 | var thisText = filterChildren(this); 116 | $("#txt").val(thisText); 117 | window.open(searchData.thisSearch + thisText); 118 | $("#box").css("display", "none") 119 | }); 120 | if (i === 0) { 121 | $("#box ul li").eq(i).css({ 122 | "border-top": "none" 123 | }); 124 | $("#box ul span").eq(i).css({ 125 | "color": "#fff", 126 | "background": "#f54545" 127 | }) 128 | } else { 129 | if (i === 1) { 130 | $("#box ul span").eq(i).css({ 131 | "color": "#fff", 132 | "background": "#ff8547" 133 | }) 134 | } else { 135 | if (i === 2) { 136 | $("#box ul span").eq(i).css({ 137 | "color": "#fff", 138 | "background": "#ffac38" 139 | }) 140 | } 141 | } 142 | } 143 | } 144 | } else { 145 | $("#box").css("display", "none") 146 | } 147 | }, 148 | error: function (res) { 149 | console.log(res) 150 | } 151 | }) 152 | } 153 | $("#txt").keyup(function (e) { 154 | if ($(this).val()) { 155 | if (e.keyCode == 38 || e.keyCode == 40 || !searchData.hotStatus) { 156 | return 157 | } 158 | getHotkeyword($(this).val()) 159 | } else { 160 | $(".search-clear").css("display", "none"); 161 | $("#box").css("display", "none") 162 | } 163 | }); 164 | $("#txt").keydown(function (e) { 165 | if (e.keyCode === 40) { 166 | listIndex === (hotList - 1) ? listIndex = 0 : listIndex++; 167 | $("#box ul li").eq(listIndex).addClass("current").siblings().removeClass("current"); 168 | var hotValue = filterChildren($("#box ul li").eq(listIndex)); 169 | $("#txt").val(hotValue) 170 | } 171 | if (e.keyCode === 38) { 172 | if (e.preventDefault) { 173 | e.preventDefault() 174 | } 175 | if (e.returnValue) { 176 | e.returnValue = false 177 | } 178 | listIndex === 0 || listIndex === -1 ? listIndex = (hotList - 1) : listIndex--; 179 | $("#box ul li").eq(listIndex).addClass("current").siblings().removeClass("current"); 180 | var hotValue = filterChildren($("#box ul li").eq(listIndex)); 181 | $("#txt").val(hotValue) 182 | } 183 | if (e.keyCode === 13) { 184 | window.open(searchData.thisSearch + $("#txt").val()); 185 | $("#box").css("display", "none"); 186 | $("#txt").blur(); 187 | $("#box ul li").removeClass("current"); 188 | listIndex = -1 189 | } 190 | }); 191 | $("#txt").focus(function () { 192 | $(".search-box").css("box-show", "inset 0 1px 2px rgba(27,31,35,.075), 0 0 0 0.2em rgba(3,102,214,.3)"); 193 | if ($(this).val() && searchData.hotStatus) { 194 | getHotkeyword($(this).val()) 195 | } 196 | }); 197 | $("#txt").blur(function () { 198 | setTimeout(function () { 199 | $("#box").css("display", "none") 200 | }, 250) 201 | }); 202 | for (var i = 0; i < searchData.data.length; i++) { 203 | $(".search-engine-list").append('
  • ' + 204 | searchData.data[i].name + "
  • ") 205 | } 206 | $(".search-icon, .search-engine").hover(function () { 207 | $(".search-engine").css("display", "block") 208 | }, function () { 209 | $(".search-engine").css("display", "none") 210 | }); 211 | $("#hot-btn").click(function () { 212 | $(this).toggleClass("off"); 213 | searchData.hotStatus = !searchData.hotStatus; 214 | localStorage.searchData = JSON.stringify(searchData) 215 | }); 216 | searchData.hotStatus ? $("#hot-btn").removeClass("off") : $("#hot-btn").addClass("off"); 217 | $(".search-engine-list li").click(function () { 218 | var index = $(this).index(); 219 | searchData.thisSearchIcon = searchData.custom ? searchData.data[index].img : searchData.data[index].position; 220 | if (searchData.custom) { 221 | $(".search-icon").css("background", searchData.thisSearchIcon + ' no-repeat').css("background-size", 'cover'); 222 | } else { 223 | $(".search-icon").css("background-position", searchData.thisSearchIcon); 224 | } 225 | searchData.thisSearch = searchData.data[index].url; 226 | $(".search-engine").css("display", "none"); 227 | localStorage.searchData = JSON.stringify(searchData) 228 | }); 229 | if (searchData.custom) { 230 | $(".search-icon").css("background", searchData.thisSearchIcon + ' no-repeat').css("background-size", 'cover'); 231 | } else { 232 | $(".search-icon").css("background-position", searchData.thisSearchIcon); 233 | } 234 | $("#search-btn").click(function () { 235 | var textValue = $("#txt").val(); 236 | if (textValue) { 237 | window.open(searchData.thisSearch + textValue); 238 | $("#box ul").html("") 239 | } else { 240 | layer.msg("请输入关键词!", { 241 | time: 500 242 | }, function () { 243 | $("#txt").focus() 244 | }) 245 | } 246 | }) 247 | } 248 | 249 | //夜间模式切换 250 | function switchNightMode() { 251 | var night = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0'; 252 | if (night == '0') { 253 | document.body.classList.add('night'); 254 | document.cookie = "night=1;path=/" 255 | } else { 256 | document.body.classList.remove('night'); 257 | document.cookie = "night=0;path=/" 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hexo-theme-webstack 2 | 3 | [中文文档](https://github.com/HCLonely/hexo-theme-webstack/blob/master/README_CN.md) 4 | 5 | > A Hexo theme based on [WebStackPage](https://github.com/WebStackPage/WebStackPage.github.io). 6 | 7 | ![screenshot](https://github.com/HCLonely/hexo-theme-webstack/raw/master/screenshot/screenshot.png) 8 | 9 | ## Installation 10 | 11 | ### hexo >= 4.0 12 | 13 | ```shell 14 | git clone https://github.com/HCLonely/hexo-theme-webstack themes/webstack 15 | 16 | # Install dependencies 17 | npm install hexo-renderer-pug pug --save 18 | ``` 19 | 20 | ### hexo >= 5.0 21 | 22 | ```shell 23 | npm install hexo-theme-webstack --save 24 | ``` 25 | 26 | or 27 | 28 | ```shell 29 | cnpm install hexo-theme-webstack --save 30 | ``` 31 | 32 | ## Configuration 33 | 34 | ### hexo >= 4.0 35 | 36 | Copy the `_config.example.yml` file in the `themes/webstack/` directory to the `rootDir/source/_data/` directory and rename it to `webstack.yml`. 37 | 38 | Configure it by editing `webstack.yml`. 39 | 40 | ### hexo >= 5.0 41 | 42 | - If this theme is newly installed, a `_config.webstack.yml` file will be generated in the root directory after the installation is complete, and you can directly edit the `_config.webstack.yml` file for configuration. 43 | - If it is a theme upgrade, you can use the configuration method of hexo >= 4.0, or you can move the original configuration file to the root directory and rename it to `_config.webstack.yml`. 44 | 45 | > Note: Please keep only one of `rootDir/_config.webstack.yml` and `rootDir/source/_data/webstack.yml`! 46 | 47 | ### favicon 48 | 49 | > Website icon. 50 | 51 | Examples: 52 | ```yml 53 | favicon: /favicon.ico 54 | ``` 55 | 56 | ### banner 57 | 58 | > [Optional] Banner when sharing website to twitter and facebook. 59 | 60 | Examples: 61 | ```yml 62 | banner: /images/webstack_banner_cn.png 63 | ``` 64 | 65 | ### logo 66 | 67 | > Website logo. 68 | 69 | - `expanded`: The logo in the upper left corner of the expanded sidebar. 70 | - `collapsed`: The logo in the upper left corner of the retractable sidebar. 71 | - `dark`: The logo in the upper left corner when the top bar is dark, only the `about` page takes effect. 72 | 73 | Examples: 74 | ```yml 75 | logo: 76 | expanded: /images/logo@2x.png 77 | collapsed: /images/logo-collapsed@2x.png 78 | dark: /images/logo_dark@2x.png 79 | ``` 80 | 81 | ### flag 82 | 83 | > Language identifier, multi-language please cooperate with [Subpage](#Subpage-configuration) use. 84 | 85 | - icon: Language icons, by default only `flag-cn` and `flag-us`, other icons please look for and store in `theme directory/source/images/flags/`. 86 | - name: Language name 87 | - default: Whether the language is the default language 88 | - index: The page link 89 | 90 | Examples: 91 | ```yml 92 | flag: 93 | - name: Chinese 94 | default: true 95 | icon: flag-cn 96 | index: /index.html 97 | ``` 98 | 99 | ### search 100 | 101 | > Whether to show search box 102 | 103 | Examples: 104 | ```yml 105 | search: true 106 | ``` 107 | 108 | ### userDefinedSearchData 109 | 110 | > Custom search engine 111 | 112 | - custom: Whether to enable custom configuration 113 | - thisSearch: Current search engine search link 114 | - thisSearchIcon: Current search engine icon link, format: `url(图片链接)` 115 | - hotStatus: Whether to enable hot word search function 116 | - data: Multiple search engine configurations 117 | - name: Search engine name 118 | img: Search engine search link 119 | url: Search engine icon link, format: `url(图片链接)` 120 | 121 | 示例: 122 | ```yml 123 | userDefinedSearchData: 124 | custom: true 125 | thisSearch: https://www.baidu.com/s?wd= 126 | thisSearchIcon: url(https://www.baidu.com/favicon.ico) 127 | hotStatus: true 128 | data: 129 | - name: 百度 130 | img: url(https://www.baidu.com/favicon.ico) 131 | url: https://www.baidu.com/s?wd= 132 | - name: 谷歌 133 | img: url(https://www.google.com/favicon.ico) 134 | url: https://www.google.com/search?q= 135 | ``` 136 | 137 | ### githubCorner 138 | 139 | > [Github corner](http://tholman.com/github-corners/) in the upper right corner. 140 | 141 | Examples: 142 | ```yml 143 | githubCorner: '' 144 | ``` 145 | 146 | ### since 147 | 148 | > Year of site establishment, shown at the bottom of the page. 149 | 150 | Examples: 151 | ```yml 152 | since: 2020 153 | ``` 154 | 155 | ### menu 156 | 157 | > **[Main] Sidebar menu settings** 158 | 159 | - name: Group name 160 | - icon: Group icon 161 | - config: [Main] Grouped content (see [Config](#config) for detailed settings), if there is a submenu, this item is not needed! 162 | - submenu: If there is a submenu, `config` is not required, this option contains `name`, `icon`, `config` options. 163 | 164 | Examples: 165 | ```yml 166 | menu: 167 | - name: 常用工具 168 | icon: far fa-star 169 | config: hotTools 170 | - name: 其他工具 171 | icon: fas fa-tools 172 | submenu: 173 | - name: 开发工具 174 | icon: fas fa-tools 175 | config: devTools 176 | - name: 我的博客 177 | icon: fas fa-blog 178 | config: myBlog 179 | ``` 180 | 181 | ### expandAll 182 | 183 | > Whether to expand the sidebar. 184 | 185 | 示例: 186 | 187 | ```yml 188 | expandAll: true 189 | ``` 190 | 191 | ### about 192 | 193 | > About this site in the sidebar. 194 | 195 | - url: The link of about page. 196 | - name: Text displayed in the sidebar. 197 | - icon: Icon. 198 | 199 | Examples: 200 | ```yml 201 | about: 202 | url: /about/ 203 | icon: far fa-heart 204 | name: 关于本站 205 | ``` 206 | 207 | ### aboutPage 208 | 209 | > About page settings. 210 | 211 | 1. Generate about page. 212 | 213 | ```shell 214 | hexo new page about 215 | ``` 216 | 217 | 2. Edit `source/about/index.md` and add `type:'about'` 218 | 219 | ```yml 220 | --- 221 | title: about 222 | date: 2020-06-04 18:11:54 223 | type: 'about' 224 | --- 225 | ``` 226 | 227 | 3. Editing `aboutPage` in theme configuration files. 228 | 229 | - website: The content of about this site. 230 | - head: Headline. 231 | - html: Content, support `html` syntax. 232 | - webmaster: The content of about webmaster. 233 | - head: Headline. 234 | - name: Webmaster's name 235 | - url: Link. 236 | - img: Avatar. 237 | - description: Description. 238 | - html: Content, support `html` syntax. 239 | 240 | Examples: 241 | ```yml 242 | aboutPage: 243 | website: 244 | head: 关于本站 245 | html: '

    本站是hexo主题hexo-theme-webstack的demo站。

    ' 246 | webmaster: 247 | head: 关于站长 248 | name: HCLonely 249 | url: https://blog.hclonely.com/ 250 | img: /images/logos/myblog.png 251 | description: 懒人一个 252 | html: '

    本站是HCLonely基于WebStackPage项目做的一款Hexo主题。

    ' 253 | ``` 254 | 255 | ### busuanzi 256 | 257 | > Website statistics by busuanzi. 258 | 259 | - enable: Whether to enable this feature. 260 | - position: The number of visits is displayed, `footer` is displayed in the footer, and `sidebar` is displayed in the sidebar. 261 | - pv: The number of visits displayed by the traffic, `$pv` will be replaced by the number of visits. 262 | - uv: The number of visitors displayed, `$uv` will be replaced by the number of visitors. 263 | 264 | Examples: 265 | ```yml 266 | busuanzi: 267 | enable: true 268 | position: sidebar 269 | pv: 本站总访问量$pv 270 | uv: 本站总访客数$uv 271 | ``` 272 | 273 | ### custom 274 | 275 | > Customize `html` content. 276 | 277 | - head: Content inserted into the `` tag. 278 | - body: Content inserted before the `` tag. 279 | 280 | Examples: 281 | ```yml 282 | custom: 283 | head: |- # The following content is inserted into the tag, you can set up multiple lines, pay attention to at least four spaces at the beginning of each line. 284 | 285 | 286 | body: |- # Insert the following content before the tag, you can set multiple lines, pay attention to at least four spaces at the beginning of each line. 287 |
    custom text
    288 | 289 | ``` 290 | 291 | ## config 292 | 293 | > [Main] Website content settings 294 | 295 | ### Parameter 296 | 297 | - name: Website name. 298 | - url: Website link. 299 | - img: Website icon. 300 | - description: Website description. 301 | 302 | Examples: 303 | ```yml 304 | - name: HCLonely Blog 305 | url: https://blog.hclonely.com/ 306 | img: /images/logos/myBlog.png 307 | description: 一个懒人的博客。 308 | ``` 309 | 310 | ### Associate setting name and add website 311 | 312 | The content of `config` set in `menu` and `submenu` is the name of this option. 313 | 314 | Examples `menu`: 315 | ```yml 316 | menu: 317 | - name: Common tools 318 | icon: far fa-star 319 | config: hotTools 320 | ``` 321 | There are two ways to add websites in the `Common Tools` group: 322 | 323 | - In the theme's `_config.yml` add: 324 | ```yml 325 | hotTools: 326 | - name: HCLonely Blog 327 | url: https://blog.hclonely.com/ 328 | img: /images/logos/myBlog.png 329 | description: 一个懒人的博客。 330 | - name: Github 331 | url: https://github.com/ 332 | img: /images/logos/github.png 333 | description: 面向开源及私有软件项目的托管平台。 334 | ``` 335 | - Create a new `hotTools.yml` file in the `source/_data/` (not created by yourself), the content of the file is as follows: 336 | ```yml 337 | - name: HCLonely Blog 338 | url: https://blog.hclonely.com/ 339 | img: /images/logos/myBlog.png 340 | description: 一个懒人的博客。 341 | - name: Github 342 | url: https://github.com/ 343 | img: /images/logos/github.png 344 | description: 面向开源及私有软件项目的托管平台。 345 | ``` 346 | 347 | Either of the above two methods can be selected. The second method is recommended. 348 | 349 | ## Subpage configuration 350 | 351 | ### Create subpage 352 | 353 | Use `hexo new page xxx` to create a child page, including the following descriptions, using `hexo new page child` as an example. 354 | 355 | ### Modify the subpage configuration file 356 | 357 | After using the above command to generate the subpage, open the `root directory/source/child/index.md` file (subpage configuration file), and add a line `type:'child'` between the two `---` This configuration file takes effect. The sub-page uses the configuration of the homepage by default, and the sub-page preferentially uses the configuration between the two `---` sub-page configuration files. Each configuration item has the same configuration function as the homepage. 358 | 359 | See the example[https://github.com/HCLonely/hexo-theme-webstack/raw/refs/heads/gh-pages/source/child/index.md](https://github.com/HCLonely/hexo-theme-webstack/raw/refs/heads/gh-pages/source/child/index.md) 360 | 361 | > Since the subpage was basically completed a long time ago, it was later put on hold when it was busy. There may be some configuration or bugs that have been forgotten. If you have any questions, please feedback in time! 362 | -------------------------------------------------------------------------------- /source/js/joinable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Bunch of scripts included in one file to reduce number HTTP requests 4 | * 5 | */ 6 | 7 | 8 | 9 | /*! 10 | Autosize v1.18.9 - 2014-05-27 11 | Automatically adjust textarea height based on user input. 12 | (c) 2014 Jack Moore - http://www.jacklmoore.com/autosize 13 | license: http://www.opensource.org/licenses/mit-license.php 14 | */ 15 | (function(e){var t,o={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},i='