├── .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 本站是hexo主题hexo-theme-webstack的demo站。 本站是HCLonely基于WebStackPage项目做的一款Hexo主题。
'
77 | webmaster:
78 | head: 关于站长
79 | name: HCLonely
80 | url: https://blog.hclonely.com/
81 | img: /images/logos/myblog.png
82 | description: 懒人一个
83 | html: '
'
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 |  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 |
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("
"); 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('
") 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 |  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 |
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='',n=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],s=e(i).data("autosize",!0)[0];s.style.lineHeight="99px","99px"===e(s).css("lineHeight")&&n.push("lineHeight"),s.style.lineHeight="",e.fn.autosize=function(i){return this.length?(i=e.extend({},o,i||{}),s.parentNode!==document.body&&e(document.body).append(s),this.each(function(){function o(){var t,o=window.getComputedStyle?window.getComputedStyle(u,null):!1;o?(t=u.getBoundingClientRect().width,(0===t||"number"!=typeof t)&&(t=parseInt(o.width,10)),e.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(e,i){t-=parseInt(o[i],10)})):t=p.width(),s.style.width=Math.max(t,0)+"px"}function a(){var a={};if(t=u,s.className=i.className,s.id=i.id,d=parseInt(p.css("maxHeight"),10),e.each(n,function(e,t){a[t]=p.css(t)}),e(s).css(a).attr("wrap",p.attr("wrap")),o(),window.chrome){var r=u.style.width;u.style.width="0px",u.offsetWidth,u.style.width=r}}function r(){var e,n;t!==u?a():o(),s.value=!u.value&&i.placeholder?(p.attr("placeholder")||"")+i.append:u.value+i.append,s.style.overflowY=u.style.overflowY,n=parseInt(u.style.height,10),s.scrollTop=0,s.scrollTop=9e4,e=s.scrollTop,d&&e>d?(u.style.overflowY="scroll",e=d):(u.style.overflowY="hidden",c>e&&(e=c)),e+=w,n!==e&&(u.style.height=e+"px",f&&i.callback.call(u,u))}function l(){clearTimeout(h),h=setTimeout(function(){var e=p.width();e!==g&&(g=e,r())},parseInt(i.resizeDelay,10))}var d,c,h,u=this,p=e(u),w=0,f=e.isFunction(i.callback),z={height:u.style.height,overflow:u.style.overflow,overflowY:u.style.overflowY,wordWrap:u.style.wordWrap,resize:u.style.resize},g=p.width(),y=p.css("resize");p.data("autosize")||(p.data("autosize",!0),("border-box"===p.css("box-sizing")||"border-box"===p.css("-moz-box-sizing")||"border-box"===p.css("-webkit-box-sizing"))&&(w=p.outerHeight()-p.height()),c=Math.max(parseInt(p.css("minHeight"),10)-w||0,p.height()),p.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word"}),"vertical"===y?p.css("resize","none"):"both"===y&&p.css("resize","horizontal"),"onpropertychange"in u?"oninput"in u?p.on("input.autosize keyup.autosize",r):p.on("propertychange.autosize",function(){"value"===event.propertyName&&r()}):p.on("input.autosize",r),i.resizeDelay!==!1&&e(window).on("resize.autosize",l),p.on("autosize.resize",r),p.on("autosize.resizeIncludeStyle",function(){t=null,r()}),p.on("autosize.destroy",function(){t=null,clearTimeout(h),e(window).off("resize",l),p.off("autosize").off(".autosize").css(z).removeData("autosize")}),r())})):this}})(window.jQuery||window.$);
16 |
17 |
18 | /* Scroll Monitor */
19 | (function(e){if(typeof define!=="undefined"&&define.amd){define(["jquery"],e)}else if(typeof module!=="undefined"&&module.exports){var t=require("jquery");module.exports=e(t)}else{window.scrollMonitor=e(jQuery)}})(function(e){function m(){return window.innerHeight||document.documentElement.clientHeight}function y(){t.viewportTop=n.scrollTop();t.viewportBottom=t.viewportTop+t.viewportHeight;t.documentHeight=r.height();if(t.documentHeight!==d){g=i.length;while(g--){i[g].recalculateLocation()}d=t.documentHeight}}function b(){t.viewportHeight=m();y();x()}function E(){clearTimeout(w);w=setTimeout(b,100)}function x(){S=i.length;while(S--){i[S].update()}S=i.length;while(S--){i[S].triggerCallbacks()}}function T(n,r){function x(e){if(e.length===0){return}E=e.length;while(E--){S=e[E];S.callback.call(i,v);if(S.isOne){e.splice(E,1)}}}var i=this;this.watchItem=n;if(!r){this.offsets=p}else if(r===+r){this.offsets={top:r,bottom:r}}else{this.offsets=e.extend({},p,r)}this.callbacks={};for(var d=0,m=h.length;d