├── src ├── view │ ├── demo │ │ ├── tag │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── about │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── banner │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── bottom │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── client │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── comment │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── cover │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── crumbs │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── culture │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── iconfont │ │ │ ├── index.less │ │ │ └── index.js │ │ ├── index │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── menu │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── post │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── service │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── sidebar │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── sprite │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── friend-link │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── pagination │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── post-list │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── product-list │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── sidebar-tool │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ ├── guestbook-form │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ │ └── login-register-form │ │ │ ├── index.less │ │ │ ├── index.js │ │ │ └── index.ejs │ └── template-1 │ │ ├── index │ │ ├── index.less │ │ ├── index.js │ │ └── index.ejs │ │ ├── post │ │ ├── index.less │ │ ├── index.js │ │ └── index.ejs │ │ ├── posts │ │ ├── index.less │ │ ├── index.js │ │ └── index.ejs │ │ ├── search │ │ ├── index.less │ │ ├── index.js │ │ └── index.ejs │ │ ├── tag │ │ ├── index.less │ │ ├── index.js │ │ └── index.ejs │ │ ├── guestbook │ │ ├── index.less │ │ ├── index.js │ │ └── index.ejs │ │ ├── products │ │ ├── index.less │ │ ├── index.js │ │ └── index.ejs │ │ ├── script │ │ └── qrcode │ │ │ ├── helper │ │ │ └── to-sjis-browser.js │ │ │ ├── lib │ │ │ ├── can-promise.js │ │ │ ├── core │ │ │ │ ├── version-check.js │ │ │ │ ├── finder-pattern.js │ │ │ │ ├── byte-data.js │ │ │ │ ├── bit-buffer.js │ │ │ │ ├── error-correction-level.js │ │ │ │ ├── regex.js │ │ │ │ ├── format-info.js │ │ │ │ ├── numeric-data.js │ │ │ │ ├── bit-matrix.js │ │ │ │ ├── kanji-data.js │ │ │ │ ├── polynomial.js │ │ │ │ ├── reed-solomon-encoder.js │ │ │ │ ├── utils.js │ │ │ │ ├── alphanumeric-data.js │ │ │ │ ├── galois-field.js │ │ │ │ ├── alignment-pattern.js │ │ │ │ ├── error-correction-code.js │ │ │ │ ├── mode.js │ │ │ │ └── version.js │ │ │ ├── renderer │ │ │ │ ├── terminal.js │ │ │ │ ├── svg.js │ │ │ │ ├── terminal │ │ │ │ │ ├── terminal.js │ │ │ │ │ └── terminal-small.js │ │ │ │ ├── canvas.js │ │ │ │ ├── utf8.js │ │ │ │ ├── png.js │ │ │ │ ├── svg-tag.js │ │ │ │ └── utils.js │ │ │ ├── index.js │ │ │ ├── browser.js │ │ │ └── server.js │ │ │ ├── license │ │ │ ├── CHANGELOG.md │ │ │ ├── package.json │ │ │ └── bin │ │ │ └── qrcode │ │ ├── public │ │ ├── footer.ejs │ │ └── header.ejs │ │ ├── main.js │ │ └── main.less ├── public │ ├── footer.ejs │ └── header.ejs ├── script │ └── test.js ├── images │ ├── logo.png │ ├── wechat.jpg │ ├── favicon.png │ ├── sprite │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ └── 7.png │ ├── logo-white.png │ ├── demo │ │ ├── client-1.png │ │ ├── client-2.png │ │ ├── client-3.png │ │ ├── client-4.png │ │ ├── client-5.png │ │ ├── client-6.png │ │ ├── client-7.png │ │ ├── client-8.png │ │ ├── client-9.png │ │ ├── client-10.png │ │ ├── client-11.png │ │ └── client-12.png │ ├── icon │ │ ├── icon-cs.png │ │ ├── icon-phone.png │ │ ├── icon-qrcode.png │ │ ├── icon-wechat.png │ │ └── icon-arrow-top.png │ └── image-placeholder.jpg ├── sprite │ ├── sprite.png │ └── sprite.css ├── iconfont │ ├── dashicons.eot │ ├── dashicons.ttf │ └── dashicons.woff2 ├── components │ ├── crumbs │ │ ├── 1 │ │ │ ├── crumbs.less │ │ │ ├── crumbs.ejs │ │ │ └── Snipaste_2022-07-26_23-06-33.png │ │ └── 2 │ │ │ ├── crumbs.ejs │ │ │ └── crumbs.less │ ├── about │ │ └── 1 │ │ │ ├── about-1.png │ │ │ ├── Snipaste_2020-12-21_21-35-42.png │ │ │ ├── about.ejs │ │ │ └── about.less │ ├── banner │ │ ├── 1 │ │ │ ├── Snipaste_2020-12-20_23-40-36.png │ │ │ ├── banner.ejs │ │ │ └── banner.less │ │ ├── 2 │ │ │ ├── Snipaste_2020-12-20_23-40-36.png │ │ │ ├── banner.less │ │ │ └── banner.ejs │ │ ├── banner-1.jpg │ │ ├── banner-2.jpg │ │ └── banner-3.jpg │ ├── cover │ │ └── 1 │ │ │ ├── cover-1.jpg │ │ │ ├── cover.ejs │ │ │ └── cover.less │ ├── culture │ │ └── 1 │ │ │ ├── culture-1.jpg │ │ │ ├── Snipaste_2020-12-21_22-19-19.png │ │ │ ├── culture.ejs │ │ │ └── culture.less │ ├── service │ │ ├── 1 │ │ │ ├── service-1-1.jpg │ │ │ ├── service-1-2.jpg │ │ │ ├── service-1-3.jpg │ │ │ ├── service-1-4.jpg │ │ │ ├── Snipaste_2020-12-21_23-37-28.png │ │ │ ├── service.less │ │ │ └── service.ejs │ │ ├── 2 │ │ │ ├── service-2-1.png │ │ │ ├── service-2-2.png │ │ │ ├── service-2-3.png │ │ │ ├── service-2-4.png │ │ │ ├── service.less │ │ │ └── service.ejs │ │ └── 3 │ │ │ ├── service-3-1.png │ │ │ ├── service-3-2.png │ │ │ ├── service-3-3.png │ │ │ ├── service-3-4.png │ │ │ ├── service.ejs │ │ │ └── service.less │ ├── bottom │ │ ├── 1 │ │ │ ├── Snipaste_2020-12-21_23-28-47.png │ │ │ ├── bottom.less │ │ │ └── bottom.ejs │ │ └── 2 │ │ │ ├── Snipaste_2022-07-16_11-20-43.png │ │ │ ├── bottom.less │ │ │ └── bottom.ejs │ ├── client │ │ └── 1 │ │ │ ├── Snipaste_2022-07-26_23-05-38.png │ │ │ ├── client.less │ │ │ └── client.ejs │ ├── menu │ │ ├── 1 │ │ │ ├── Snipaste_2020-12-20_22-03-24.png │ │ │ ├── menu.ejs │ │ │ └── menu.less │ │ ├── 2 │ │ │ ├── Snipaste_2020-12-20_22-04-02.png │ │ │ ├── menu.less │ │ │ └── menu.ejs │ │ ├── 3 │ │ │ ├── Snipaste_2022-07-15_23-02-44.png │ │ │ ├── menu.ejs │ │ │ └── menu.less │ │ └── 4 │ │ │ ├── menu.ejs │ │ │ └── menu.less │ ├── post │ │ ├── 1 │ │ │ ├── Snipaste_2022-07-26_23-04-19.png │ │ │ ├── post.ejs │ │ │ └── post.less │ │ ├── 2 │ │ │ ├── post.less │ │ │ └── post.ejs │ │ └── 3 │ │ │ ├── post.less │ │ │ └── post.ejs │ ├── friend-link │ │ └── 1 │ │ │ ├── Snipaste_2020-12-21_23-12-32.png │ │ │ ├── friend-link.less │ │ │ └── friend-link.ejs │ ├── pagination │ │ └── 1 │ │ │ ├── Snipaste_2020-12-21_23-23-49.png │ │ │ ├── pagination.ejs │ │ │ └── pagination.less │ ├── post-list │ │ ├── 1 │ │ │ ├── post-list.ejs │ │ │ └── post-list.less │ │ ├── 2 │ │ │ ├── post-list.ejs │ │ │ └── post-list.less │ │ ├── 3 │ │ │ ├── post-list.less │ │ │ └── post-list.ejs │ │ ├── 4 │ │ │ ├── post-list.ejs │ │ │ └── post-list.less │ │ └── 5 │ │ │ ├── post-list.less │ │ │ └── post-list.ejs │ ├── comment │ │ └── 1 │ │ │ ├── comment.less │ │ │ └── comment.ejs │ ├── product-list │ │ ├── 1 │ │ │ ├── product-list.ejs │ │ │ └── product-list.less │ │ └── 2 │ │ │ ├── product-list.ejs │ │ │ └── product-list.less │ ├── sidebar │ │ └── 1 │ │ │ ├── sidebar.less │ │ │ └── sidebar.ejs │ ├── guestbook-form │ │ ├── 1 │ │ │ ├── guestbook-form.less │ │ │ └── guestbook-form.ejs │ │ └── 2 │ │ │ ├── guestbook-form.less │ │ │ └── guestbook-form.ejs │ ├── tag-list │ │ └── 1 │ │ │ ├── tag-list.less │ │ │ └── tag-list.ejs │ ├── login-register-form │ │ ├── 1 │ │ │ ├── login-register-form.ejs │ │ │ └── login-register-form.less │ │ ├── 2 │ │ │ ├── login-register-form.ejs │ │ │ └── login-register-form.less │ │ └── 3 │ │ │ ├── login-register-form.ejs │ │ │ └── login-register-form.less │ └── sidebar-tool │ │ └── 1 │ │ ├── sidebar-tool.ejs │ │ └── sidebar-tool.less ├── entry.js ├── style │ ├── style.less │ ├── demo.less │ ├── public.less │ └── reset.less └── route.js ├── .gitignore ├── .babelrc ├── postcss.config.js ├── LICENSE ├── package.json └── readme.md /src/view/demo/tag/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ -------------------------------------------------------------------------------- /src/view/demo/about/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/banner/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/bottom/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/client/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/comment/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/cover/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/crumbs/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/culture/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/iconfont/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/index/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/menu/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/post/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/service/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/sidebar/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/sprite/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/friend-link/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/pagination/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/post-list/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/product-list/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/sidebar-tool/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/index/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/post/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/posts/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/search/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/tag/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/guestbook-form/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/guestbook/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/products/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/demo/login-register-form/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env"] 3 | } -------------------------------------------------------------------------------- /src/public/footer.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/script/test.js: -------------------------------------------------------------------------------- 1 | export default () => { 2 | console.log('这是测试的自定义公共模块') 3 | } -------------------------------------------------------------------------------- /src/view/demo/menu/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/post/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/tag/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('autoprefixer') 4 | ] 5 | } -------------------------------------------------------------------------------- /src/view/demo/about/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/banner/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/bottom/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/client/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/comment/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/cover/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/crumbs/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/culture/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/iconfont/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/index/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/post-list/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/service/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/sidebar/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/sprite/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/logo.png -------------------------------------------------------------------------------- /src/images/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/wechat.jpg -------------------------------------------------------------------------------- /src/sprite/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/sprite/sprite.png -------------------------------------------------------------------------------- /src/view/demo/friend-link/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/guestbook-form/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/pagination/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/product-list/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/demo/sidebar-tool/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/template-1/index/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | //import './index.less' -------------------------------------------------------------------------------- /src/view/template-1/post/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | //import './index.less' -------------------------------------------------------------------------------- /src/view/template-1/posts/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | //import './index.less' -------------------------------------------------------------------------------- /src/view/template-1/search/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | //import './index.less' -------------------------------------------------------------------------------- /src/view/template-1/tag/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | //import './index.less' -------------------------------------------------------------------------------- /src/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/favicon.png -------------------------------------------------------------------------------- /src/images/sprite/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/sprite/1.png -------------------------------------------------------------------------------- /src/images/sprite/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/sprite/2.png -------------------------------------------------------------------------------- /src/images/sprite/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/sprite/3.png -------------------------------------------------------------------------------- /src/images/sprite/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/sprite/4.png -------------------------------------------------------------------------------- /src/images/sprite/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/sprite/5.png -------------------------------------------------------------------------------- /src/images/sprite/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/sprite/6.png -------------------------------------------------------------------------------- /src/images/sprite/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/sprite/7.png -------------------------------------------------------------------------------- /src/view/demo/login-register-form/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | import './index.less' -------------------------------------------------------------------------------- /src/view/template-1/guestbook/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | //import './index.less' -------------------------------------------------------------------------------- /src/view/template-1/products/index.js: -------------------------------------------------------------------------------- 1 | //多入口模式样式在这里引用样式,否则在样式入口文件(style.less)引用 2 | //import './index.less' -------------------------------------------------------------------------------- /src/iconfont/dashicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/iconfont/dashicons.eot -------------------------------------------------------------------------------- /src/iconfont/dashicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/iconfont/dashicons.ttf -------------------------------------------------------------------------------- /src/images/logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/logo-white.png -------------------------------------------------------------------------------- /src/components/crumbs/1/crumbs.less: -------------------------------------------------------------------------------- 1 | .c-crumbs-1{ 2 | font-size:.875em; 3 | padding:.5em; 4 | text-align:right; 5 | } -------------------------------------------------------------------------------- /src/iconfont/dashicons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/iconfont/dashicons.woff2 -------------------------------------------------------------------------------- /src/images/demo/client-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-1.png -------------------------------------------------------------------------------- /src/images/demo/client-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-2.png -------------------------------------------------------------------------------- /src/images/demo/client-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-3.png -------------------------------------------------------------------------------- /src/images/demo/client-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-4.png -------------------------------------------------------------------------------- /src/images/demo/client-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-5.png -------------------------------------------------------------------------------- /src/images/demo/client-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-6.png -------------------------------------------------------------------------------- /src/images/demo/client-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-7.png -------------------------------------------------------------------------------- /src/images/demo/client-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-8.png -------------------------------------------------------------------------------- /src/images/demo/client-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-9.png -------------------------------------------------------------------------------- /src/images/icon/icon-cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/icon/icon-cs.png -------------------------------------------------------------------------------- /src/images/demo/client-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-10.png -------------------------------------------------------------------------------- /src/images/demo/client-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-11.png -------------------------------------------------------------------------------- /src/images/demo/client-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/demo/client-12.png -------------------------------------------------------------------------------- /src/images/icon/icon-phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/icon/icon-phone.png -------------------------------------------------------------------------------- /src/images/icon/icon-qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/icon/icon-qrcode.png -------------------------------------------------------------------------------- /src/images/icon/icon-wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/icon/icon-wechat.png -------------------------------------------------------------------------------- /src/images/image-placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/image-placeholder.jpg -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/helper/to-sjis-browser.js: -------------------------------------------------------------------------------- 1 | /* global QRCode */ 2 | QRCode.toSJIS = require('./to-sjis') 3 | -------------------------------------------------------------------------------- /src/components/about/1/about-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/about/1/about-1.png -------------------------------------------------------------------------------- /src/components/banner/banner-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/banner/banner-1.jpg -------------------------------------------------------------------------------- /src/components/banner/banner-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/banner/banner-2.jpg -------------------------------------------------------------------------------- /src/components/banner/banner-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/banner/banner-3.jpg -------------------------------------------------------------------------------- /src/components/cover/1/cover-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/cover/1/cover-1.jpg -------------------------------------------------------------------------------- /src/images/icon/icon-arrow-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/images/icon/icon-arrow-top.png -------------------------------------------------------------------------------- /src/components/culture/1/culture-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/culture/1/culture-1.jpg -------------------------------------------------------------------------------- /src/components/service/1/service-1-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/1/service-1-1.jpg -------------------------------------------------------------------------------- /src/components/service/1/service-1-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/1/service-1-2.jpg -------------------------------------------------------------------------------- /src/components/service/1/service-1-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/1/service-1-3.jpg -------------------------------------------------------------------------------- /src/components/service/1/service-1-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/1/service-1-4.jpg -------------------------------------------------------------------------------- /src/components/service/2/service-2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/2/service-2-1.png -------------------------------------------------------------------------------- /src/components/service/2/service-2-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/2/service-2-2.png -------------------------------------------------------------------------------- /src/components/service/2/service-2-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/2/service-2-3.png -------------------------------------------------------------------------------- /src/components/service/2/service-2-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/2/service-2-4.png -------------------------------------------------------------------------------- /src/components/service/3/service-3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/3/service-3-1.png -------------------------------------------------------------------------------- /src/components/service/3/service-3-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/3/service-3-2.png -------------------------------------------------------------------------------- /src/components/service/3/service-3-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/3/service-3-3.png -------------------------------------------------------------------------------- /src/components/service/3/service-3-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/3/service-3-4.png -------------------------------------------------------------------------------- /src/components/crumbs/1/crumbs.ejs: -------------------------------------------------------------------------------- 1 |
2 | 当前位置: 3 | 首页 4 | / 5 | 产品分类 6 | / 7 | 详情 8 |
-------------------------------------------------------------------------------- /src/components/about/1/Snipaste_2020-12-21_21-35-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/about/1/Snipaste_2020-12-21_21-35-42.png -------------------------------------------------------------------------------- /src/components/banner/1/Snipaste_2020-12-20_23-40-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/banner/1/Snipaste_2020-12-20_23-40-36.png -------------------------------------------------------------------------------- /src/components/banner/2/Snipaste_2020-12-20_23-40-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/banner/2/Snipaste_2020-12-20_23-40-36.png -------------------------------------------------------------------------------- /src/components/bottom/1/Snipaste_2020-12-21_23-28-47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/bottom/1/Snipaste_2020-12-21_23-28-47.png -------------------------------------------------------------------------------- /src/components/bottom/2/Snipaste_2022-07-16_11-20-43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/bottom/2/Snipaste_2022-07-16_11-20-43.png -------------------------------------------------------------------------------- /src/components/client/1/Snipaste_2022-07-26_23-05-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/client/1/Snipaste_2022-07-26_23-05-38.png -------------------------------------------------------------------------------- /src/components/crumbs/1/Snipaste_2022-07-26_23-06-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/crumbs/1/Snipaste_2022-07-26_23-06-33.png -------------------------------------------------------------------------------- /src/components/menu/1/Snipaste_2020-12-20_22-03-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/menu/1/Snipaste_2020-12-20_22-03-24.png -------------------------------------------------------------------------------- /src/components/menu/2/Snipaste_2020-12-20_22-04-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/menu/2/Snipaste_2020-12-20_22-04-02.png -------------------------------------------------------------------------------- /src/components/menu/3/Snipaste_2022-07-15_23-02-44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/menu/3/Snipaste_2022-07-15_23-02-44.png -------------------------------------------------------------------------------- /src/components/post/1/Snipaste_2022-07-26_23-04-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/post/1/Snipaste_2022-07-26_23-04-19.png -------------------------------------------------------------------------------- /src/components/culture/1/Snipaste_2020-12-21_22-19-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/culture/1/Snipaste_2020-12-21_22-19-19.png -------------------------------------------------------------------------------- /src/components/service/1/Snipaste_2020-12-21_23-37-28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/service/1/Snipaste_2020-12-21_23-37-28.png -------------------------------------------------------------------------------- /src/components/friend-link/1/Snipaste_2020-12-21_23-12-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/friend-link/1/Snipaste_2020-12-21_23-12-32.png -------------------------------------------------------------------------------- /src/components/pagination/1/Snipaste_2020-12-21_23-23-49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mkinit/js2-static-builder/HEAD/src/components/pagination/1/Snipaste_2020-12-21_23-23-49.png -------------------------------------------------------------------------------- /src/components/cover/1/cover.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
<%= title.cn %>
5 |
<%= title.en %>
6 |
7 |
-------------------------------------------------------------------------------- /src/entry.js: -------------------------------------------------------------------------------- 1 | const NODE_ENV = process.env.NODE_ENV //环境变量 2 | 3 | //引用样式入口文件(固定) 4 | import './style/style.less' 5 | 6 | //引用模板样式 7 | import './view/template-1/main.less' 8 | 9 | //引用模版js 10 | import './view/template-1/main.js' -------------------------------------------------------------------------------- /src/view/demo/about/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/about/1/about.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/client/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/client/1/client.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/comment/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/comment/1/comment.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/crumbs/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/crumbs/1/crumbs.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/culture/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/culture/1/culture.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/sidebar/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/sidebar/1/sidebar.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/tag/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/tag-list/1/tag-list.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/components/service/2/service.less: -------------------------------------------------------------------------------- 1 | .c-service-2 { 2 | .items { 3 | display: flex; 4 | margin-top: 1.5em; 5 | 6 | .item { 7 | margin: 0 4.5%; 8 | 9 | ul { 10 | text-align: center; 11 | } 12 | } 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /src/view/demo/pagination/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/pagination/1/pagination.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/friend-link/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/friend-link/1/friend-link.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/sidebar-tool/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/sidebar-tool/1/sidebar-tool.ejs')() %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/cover/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/cover/1/cover.ejs')({title:{cn:'关于我们',en:'About Us'}}) %> 5 | 6 | 7 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/post/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/post/1/post.ejs')() %> 5 | <%= require('@/components/post/2/post.ejs')() %> 6 | 7 | 8 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/template-1/public/footer.ejs: -------------------------------------------------------------------------------- 1 |
2 | <%= require('@/components/bottom/2/bottom.ejs')({htmlWebpackPlugin}) %> 3 |
4 | 5 | <%= require('@/components/sidebar-tool/1/sidebar-tool.ejs')({htmlWebpackPlugin}) %> 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/view/demo/banner/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/banner/1/banner.ejs')() %> 5 | <%= require('@/components/banner/2/banner.ejs')() %> 6 | 7 | 8 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/bottom/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/bottom/1/bottom.ejs')() %> 5 | <%= require('@/components/bottom/2/bottom.ejs')() %> 6 | 7 | 8 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/components/post-list/5/post-list.less: -------------------------------------------------------------------------------- 1 | .c-post-list-5 { 2 | max-width: 360px; 3 | 4 | ul { 5 | margin-top: 1em; 6 | padding: 0 1em; 7 | 8 | li { 9 | width: 100%; 10 | border-radius: 4px; 11 | padding: 0 1em; 12 | 13 | .post-title { 14 | font-weight: bold; 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/view/demo/product-list/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/product-list/1/product-list.ejs')() %> 5 | <%= require('@/components/product-list/2/product-list.ejs')() %> 6 | 7 | 8 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/guestbook-form/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/guestbook-form/1/guestbook-form.ejs')() %> 5 | <%= require('@/components/guestbook-form/2/guestbook-form.ejs')() %> 6 | 7 | 8 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/components/banner/2/banner.less: -------------------------------------------------------------------------------- 1 | .c-banner-2 { 2 | position: relative; 3 | 4 | //轮播图分页样式 5 | .swiper-pagination-bullet { 6 | background-color: var(--invert); 7 | } 8 | 9 | .swiper-pagination-bullet.swiper-pagination-bullet-active { 10 | background-color: var(--primary); 11 | } 12 | 13 | img { 14 | width: 100%; 15 | } 16 | } -------------------------------------------------------------------------------- /src/components/crumbs/2/crumbs.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 当前位置: 4 | 首页 5 | 6 | 产品分类 7 | 8 | 详情 9 |
10 |
-------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/can-promise.js: -------------------------------------------------------------------------------- 1 | // can-promise has a crash in some versions of react native that dont have 2 | // standard global objects 3 | // https://github.com/soldair/node-qrcode/issues/157 4 | 5 | module.exports = function () { 6 | return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then 7 | } 8 | -------------------------------------------------------------------------------- /src/components/post-list/5/post-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 10 |
11 |
-------------------------------------------------------------------------------- /src/view/demo/service/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/service/1/service.ejs')() %> 5 | <%= require('@/components/service/2/service.ejs')() %> 6 | <%= require('@/components/service/3/service.ejs')() %> 7 | 8 | 9 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/version-check.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check if QR Code version is valid 3 | * 4 | * @param {Number} version QR Code version 5 | * @return {Boolean} true if valid version, false otherwise 6 | */ 7 | exports.isValid = function isValid (version) { 8 | return !isNaN(version) && version >= 1 && version <= 40 9 | } 10 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/terminal.js: -------------------------------------------------------------------------------- 1 | const big = require('./terminal/terminal') 2 | const small = require('./terminal/terminal-small') 3 | 4 | exports.render = function (qrData, options, cb) { 5 | if (options && options.small) { 6 | return small.render(qrData, options, cb) 7 | } 8 | return big.render(qrData, options, cb) 9 | } 10 | -------------------------------------------------------------------------------- /src/components/cover/1/cover.less: -------------------------------------------------------------------------------- 1 | .c-cover-1{ 2 | width:100%; 3 | position:relative; 4 | .title{ 5 | position:absolute; 6 | top:50%; 7 | left:50%; 8 | transform: translate(-50%,-50%); 9 | color:var(--invert); 10 | text-align: center; 11 | .cn{ 12 | font-size:2em; 13 | } 14 | .en{ 15 | font-size: 1.5em; 16 | opacity: .82; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/components/crumbs/2/crumbs.less: -------------------------------------------------------------------------------- 1 | .c-crumbs-2{ 2 | padding:.5em; 3 | text-align:right; 4 | color:var(--font-second); 5 | background-color: var(--invert); 6 | border-top:1px solid rgba(var(--border),.5); 7 | line-height: 2.5; 8 | font-size:12px; 9 | a{ 10 | color:var(--font-second); 11 | } 12 | .dashicons{ 13 | font-size:.875em; 14 | margin:0 .25em; 15 | } 16 | } -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | *copyright Ryan Day 2012 3 | * 4 | * Licensed under the MIT license: 5 | * http://www.opensource.org/licenses/mit-license.php 6 | * 7 | * this is the main server side application file for node-qrcode. 8 | * these exports use serverside canvas api methods for file IO and buffers 9 | * 10 | */ 11 | 12 | module.exports = require('./server') 13 | -------------------------------------------------------------------------------- /src/components/comment/1/comment.less: -------------------------------------------------------------------------------- 1 | .c-comment-1 { 2 | padding:1em 0; 3 | .comment{ 4 | margin-bottom:1.5em; 5 | border-bottom:1px solid rgba(var(--border),.5); 6 | padding-bottom:1.5em; 7 | } 8 | .name { 9 | font-weight: bold; 10 | } 11 | 12 | .date { 13 | margin-left:1em; 14 | color: var(--font-second); 15 | font-size: 13px; 16 | } 17 | .content{ 18 | margin-top:.5em; 19 | } 20 | } -------------------------------------------------------------------------------- /src/components/client/1/client.less: -------------------------------------------------------------------------------- 1 | .c-client-1 { 2 | 3 | .items { 4 | display: flex; 5 | flex-wrap: wrap; 6 | justify-content: space-between; 7 | margin-top: 1em; 8 | 9 | .item { 10 | width: 16%; 11 | margin-bottom:10px; 12 | 13 | img { 14 | filter: grayscale(100%); 15 | } 16 | 17 | &:hover { 18 | img { 19 | filter: grayscale(0); 20 | } 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/components/pagination/1/pagination.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 1 4 | 2 5 | 3 6 | 4 7 | 5 8 | 6 9 | 7 10 |
11 |
-------------------------------------------------------------------------------- /src/view/demo/login-register-form/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/login-register-form/1/login-register-form.ejs')() %> 5 | <%= require('@/components/login-register-form/2/login-register-form.ejs')() %> 6 | <%= require('@/components/login-register-form/3/login-register-form.ejs')() %> 7 | 8 | 9 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/view/demo/sprite/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/components/friend-link/1/friend-link.less: -------------------------------------------------------------------------------- 1 | .c-friend-link-1 { 2 | padding-left: 1em; 3 | padding-left: 1em; 4 | 5 | .wrap { 6 | display: flex; 7 | } 8 | 9 | .title { 10 | font-size: 1.125em; 11 | font-weight: bold; 12 | white-space: nowrap; 13 | } 14 | 15 | a { 16 | display: inline-block; 17 | margin: 0 1em .5em; 18 | white-space: nowrap; 19 | margin-bottom: 1em; 20 | 21 | &:hover { 22 | color: var(--primary); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/components/pagination/1/pagination.less: -------------------------------------------------------------------------------- 1 | .c-pagination-1{ 2 | text-align:center; 3 | .page-num{ 4 | cursor:pointer; 5 | display: inline-block; 6 | padding:6px 15px; 7 | border-radius: 4px; 8 | font-weight: bold; 9 | color:var(--font-second); 10 | font-size:14px; 11 | transition: all .3s linear; 12 | &.current,&:hover{ 13 | background-color:var(--primary); 14 | color:#FFF; 15 | } 16 | &.current{ 17 | cursor:default; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/view/demo/menu/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/menu/1/menu.ejs')({htmlWebpackPlugin}) %> 5 | <%= require('@/components/menu/2/menu.ejs')({htmlWebpackPlugin}) %> 6 | <%= require('@/components/menu/3/menu.ejs')({htmlWebpackPlugin}) %> 7 | <%= require('@/components/menu/4/menu.ejs')({htmlWebpackPlugin}) %> 8 | 9 | 10 | <%= require('@/public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/components/product-list/1/product-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 13 |
14 |
-------------------------------------------------------------------------------- /src/components/product-list/2/product-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 13 |
14 |
-------------------------------------------------------------------------------- /src/components/banner/1/banner.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 10 |
11 |
-------------------------------------------------------------------------------- /src/components/bottom/2/bottom.less: -------------------------------------------------------------------------------- 1 | .c-bottom-2 { 2 | background-color: var(--font); 3 | color: var(--invert); 4 | padding: 3em 0; 5 | font-size: .95em; 6 | line-height: 2; 7 | 8 | a { 9 | color: var(--invert); 10 | } 11 | 12 | .company-info { 13 | display: flex; 14 | justify-content: space-between; 15 | align-items: flex-end; 16 | .logo{ 17 | width: 120px; 18 | } 19 | .contact{ 20 | text-align:right; 21 | } 22 | .qrcode{ 23 | width:82px; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/view/demo/post-list/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 | <%= require('@/components/post-list/1/post-list.ejs')() %> 5 | <%= require('@/components/post-list/2/post-list.ejs')() %> 6 | <%= require('@/components/post-list/3/post-list.ejs')() %> 7 | <%= require('@/components/post-list/4/post-list.ejs')() %> 8 | <%= require('@/components/post-list/5/post-list.ejs')() %> 9 | 10 | 11 | <%= require('@/public/footer.ejs')() %> -------------------------------------------------------------------------------- /src/components/sidebar/1/sidebar.less: -------------------------------------------------------------------------------- 1 | .c-sidebar-1 { 2 | max-width:320px; 3 | section { 4 | background-color: var(--bg); 5 | margin-bottom: 1.5em; 6 | border-top-left-radius: .5em; 7 | border-top-right-radius: .5em; 8 | overflow:hidden; 9 | 10 | .section-title { 11 | background-color: var(--primary); 12 | line-height: 2.5; 13 | font-size: 1.125em; 14 | color: var(--invert); 15 | padding: 0 1em; 16 | } 17 | ul{ 18 | padding:1em; 19 | line-height: 1.8; 20 | } 21 | 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/style/style.less: -------------------------------------------------------------------------------- 1 | //在样式入口文件引用的样式都会被打包到一起,单独打包页面的样式需要在页面的入口文件(页面的js)引用 2 | 3 | @import url('./reset.less'); //初始化样式 4 | 5 | :root { 6 | --font-family: Microsoft Yahei; //字体 7 | --bg: #f5f5f5; //背景 8 | --border: #DDD; //边框 9 | --border-second: #EFEFEF; //边框 10 | --font: #555; //文字主色 11 | --font-second: #999; //文字副色,浅色 12 | --primary: #4183c4; //主色,用于链接、高亮 13 | --secondary: #e73a74; //副色,一般用于hover 14 | --invert: #FFF; 15 | } 16 | 17 | @import url('./nocss.less'); //公共样式 18 | 19 | //@import url('./demo.less'); //演示组件样式,正式打包按需引用 -------------------------------------------------------------------------------- /src/components/menu/1/menu.ejs: -------------------------------------------------------------------------------- 1 |
2 | 14 |
-------------------------------------------------------------------------------- /src/components/menu/2/menu.less: -------------------------------------------------------------------------------- 1 | .c-menu-2 { 2 | .wrap { 3 | display: flex; 4 | justify-content: space-between; 5 | align-items: center; 6 | } 7 | 8 | .logo { 9 | img { 10 | width: 120px; 11 | } 12 | } 13 | 14 | .menu-list { 15 | ul { 16 | display: flex; 17 | 18 | a { 19 | font-size: 1.075em; 20 | display: inline-block; 21 | padding: 1em 1.25em; 22 | border-bottom: 3px solid transparent; 23 | transition: all .3s linear; 24 | 25 | &:hover { 26 | border-bottom-color: var(--primary); 27 | } 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/components/post-list/4/post-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 14 |
15 |
-------------------------------------------------------------------------------- /src/components/post/2/post.less: -------------------------------------------------------------------------------- 1 | .c-post-2 { 2 | padding-left: 2em; 3 | padding-right: 2em; 4 | 5 | .title { 6 | text-align: center; 7 | } 8 | 9 | .info { 10 | border-bottom: 1px dashed var(--border); 11 | display: flex; 12 | justify-content: space-between; 13 | padding-bottom: .5em; 14 | font-size: .875em; 15 | 16 | a { 17 | color: var(--primary); 18 | } 19 | } 20 | 21 | .content { 22 | margin-top: 2em; 23 | 24 | p { 25 | text-indent: 2em; 26 | 27 | img { 28 | &:first-child { 29 | margin-left: -2em; 30 | } 31 | } 32 | } 33 | 34 | } 35 | } -------------------------------------------------------------------------------- /src/components/menu/2/menu.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 | 17 |
18 |
-------------------------------------------------------------------------------- /src/components/guestbook-form/2/guestbook-form.less: -------------------------------------------------------------------------------- 1 | .c-guestbook-form-2 { 2 | padding-left: 1em; 3 | padding-right: 1em; 4 | 5 | input, 6 | textarea { 7 | border-radius: 4px; 8 | } 9 | 10 | .contact { 11 | display: flex; 12 | 13 | &>div { 14 | margin-right: 2em; 15 | 16 | &:last-child { 17 | margin-right: unset; 18 | } 19 | } 20 | } 21 | 22 | .content-box { 23 | margin-top: 1em; 24 | .input-content{ 25 | margin-top:.5em; 26 | } 27 | } 28 | 29 | .bottom { 30 | text-align: center; 31 | margin-top: 2em; 32 | } 33 | 34 | .require { 35 | color: red; 36 | } 37 | } -------------------------------------------------------------------------------- /src/sprite/sprite.css: -------------------------------------------------------------------------------- 1 | .sprite { background-image: url(./sprite.png) } 2 | .sprite-1 { width: 100px; height: 100px; background-position: 0px 0px; } 3 | .sprite-2 { width: 100px; height: 100px; background-position: 0px -102px; } 4 | .sprite-3 { width: 100px; height: 100px; background-position: 0px -204px; } 5 | .sprite-4 { width: 100px; height: 100px; background-position: 0px -306px; } 6 | .sprite-5 { width: 100px; height: 100px; background-position: 0px -408px; } 7 | .sprite-6 { width: 100px; height: 100px; background-position: 0px -510px; } 8 | .sprite-7 { width: 100px; height: 100px; background-position: 0px -612px; } -------------------------------------------------------------------------------- /src/components/post/2/post.ejs: -------------------------------------------------------------------------------- 1 |
2 |

狗屁不通文章生成器

3 |
4 | 2020-09-30 17:40:33 5 | 分类 6 |
7 |
8 |

狗屁不通文章生成器,就是你随便输入一个主题,然后这个生成器可以根据你输入主题的文字,生成一篇文章。当然了,这个狗屁不通文章生成器,现在还不太智能,之所以火了,就是因为它不算太智能(因为作者应该不太懂神经网络算法,所以没有加入任何自然语言处理的算法),生成的文章都啰里啰嗦,内容重复,乱七八糟,所以大家感觉好玩就火了。

9 |

狗屁不通文章生成器,就是你随便输入一个主题,然后这个生成器可以根据你输入主题的文字,生成一篇文章。当然了,这个狗屁不通文章生成器,现在还不太智能,之所以火了,就是因为它不算太智能(因为作者应该不太懂神经网络算法,所以没有加入任何自然语言处理的算法),生成的文章都啰里啰嗦,内容重复,乱七八糟,所以大家感觉好玩就火了。

10 |
11 |
-------------------------------------------------------------------------------- /src/components/banner/2/banner.ejs: -------------------------------------------------------------------------------- 1 |
2 | 18 |
-------------------------------------------------------------------------------- /src/components/tag-list/1/tag-list.less: -------------------------------------------------------------------------------- 1 | .c-tag-list-1 { 2 | .title { 3 | display: inline-block; 4 | font-weight: bold; 5 | background-color: var(--primary); 6 | padding: .5em 1em; 7 | color: var(--invert); 8 | margin-left: 1.5em; 9 | } 10 | 11 | ul { 12 | display: flex; 13 | flex-wrap: wrap; 14 | justify-content: space-around; 15 | margin-top:1em; 16 | padding:0 5% 1em; 17 | 18 | li { 19 | width: 30%; 20 | border: 1px solid var(--border); 21 | text-align: center; 22 | line-height: 2.25; 23 | margin: .5em 0; 24 | font-size: 12px; 25 | 26 | a { 27 | display: block; 28 | } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/components/comment/1/comment.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 昵称 5 | 2023-02-08 02:08 6 |
7 |
这是一条很长的评论
8 |
9 |
10 |
11 | 昵称 12 | 2023-02-08 02:08 13 |
14 |
这是一条很长的评论
15 |
16 |
17 |
18 | 昵称 19 | 2023-02-08 02:08 20 |
21 |
这是一条很长的评论
22 |
23 |
-------------------------------------------------------------------------------- /src/components/culture/1/culture.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
投资风格
6 |
专注 创新 思辨
7 |
8 |
9 |
企业定位
10 |
专业的募集资金管理机构
11 |
12 |
13 |
企业使命
14 |
打造人与财富 链接的生态圈
15 |
16 |
17 |
团队精神
18 |
友善 创新 卓越 成就
19 |
20 |
21 |
22 |
-------------------------------------------------------------------------------- /src/components/login-register-form/1/login-register-form.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
用户名:
5 | 6 |
7 |
8 |
密码:
9 | 10 |
11 |
12 | 13 |
14 |
15 | 注册 16 | 忘记账号 17 |
18 |
19 |
-------------------------------------------------------------------------------- /src/components/post-list/3/post-list.less: -------------------------------------------------------------------------------- 1 | .c-post-list-3 { 2 | max-width: 360px; 3 | 4 | ul { 5 | margin-top: 2em; 6 | padding:0 1em; 7 | 8 | li { 9 | width: 100%; 10 | margin-bottom: 1.5em; 11 | border-radius: 4px; 12 | padding: 0 1em; 13 | 14 | .post-title { 15 | font-weight: bold; 16 | } 17 | 18 | .info { 19 | 20 | .date { 21 | color: var(--font-second); 22 | font-size: .875em; 23 | } 24 | } 25 | 26 | .thumbnail { 27 | 28 | img { 29 | width: 100%; 30 | } 31 | } 32 | 33 | .content-wrap { 34 | .summary{ 35 | font-size:.95em; 36 | } 37 | } 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /src/components/post-list/4/post-list.less: -------------------------------------------------------------------------------- 1 | .c-post-list-4 { 2 | max-width: 360px; 3 | 4 | ul { 5 | margin-top: 2em; 6 | padding: 0 1em; 7 | 8 | li { 9 | width: 100%; 10 | margin-bottom: 1.5em; 11 | border-radius: 4px; 12 | padding: 0 1em; 13 | 14 | .post-title { 15 | font-weight: bold; 16 | } 17 | 18 | 19 | .date { 20 | color: var(--font-second); 21 | font-size: .875em; 22 | white-space: nowrap; 23 | } 24 | 25 | .thumbnail { 26 | 27 | img { 28 | width: 100%; 29 | } 30 | } 31 | 32 | .content-wrap { 33 | display: flex; 34 | align-items: center; 35 | } 36 | } 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /src/view/template-1/guestbook/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('../public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 |
5 |
6 |
7 | <%= require('@/components/sidebar/1/sidebar.ejs')({htmlWebpackPlugin}) %> 8 |
9 |
10 |
11 | <%= require('@/components/guestbook-form/2/guestbook-form.ejs')({htmlWebpackPlugin}) %> 12 |
13 |
14 |
15 |
16 | 17 | 18 | <%= require('../public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/svg.js: -------------------------------------------------------------------------------- 1 | const svgTagRenderer = require('./svg-tag') 2 | 3 | exports.render = svgTagRenderer.render 4 | 5 | exports.renderToFile = function renderToFile (path, qrData, options, cb) { 6 | if (typeof cb === 'undefined') { 7 | cb = options 8 | options = undefined 9 | } 10 | 11 | const fs = require('fs') 12 | const svgTag = exports.render(qrData, options) 13 | 14 | const xmlStr = '' + 15 | '' + 16 | svgTag 17 | 18 | fs.writeFile(path, xmlStr, cb) 19 | } 20 | -------------------------------------------------------------------------------- /src/view/template-1/main.js: -------------------------------------------------------------------------------- 1 | import QRCode from './script/qrcode' 2 | import Swiper from './script/swiper-bundle.min.js' 3 | window.onload = () => { 4 | //轮播图 5 | const swiper = new Swiper('.banner-2-swiper', { 6 | speed: 1000, 7 | loop: true, 8 | effect: 'slide', 9 | autoplay: { 10 | delay: 3000, 11 | disableOnInteraction: false, 12 | pauseOnMouseEnter: true 13 | }, 14 | pagination: { 15 | el: '.swiper-pagination', 16 | clickable: true 17 | }, 18 | }) 19 | 20 | //二维码生成器 21 | QRCode.toDataURL(location.origin, {}, function(err, url) { 22 | var img = document.querySelector('.qrcode-img') 23 | if (err || !img) return 24 | img.src = url 25 | }) 26 | } -------------------------------------------------------------------------------- /src/components/post/3/post.less: -------------------------------------------------------------------------------- 1 | .c-post-3 { 2 | padding:1em 2em 0; 3 | 4 | .title { 5 | text-align: center; 6 | } 7 | 8 | .info { 9 | border-bottom: 1px dashed var(--border); 10 | display: flex; 11 | justify-content: center; 12 | padding: 1.5em 0; 13 | font-size: .875em; 14 | 15 | .item { 16 | margin: 0 2em; 17 | } 18 | 19 | a { 20 | color: var(--primary); 21 | } 22 | } 23 | 24 | .content { 25 | margin-top: 2em; 26 | 27 | p { 28 | text-indent: 2em; 29 | 30 | img { 31 | &:first-child { 32 | margin-left: -2em; 33 | } 34 | } 35 | } 36 | 37 | } 38 | .tag-list{ 39 | background-color: var(--bg); 40 | padding:1em; 41 | } 42 | } -------------------------------------------------------------------------------- /src/view/template-1/post/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('../public/header.ejs')({htmlWebpackPlugin}) %> 3 |
4 |
5 |
6 | <%= require('@/components/sidebar/1/sidebar.ejs')({htmlWebpackPlugin}) %> 7 |
8 |
9 | <%= require('@/components/crumbs/1/crumbs.ejs')({htmlWebpackPlugin}) %> 10 |
11 | <%= require('@/components/post/1/post.ejs')({htmlWebpackPlugin}) %> 12 |
13 |
14 |
15 |
16 | 17 | <%= require('../public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/components/sidebar/1/sidebar.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
产品中心
4 | 9 |
10 |
11 |
新闻中心
12 | 17 |
18 |
19 |
联系我们
20 | 24 |
25 |
-------------------------------------------------------------------------------- /src/components/about/1/about.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
关于我们
8 |
about us
9 |
10 |
11 |

深圳XXXX管理有限公司(简称:XXXX,公司资质信息:登记编号(P8888888),公司于2015年08月13日在深圳市市场监督管理局注册成立。

12 |

公司主要投资股票二级市场、期权、期货交易、投资管理等相关业务。 公司专注于投资股票二级市场,秉持“专一、专心、专业、专注”的匠人精神,做熟悉的事擅长的事,长期专注专研来规避投资市场上已知的投资风险,以资产增值为目的。

13 |

立志打造成为一家私人银行管理公司,建立自己的运营机制,公司管理严格细致,投资决策高效,根据客户不同的收益预期、风险偏好和资产配置需求等,结合自身投资团队的能力提升,不断探索、创新,延展公司产品线,帮助客户投资合适的产品,实现财富增值。成为大众所望的财富创造者。

14 |
15 |
16 |
-------------------------------------------------------------------------------- /src/components/bottom/2/bottom.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | 7 |
8 | 粤ICP备8888888号-1 9 |
Copyright © 2022 广州文化有限公司
10 |
公司地址:广东省,广州市,番禺区,南村镇,板桥大厦808
11 |
12 | 17 |
18 |
19 |
-------------------------------------------------------------------------------- /src/components/guestbook-form/1/guestbook-form.less: -------------------------------------------------------------------------------- 1 | .c-guestbook-form-1 { 2 | padding-left: 1em; 3 | padding-right: 1em; 4 | 5 | .form { 6 | display: flex; 7 | justify-content: space-between; 8 | align-items: flex-end; 9 | 10 | .item { 11 | flex: 1; 12 | margin: 0 1em; 13 | 14 | .btn-submit { 15 | width: 100%; 16 | } 17 | 18 | &.name, 19 | &.button { 20 | flex: .5; 21 | } 22 | 23 | &.content { 24 | flex: 1.5; 25 | } 26 | 27 | input { 28 | width: 100%; 29 | background-color: unset; 30 | border-radius: 4px; 31 | color: var(--invert); 32 | } 33 | 34 | .input-title { 35 | font-size: 1.2em; 36 | margin-bottom: .5em; 37 | } 38 | 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/public/header.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | <%= htmlWebpackPlugin.options.title %> 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | -------------------------------------------------------------------------------- /src/components/login-register-form/2/login-register-form.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 |
8 |
9 | 10 |
11 |
12 | 13 |
14 |
15 | 注册 16 | 忘记账号 17 |
18 |
19 |
-------------------------------------------------------------------------------- /src/components/login-register-form/3/login-register-form.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 |
8 |
9 | 10 |
11 |
12 | 13 |
14 |
15 | 注册账号 16 | 忘记账号 17 |
18 |
19 |
-------------------------------------------------------------------------------- /src/components/post-list/1/post-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 19 |
20 |
-------------------------------------------------------------------------------- /src/components/post-list/1/post-list.less: -------------------------------------------------------------------------------- 1 | .c-post-list-1 { 2 | ul { 3 | display: flex; 4 | flex-wrap: wrap; 5 | margin-top: 2em; 6 | 7 | li { 8 | width: 47%; 9 | margin: 0 1.5% 2em; 10 | display: flex; 11 | justify-content: space-between; 12 | margin-bottom: 1.5em; 13 | box-shadow: 0 0 5px var(--border); 14 | border-radius: 4px; 15 | padding: 1em; 16 | 17 | .post-title { 18 | font-size: 1.375em; 19 | font-weight: bold; 20 | } 21 | 22 | .info { 23 | padding: .5em 0; 24 | 25 | .date { 26 | color: var(--font-second); 27 | } 28 | } 29 | 30 | .thumbnail { 31 | width: 37%; 32 | } 33 | 34 | .content-wrap { 35 | width: 59%; 36 | } 37 | } 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/finder-pattern.js: -------------------------------------------------------------------------------- 1 | const getSymbolSize = require('./utils').getSymbolSize 2 | const FINDER_PATTERN_SIZE = 7 3 | 4 | /** 5 | * Returns an array containing the positions of each finder pattern. 6 | * Each array's element represent the top-left point of the pattern as (x, y) coordinates 7 | * 8 | * @param {Number} version QR Code version 9 | * @return {Array} Array of coordinates 10 | */ 11 | exports.getPositions = function getPositions (version) { 12 | const size = getSymbolSize(version) 13 | 14 | return [ 15 | // top-left 16 | [0, 0], 17 | // top-right 18 | [size - FINDER_PATTERN_SIZE, 0], 19 | // bottom-left 20 | [0, size - FINDER_PATTERN_SIZE] 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /src/components/post/1/post.ejs: -------------------------------------------------------------------------------- 1 |
2 |

狗屁不通文章生成器

3 | 6 |
7 |

狗屁不通文章生成器,就是你随便输入一个主题,然后这个生成器可以根据你输入主题的文字,生成一篇文章。当然了,这个狗屁不通文章生成器,现在还不太智能,之所以火了,就是因为它不算太智能(因为作者应该不太懂神经网络算法,所以没有加入任何自然语言处理的算法),生成的文章都啰里啰嗦,内容重复,乱七八糟,所以大家感觉好玩就火了。

8 |

狗屁不通文章生成器,就是你随便输入一个主题,然后这个生成器可以根据你输入主题的文字,生成一篇文章。当然了,这个狗屁不通文章生成器,现在还不太智能,之所以火了,就是因为它不算太智能(因为作者应该不太懂神经网络算法,所以没有加入任何自然语言处理的算法),生成的文章都啰里啰嗦,内容重复,乱七八糟,所以大家感觉好玩就火了。

9 |
10 | 14 |
-------------------------------------------------------------------------------- /src/view/template-1/products/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('../public/header.ejs')({htmlWebpackPlugin}) %> 3 |
4 |
5 | <%= require('@/components/sidebar/1/sidebar.ejs')({htmlWebpackPlugin}) %> 6 |
7 |
8 | <%= require('@/components/crumbs/1/crumbs.ejs')({htmlWebpackPlugin}) %> 9 |
10 | <%= require('@/components/product-list/2/product-list.ejs')({htmlWebpackPlugin}) %> 11 | <%= require('@/components/pagination/1/pagination.ejs')({htmlWebpackPlugin}) %> 12 |
13 |
14 |
15 | 16 | <%= require('../public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/components/post-list/2/post-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 19 |
20 |
-------------------------------------------------------------------------------- /src/components/post-list/3/post-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 19 |
20 |
-------------------------------------------------------------------------------- /src/components/friend-link/1/friend-link.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/view/template-1/tag/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('../public/header.ejs')({htmlWebpackPlugin}) %> 3 |
4 |
5 |
6 | <%= require('@/components/sidebar/1/sidebar.ejs')({htmlWebpackPlugin}) %> 7 |
8 |
9 | <%= require('@/components/crumbs/1/crumbs.ejs')({htmlWebpackPlugin}) %> 10 |
11 | <%= require('@/components/post-list/2/post-list.ejs')({htmlWebpackPlugin}) %> 12 | <%= require('@/components/pagination/1/pagination.ejs')({htmlWebpackPlugin}) %> 13 |
14 |
15 |
16 |
17 | 18 | <%= require('../public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/components/post-list/2/post-list.less: -------------------------------------------------------------------------------- 1 | .c-post-list-2 { 2 | ul { 3 | display: flex; 4 | flex-wrap: wrap; 5 | padding:0 1em; 6 | 7 | li { 8 | display: flex; 9 | width: 100%; 10 | justify-content: space-between; 11 | margin-bottom: 1.5em; 12 | box-shadow: 0 0 5px var(--border); 13 | border-radius: 4px; 14 | padding: 1em; 15 | 16 | .post-title { 17 | font-size: 1.375em; 18 | font-weight: bold; 19 | } 20 | 21 | .info { 22 | padding: .5em 0; 23 | 24 | .date { 25 | color: var(--font-second); 26 | } 27 | } 28 | 29 | .thumbnail { 30 | width: 22%; 31 | 32 | .post-title, 33 | img { 34 | width: 100%; 35 | } 36 | } 37 | 38 | .content-wrap { 39 | width: 75%; 40 | } 41 | } 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /src/view/template-1/posts/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('../public/header.ejs')({htmlWebpackPlugin}) %> 3 |
4 |
5 |
6 | <%= require('@/components/sidebar/1/sidebar.ejs')({htmlWebpackPlugin}) %> 7 |
8 |
9 | <%= require('@/components/crumbs/1/crumbs.ejs')({htmlWebpackPlugin}) %> 10 |
11 | <%= require('@/components/post-list/2/post-list.ejs')({htmlWebpackPlugin}) %> 12 | <%= require('@/components/pagination/1/pagination.ejs')({htmlWebpackPlugin}) %> 13 |
14 |
15 |
16 |
17 | 18 | <%= require('../public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/view/template-1/search/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('../public/header.ejs')({htmlWebpackPlugin}) %> 3 |
4 |
5 |
6 | <%= require('@/components/sidebar/1/sidebar.ejs')({htmlWebpackPlugin}) %> 7 |
8 |
9 | <%= require('@/components/crumbs/1/crumbs.ejs')({htmlWebpackPlugin}) %> 10 |
11 | <%= require('@/components/post-list/2/post-list.ejs')({htmlWebpackPlugin}) %> 12 | <%= require('@/components/pagination/1/pagination.ejs')({htmlWebpackPlugin}) %> 13 |
14 |
15 |
16 |
17 | 18 | <%= require('../public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/components/login-register-form/1/login-register-form.less: -------------------------------------------------------------------------------- 1 | .c-login-register-form-1 { 2 | padding: 1em 0 2em; 3 | 4 | .form { 5 | margin: 0 auto; 6 | max-width:360px; 7 | box-shadow: 0 0 5px var(--border); 8 | padding:2.5em 3em; 9 | border-radius: 4px; 10 | .item{ 11 | display: flex; 12 | align-items: center; 13 | margin-bottom:1em; 14 | .input-title{ 15 | min-width: 4em; 16 | text-align: right; 17 | } 18 | input{ 19 | border-radius: 4px; 20 | width: 100%; 21 | } 22 | } 23 | .action{ 24 | text-align: center; 25 | padding-top:.5em; 26 | .btn-submit{ 27 | width:100%; 28 | border-radius: 4px; 29 | } 30 | } 31 | .bottom{ 32 | display: flex; 33 | justify-content: space-between; 34 | margin-top:1em; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/components/product-list/2/product-list.less: -------------------------------------------------------------------------------- 1 | .c-product-list-2 { 2 | ul { 3 | display: flex; 4 | flex-wrap: wrap; 5 | justify-content: space-between; 6 | 7 | li { 8 | width: 22%; 9 | margin: 0 1.5% 2em; 10 | box-shadow: 0 0 6px var(--border-second); 11 | border-radius: .5em; 12 | overflow: hidden; 13 | transition: all .2s linear; 14 | background-color: var(--invert); 15 | 16 | &:hover { 17 | box-shadow: 0 0 6px var(--border); 18 | } 19 | 20 | .thumbnail { 21 | overflow: hidden; 22 | } 23 | 24 | img { 25 | transition: all .3s linear; 26 | 27 | &:hover { 28 | transform: scale(1.25); 29 | } 30 | } 31 | 32 | .post-title { 33 | text-align: center; 34 | line-height: 2; 35 | padding: 0 1em; 36 | } 37 | } 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /src/components/service/1/service.less: -------------------------------------------------------------------------------- 1 | .c-service-1 { 2 | 3 | .items { 4 | display: flex; 5 | margin-top: 1em; 6 | 7 | .item { 8 | flex: 1; 9 | cursor: pointer; 10 | 11 | &:hover { 12 | background-color: var(--primary); 13 | 14 | img { 15 | opacity: .15; 16 | } 17 | 18 | .item-text { 19 | color: #FFF; 20 | } 21 | } 22 | } 23 | 24 | .item-text { 25 | height: 20vw; 26 | max-height: 256px; 27 | display: flex; 28 | flex-direction: column; 29 | justify-content: center; 30 | align-items: center; 31 | font-weight: bold; 32 | color: var(--font-second); 33 | 34 | .title { 35 | font-size: 1.75em; 36 | } 37 | 38 | .desc { 39 | font-size: 1.5em; 40 | text-transform: uppercase; 41 | line-height: 2; 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /src/components/product-list/1/product-list.less: -------------------------------------------------------------------------------- 1 | .c-product-list-1 { 2 | ul { 3 | display: flex; 4 | flex-wrap: wrap; 5 | justify-content: space-between; 6 | margin-top:2em; 7 | 8 | li { 9 | width: 22%; 10 | margin: 0 1.5% 2em; 11 | box-shadow: 0 0 6px var(--border-second); 12 | border-radius: .5em; 13 | overflow: hidden; 14 | transition: all .2s linear; 15 | background-color: var(--invert); 16 | 17 | &:hover { 18 | box-shadow: 0 0 6px var(--border); 19 | } 20 | 21 | .thumbnail { 22 | overflow: hidden; 23 | } 24 | 25 | img { 26 | transition: all .3s linear; 27 | 28 | &:hover { 29 | transform: scale(1.25); 30 | } 31 | } 32 | 33 | .post-title { 34 | text-align: center; 35 | line-height: 2; 36 | padding: 0 1em; 37 | } 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /src/components/guestbook-form/2/guestbook-form.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | *姓名: 5 | 6 |
7 |
8 | *电话: 9 | 10 |
11 |
12 | 邮箱: 13 | 14 |
15 |
16 |
17 | *留言内容: 18 | 19 |
20 |
21 |
-------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/byte-data.js: -------------------------------------------------------------------------------- 1 | const encodeUtf8 = require('encode-utf8') 2 | const Mode = require('./mode') 3 | 4 | function ByteData (data) { 5 | this.mode = Mode.BYTE 6 | if (typeof (data) === 'string') { 7 | data = encodeUtf8(data) 8 | } 9 | this.data = new Uint8Array(data) 10 | } 11 | 12 | ByteData.getBitsLength = function getBitsLength (length) { 13 | return length * 8 14 | } 15 | 16 | ByteData.prototype.getLength = function getLength () { 17 | return this.data.length 18 | } 19 | 20 | ByteData.prototype.getBitsLength = function getBitsLength () { 21 | return ByteData.getBitsLength(this.data.length) 22 | } 23 | 24 | ByteData.prototype.write = function (bitBuffer) { 25 | for (let i = 0, l = this.data.length; i < l; i++) { 26 | bitBuffer.put(this.data[i], 8) 27 | } 28 | } 29 | 30 | module.exports = ByteData 31 | -------------------------------------------------------------------------------- /src/components/guestbook-form/1/guestbook-form.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
怎么称呼您?
5 | 6 |
7 |
8 |
可以只填联系电话
9 | 10 |
11 |
12 |
怎么联系您?
13 | 14 |
15 |
16 |
您的需求?
17 | 18 |
19 |
20 | 21 |
22 |
23 |
-------------------------------------------------------------------------------- /src/components/post/1/post.less: -------------------------------------------------------------------------------- 1 | .c-post-1 { 2 | padding-left: 2em; 3 | padding-right: 2em; 4 | 5 | .title { 6 | font-size: 1.75em; 7 | font-weight: bold; 8 | border-bottom: 1px solid var(--bg); 9 | padding-bottom: .5em; 10 | } 11 | 12 | .post-info { 13 | font-size: 12px; 14 | color: var(--font-second); 15 | } 16 | 17 | .content { 18 | margin-top: 2em; 19 | 20 | p { 21 | text-indent: 2em; 22 | } 23 | } 24 | 25 | .navigation { 26 | overflow: hidden; 27 | font-size: .85em; 28 | border-top: 1px solid var(--bg); 29 | margin-top: 2em; 30 | padding-top: 2em; 31 | 32 | a { 33 | display: block; 34 | width: 46%; 35 | color: var(--font-second); 36 | 37 | &:hover { 38 | color: var(--primary); 39 | } 40 | } 41 | 42 | .previous { 43 | float: left; 44 | } 45 | 46 | .next { 47 | float: right; 48 | text-align: right; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/view/template-1/public/header.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 网站标题 - 网站名称 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 | <%= require('@/components/menu/3/menu.ejs')({htmlWebpackPlugin}) %> 19 |
20 |
21 | <%= require('@/components/banner/2/banner.ejs')({htmlWebpackPlugin}) %> 22 |
-------------------------------------------------------------------------------- /src/components/about/1/about.less: -------------------------------------------------------------------------------- 1 | .c-about-1 { 2 | box-sizing: border-box; 3 | padding-left: 2em; 4 | padding-right: 2em; 5 | 6 | .wrap { 7 | position: relative; 8 | } 9 | 10 | .picture { 11 | width: 60%; 12 | } 13 | 14 | .title { 15 | position: absolute; 16 | z-index: 10; 17 | right: 0; 18 | top: 0; 19 | text-align: right; 20 | color: var(--font-second); 21 | 22 | .cn { 23 | font-size: 2.25em; 24 | font-weight: bold; 25 | } 26 | 27 | .en { 28 | text-transform: uppercase; 29 | font-size: 1.25em; 30 | line-height: 2; 31 | } 32 | } 33 | 34 | .content { 35 | width: 60%; 36 | position: absolute; 37 | z-index: 10; 38 | right: 0; 39 | top: 50%; 40 | transform: translateY(-50%); 41 | background-color: rgba(41, 59, 79, .9); 42 | color: #FFF; 43 | padding: 2vw 3em; 44 | box-sizing: border-box; 45 | 46 | p { 47 | text-indent: 2em; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/components/menu/1/menu.less: -------------------------------------------------------------------------------- 1 | .c-menu-1 { 2 | .logo { 3 | img { 4 | width: 120px; 5 | } 6 | } 7 | 8 | .wrap { 9 | display: flex; 10 | justify-content: space-between; 11 | align-items: center; 12 | } 13 | 14 | .menu-list { 15 | display: flex; 16 | justify-content: flex-end; 17 | 18 | li { 19 | 20 | &.current, 21 | &:hover { 22 | a { 23 | color: #FFF; 24 | background-color: var(--primary); 25 | } 26 | } 27 | } 28 | 29 | a { 30 | display: block; 31 | margin: 0 .5em; 32 | line-height: 2; 33 | border-radius: 1em; 34 | padding: 0 1.125em; 35 | font-size: 1.075em; 36 | transition: all .1s linear; 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/components/login-register-form/2/login-register-form.less: -------------------------------------------------------------------------------- 1 | .c-login-register-form-2 { 2 | padding: 1em 0 2em; 3 | 4 | .form { 5 | margin: 0 auto; 6 | max-width:360px; 7 | box-shadow: 0 0 5px var(--border); 8 | padding:2.5em 3em; 9 | border-radius: 4px; 10 | .item{ 11 | display: flex; 12 | align-items: center; 13 | margin-bottom:1em; 14 | border-radius: 4px; 15 | overflow: hidden; 16 | background-color: rgba(var(--border),.5); 17 | .input-title{ 18 | padding:0 .5em; 19 | } 20 | input{ 21 | background-color: var(--bg); 22 | border: none; 23 | width: 100%; 24 | line-height: 32px; 25 | } 26 | } 27 | .action{ 28 | text-align: center; 29 | padding-top:.5em; 30 | .btn-submit{ 31 | width:100%; 32 | border-radius: 4px; 33 | } 34 | } 35 | .bottom{ 36 | display: flex; 37 | justify-content: space-between; 38 | margin-top:1em; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/bit-buffer.js: -------------------------------------------------------------------------------- 1 | function BitBuffer () { 2 | this.buffer = [] 3 | this.length = 0 4 | } 5 | 6 | BitBuffer.prototype = { 7 | 8 | get: function (index) { 9 | const bufIndex = Math.floor(index / 8) 10 | return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1 11 | }, 12 | 13 | put: function (num, length) { 14 | for (let i = 0; i < length; i++) { 15 | this.putBit(((num >>> (length - i - 1)) & 1) === 1) 16 | } 17 | }, 18 | 19 | getLengthInBits: function () { 20 | return this.length 21 | }, 22 | 23 | putBit: function (bit) { 24 | const bufIndex = Math.floor(this.length / 8) 25 | if (this.buffer.length <= bufIndex) { 26 | this.buffer.push(0) 27 | } 28 | 29 | if (bit) { 30 | this.buffer[bufIndex] |= (0x80 >>> (this.length % 8)) 31 | } 32 | 33 | this.length++ 34 | } 35 | } 36 | 37 | module.exports = BitBuffer 38 | -------------------------------------------------------------------------------- /src/components/post/3/post.ejs: -------------------------------------------------------------------------------- 1 |
2 |

狗屁不通文章生成器

3 |
4 | 分类目录 5 |
6 | 7 | 2022-13-14 05:20 8 |
9 | 浏览次数:2028 10 |
11 |
12 |

狗屁不通文章生成器,就是你随便输入一个主题,然后这个生成器可以根据你输入主题的文字,生成一篇文章。当然了,这个狗屁不通文章生成器,现在还不太智能,之所以火了,就是因为它不算太智能(因为作者应该不太懂神经网络算法,所以没有加入任何自然语言处理的算法),生成的文章都啰里啰嗦,内容重复,乱七八糟,所以大家感觉好玩就火了。

13 |

狗屁不通文章生成器,就是你随便输入一个主题,然后这个生成器可以根据你输入主题的文字,生成一篇文章。当然了,这个狗屁不通文章生成器,现在还不太智能,之所以火了,就是因为它不算太智能(因为作者应该不太懂神经网络算法,所以没有加入任何自然语言处理的算法),生成的文章都啰里啰嗦,内容重复,乱七八糟,所以大家感觉好玩就火了。

14 |
15 |
16 | 标签: 17 | 腾讯、 18 | 阿里巴巴、 19 | 抖音、 20 | google、 21 | 快手 22 |
23 |
-------------------------------------------------------------------------------- /src/components/service/3/service.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
策略
7 |
STRATEGY
8 |
9 |
10 |
11 |
设计
12 |
DESIGN
13 |
14 |
15 |
16 |
技术
17 |
TECHNOLOGY
18 |
19 |
20 |
21 |
服务
22 |
SERVICE
23 |
24 |
25 |
26 |
-------------------------------------------------------------------------------- /src/components/service/1/service.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 |
品牌缔造
8 |
brand
9 |
10 |
11 |
12 |
13 |
品牌缔造
14 |
brand
15 |
16 | 17 |
18 |
19 | 20 |
21 |
品牌缔造
22 |
brand
23 |
24 |
25 |
26 |
27 |
品牌缔造
28 |
brand
29 |
30 | 31 |
32 |
33 |
34 |
-------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC BY-NC-SA 4.0 License 2 | 3 | js2-static-builder © 2020 by mkinit 4 | 5 | To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ 6 | 7 | Share — copy and redistribute the material in any medium or format 8 | 9 | Adapt — remix, transform, and build upon the material 10 | 11 | The licensor cannot revoke these freedoms as long as you follow the license terms. 12 | 13 | Under the following terms: 14 | 15 | Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 16 | 17 | NonCommercial — You may not use the material for commercial purposes . 18 | 19 | ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. 20 | 21 | No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. 22 | -------------------------------------------------------------------------------- /src/components/login-register-form/3/login-register-form.less: -------------------------------------------------------------------------------- 1 | .c-login-register-form-3 { 2 | padding: 1em 0 2em; 3 | 4 | .form { 5 | margin: 0 auto; 6 | max-width: 360px; 7 | box-shadow: 0 0 5px var(--border); 8 | padding: 2.5em 3em; 9 | border-radius: 4px; 10 | 11 | .item { 12 | display: flex; 13 | align-items: center; 14 | margin-bottom: 1em; 15 | border-radius: 4px; 16 | overflow: hidden; 17 | 18 | .dashicons-admin-users, 19 | .dashicons-lock { 20 | color: var(--primary); 21 | } 22 | 23 | .input-title { 24 | padding: 0 .5em; 25 | } 26 | 27 | input { 28 | border: none; 29 | border-bottom: 1px solid var(--border); 30 | width: 100%; 31 | line-height: 32px; 32 | } 33 | } 34 | 35 | .action { 36 | text-align: center; 37 | padding-top: .5em; 38 | 39 | .btn-submit { 40 | width: 100%; 41 | border-radius: 2em; 42 | } 43 | } 44 | 45 | .bottom { 46 | display: flex; 47 | justify-content: center; 48 | margin-top: 1em; 49 | a{ 50 | margin:0 .5em; 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012 Ryan Day 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | 11 | -------------------------------------------------------------------------------- /src/components/service/3/service.less: -------------------------------------------------------------------------------- 1 | .c-service-3 { 2 | background-color: rgba(var(--font), .82); 3 | 4 | .items { 5 | display: flex; 6 | justify-content: space-around; 7 | padding-top: 1em; 8 | 9 | .item { 10 | text-align: center; 11 | color: var(--invert); 12 | font-size: 1.25em; 13 | line-height: 1.8; 14 | 15 | .icon { 16 | width: 100px; 17 | border: 1px solid var(--invert); 18 | padding: 20px; 19 | border-radius: 50%; 20 | position: relative; 21 | transition: all .2s linear; 22 | 23 | &:hover { 24 | transform: scale(.7); 25 | 26 | &::after { 27 | width: 150px; 28 | height: 150px; 29 | box-shadow: 0 0 10px 10px var(--invert); 30 | } 31 | } 32 | 33 | &::after { 34 | display: block; 35 | content: ""; 36 | width: 100px; 37 | height: 100px; 38 | position: absolute; 39 | top: 50%; 40 | left: 50%; 41 | transform: translate(-50%, -50%); 42 | z-index: 10; 43 | border-radius: 50%; 44 | transition: all .2s linear; 45 | 46 | } 47 | } 48 | 49 | .title { 50 | margin-top: 1em; 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/error-correction-level.js: -------------------------------------------------------------------------------- 1 | exports.L = { bit: 1 } 2 | exports.M = { bit: 0 } 3 | exports.Q = { bit: 3 } 4 | exports.H = { bit: 2 } 5 | 6 | function fromString (string) { 7 | if (typeof string !== 'string') { 8 | throw new Error('Param is not a string') 9 | } 10 | 11 | const lcStr = string.toLowerCase() 12 | 13 | switch (lcStr) { 14 | case 'l': 15 | case 'low': 16 | return exports.L 17 | 18 | case 'm': 19 | case 'medium': 20 | return exports.M 21 | 22 | case 'q': 23 | case 'quartile': 24 | return exports.Q 25 | 26 | case 'h': 27 | case 'high': 28 | return exports.H 29 | 30 | default: 31 | throw new Error('Unknown EC Level: ' + string) 32 | } 33 | } 34 | 35 | exports.isValid = function isValid (level) { 36 | return level && typeof level.bit !== 'undefined' && 37 | level.bit >= 0 && level.bit < 4 38 | } 39 | 40 | exports.from = function from (value, defaultValue) { 41 | if (exports.isValid(value)) { 42 | return value 43 | } 44 | 45 | try { 46 | return fromString(value) 47 | } catch (e) { 48 | return defaultValue 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/components/tag-list/1/tag-list.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
热门标签
4 | 33 |
34 |
-------------------------------------------------------------------------------- /src/components/banner/1/banner.less: -------------------------------------------------------------------------------- 1 | .c-banner-1 { 2 | width: 100%; 3 | margin: 0 auto; 4 | overflow: hidden; 5 | 6 | ul { 7 | position: relative; 8 | width: 500%; 9 | left: 0; 10 | animation: banner 30s 3s infinite; 11 | } 12 | 13 | ul li { 14 | width: 20%; 15 | float: left; 16 | } 17 | 18 | @keyframes banner { 19 | 10% { 20 | /*第一张图*/ 21 | left: 0%; 22 | } 23 | 24 | 13% { 25 | /*第二张图*/ 26 | left: -100%; 27 | } 28 | 29 | 30% { 30 | left: -100%; 31 | } 32 | 33 | 33% { 34 | /*第三张图*/ 35 | left: -200%; 36 | } 37 | 38 | 50% { 39 | left: -200%; 40 | } 41 | 42 | 53% { 43 | /*第四张图*/ 44 | left: -300%; 45 | } 46 | 47 | 70% { 48 | left: -300%; 49 | } 50 | 51 | 73% { 52 | /*第五张图*/ 53 | left: -400%; 54 | } 55 | 56 | 90% { 57 | left: -400%; 58 | } 59 | 60 | 93% { 61 | left: 0%; 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /src/components/menu/3/menu.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 | 27 |
28 |
-------------------------------------------------------------------------------- /src/components/sidebar-tool/1/sidebar-tool.ejs: -------------------------------------------------------------------------------- 1 |
2 | 8 | 14 |
15 | 16 |
17 | 微信联系 18 | 19 |
20 |
21 |
22 | 23 |
24 | 25 | 移动端浏览 26 |
27 |
28 |
29 |
-------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/regex.js: -------------------------------------------------------------------------------- 1 | const numeric = '[0-9]+' 2 | const alphanumeric = '[A-Z $%*+\\-./:]+' 3 | let kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' + 4 | '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' + 5 | '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' + 6 | '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+' 7 | kanji = kanji.replace(/u/g, '\\u') 8 | 9 | const byte = '(?:(?![A-Z0-9 $%*+\\-./:]|' + kanji + ')(?:.|[\r\n]))+' 10 | 11 | exports.KANJI = new RegExp(kanji, 'g') 12 | exports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\-./:]+', 'g') 13 | exports.BYTE = new RegExp(byte, 'g') 14 | exports.NUMERIC = new RegExp(numeric, 'g') 15 | exports.ALPHANUMERIC = new RegExp(alphanumeric, 'g') 16 | 17 | const TEST_KANJI = new RegExp('^' + kanji + '$') 18 | const TEST_NUMERIC = new RegExp('^' + numeric + '$') 19 | const TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\-./:]+$') 20 | 21 | exports.testKanji = function testKanji (str) { 22 | return TEST_KANJI.test(str) 23 | } 24 | 25 | exports.testNumeric = function testNumeric (str) { 26 | return TEST_NUMERIC.test(str) 27 | } 28 | 29 | exports.testAlphanumeric = function testAlphanumeric (str) { 30 | return TEST_ALPHANUMERIC.test(str) 31 | } 32 | -------------------------------------------------------------------------------- /src/components/service/2/service.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
    7 |

    交互原型设计

    8 |
  • 信息架构
  • 9 |
  • 界面布局
  • 10 |
  • 快速原型
  • 11 |
  • 产品原型
  • 12 |
  • 低保真原型
  • 13 |
14 |
15 |
16 | 17 |
    18 |

    产品视觉设计

    19 |
  • 视觉设计
  • 20 |
  • 品牌形象
  • 21 |
  • 图标设计
  • 22 |
  • 前端架构及开发
  • 23 |
  • 设计规范与风格指南
  • 24 |
25 |
26 |
27 | 28 |
    29 |

    网站设计与开发

    30 |
  • 展示营销网站
  • 31 |
  • 电子商务网站
  • 32 |
  • 前端开发与测试
  • 33 |
  • 品牌网站设计开发
  • 34 |
  • 手机网站/响应式网站
  • 35 |
36 |
37 |
38 | 39 |
    40 |

    移动产品设计

    41 |
  • 移动界面设计
  • 42 |
  • 微信公众平台
  • 43 |
  • html5设计开发
  • 44 |
  • 移动网站设计开发
  • 45 |
  • iOS/Android界面设计
  • 46 |
47 |
48 |
49 |
50 |
-------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/format-info.js: -------------------------------------------------------------------------------- 1 | const Utils = require('./utils') 2 | 3 | const G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0) 4 | const G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1) 5 | const G15_BCH = Utils.getBCHDigit(G15) 6 | 7 | /** 8 | * Returns format information with relative error correction bits 9 | * 10 | * The format information is a 15-bit sequence containing 5 data bits, 11 | * with 10 error correction bits calculated using the (15, 5) BCH code. 12 | * 13 | * @param {Number} errorCorrectionLevel Error correction level 14 | * @param {Number} mask Mask pattern 15 | * @return {Number} Encoded format information bits 16 | */ 17 | exports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) { 18 | const data = ((errorCorrectionLevel.bit << 3) | mask) 19 | let d = data << 10 20 | 21 | while (Utils.getBCHDigit(d) - G15_BCH >= 0) { 22 | d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH)) 23 | } 24 | 25 | // xor final data with mask pattern in order to ensure that 26 | // no combination of Error Correction Level and data mask pattern 27 | // will result in an all-zero data string 28 | return ((data << 10) | d) ^ G15_MASK 29 | } 30 | -------------------------------------------------------------------------------- /src/components/sidebar-tool/1/sidebar-tool.less: -------------------------------------------------------------------------------- 1 | .c-sidebar-tool-1{ 2 | position:fixed; 3 | z-index:100; 4 | right:-2px; 5 | bottom:10%; 6 | width:44px; 7 | .item{ 8 | background-color: var(--font); 9 | box-shadow: 0 0 5px var(--border); 10 | margin:1px 0; 11 | cursor: pointer; 12 | color:var(--invert); 13 | white-space: nowrap; 14 | transition: all .5s linear; 15 | position:relative; 16 | left:0; 17 | transform: translateX(0); 18 | width:max-content; 19 | padding:5px 6px; 20 | .icon{ 21 | vertical-align: middle; 22 | } 23 | a{ 24 | color:var(--invert); 25 | display: flex; 26 | align-items: center; 27 | } 28 | &:hover{ 29 | background-color: var(--primary); 30 | } 31 | .text{ 32 | margin-left:8px; 33 | } 34 | } 35 | .stretch{ 36 | &:hover{ 37 | transform: translateX(calc(-100% + 46px)); 38 | } 39 | } 40 | .show-img{ 41 | position: relative; 42 | &:hover{ 43 | .img-box{ 44 | display: flex; 45 | } 46 | } 47 | .img-box{ 48 | border:1px solid var(--border); 49 | width:150px; 50 | position:absolute; 51 | left:-150px; 52 | bottom:0; 53 | background-color: var(--invert); 54 | padding:10px; 55 | text-align:center; 56 | color:var(--font); 57 | display: none; 58 | flex-direction:column-reverse; 59 | .text{ 60 | margin-top:5px; 61 | } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /src/components/client/1/client.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 |
23 | 24 |
25 |
26 | 27 |
28 |
29 | 30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 |
41 |
42 |
-------------------------------------------------------------------------------- /src/components/menu/4/menu.ejs: -------------------------------------------------------------------------------- 1 | 39 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/numeric-data.js: -------------------------------------------------------------------------------- 1 | const Mode = require('./mode') 2 | 3 | function NumericData (data) { 4 | this.mode = Mode.NUMERIC 5 | this.data = data.toString() 6 | } 7 | 8 | NumericData.getBitsLength = function getBitsLength (length) { 9 | return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0) 10 | } 11 | 12 | NumericData.prototype.getLength = function getLength () { 13 | return this.data.length 14 | } 15 | 16 | NumericData.prototype.getBitsLength = function getBitsLength () { 17 | return NumericData.getBitsLength(this.data.length) 18 | } 19 | 20 | NumericData.prototype.write = function write (bitBuffer) { 21 | let i, group, value 22 | 23 | // The input data string is divided into groups of three digits, 24 | // and each group is converted to its 10-bit binary equivalent. 25 | for (i = 0; i + 3 <= this.data.length; i += 3) { 26 | group = this.data.substr(i, 3) 27 | value = parseInt(group, 10) 28 | 29 | bitBuffer.put(value, 10) 30 | } 31 | 32 | // If the number of input digits is not an exact multiple of three, 33 | // the final one or two digits are converted to 4 or 7 bits respectively. 34 | const remainingNum = this.data.length - i 35 | if (remainingNum > 0) { 36 | group = this.data.substr(i) 37 | value = parseInt(group, 10) 38 | 39 | bitBuffer.put(value, remainingNum * 3 + 1) 40 | } 41 | } 42 | 43 | module.exports = NumericData 44 | -------------------------------------------------------------------------------- /src/view/template-1/main.less: -------------------------------------------------------------------------------- 1 | //轮播图样式 2 | @import url('./style/swiper-bundle.min.css'); 3 | 4 | //字体图标 5 | @import url('~@/iconfont/dashicons.css'); 6 | 7 | //菜单 8 | @import url('~@/components/menu/3/menu.less'); 9 | 10 | //横幅/轮播图 11 | @import url('~@/components/banner/2/banner.less'); 12 | 13 | //顶部横幅 14 | @import url('~@/components/cover/1/cover.less'); 15 | 16 | //面包屑导航 17 | @import url('~@/components/crumbs/1/crumbs.less'); 18 | 19 | //友情链接 20 | @import url('~@/components/friend-link/1/friend-link.less'); 21 | 22 | //分页导航 23 | @import url('~@/components/pagination/1/pagination.less'); 24 | 25 | //底部 26 | @import url('~@/components/bottom/2/bottom.less'); 27 | 28 | //内容列表 29 | @import url('~@/components/post-list/1/post-list.less'); 30 | @import url('~@/components/post-list/2/post-list.less'); 31 | 32 | //产品列表 33 | @import url('~@/components/product-list/1/product-list.less'); 34 | @import url('~@/components/product-list/2/product-list.less'); 35 | 36 | //内容 37 | @import url('~@/components/post/1/post.less'); 38 | 39 | //边栏 40 | @import url('~@/components/sidebar/1/sidebar.less'); 41 | 42 | //边栏工具 43 | @import url('~@/components/sidebar-tool/1/sidebar-tool.less'); 44 | 45 | //关于我们 46 | @import url('~@/components/about/1/about.less'); 47 | 48 | //公司文化 49 | @import url('~@/components/culture/1/culture.less'); 50 | 51 | //服务 52 | @import url('~@/components/service/1/service.less'); 53 | 54 | //合作客户 55 | @import url('~@/components/client/1/client.less'); 56 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/terminal/terminal.js: -------------------------------------------------------------------------------- 1 | // let Utils = require('./utils') 2 | 3 | exports.render = function (qrData, options, cb) { 4 | const size = qrData.modules.size 5 | const data = qrData.modules.data 6 | 7 | // let opts = Utils.getOptions(options) 8 | 9 | // use same scheme as https://github.com/gtanner/qrcode-terminal because it actually works! =) 10 | const black = '\x1b[40m \x1b[0m' 11 | const white = '\x1b[47m \x1b[0m' 12 | 13 | let output = '' 14 | const hMargin = Array(size + 3).join(white) 15 | const vMargin = Array(2).join(white) 16 | 17 | output += hMargin + '\n' 18 | for (let i = 0; i < size; ++i) { 19 | output += white 20 | for (let j = 0; j < size; j++) { 21 | // let topModule = data[i * size + j] 22 | // let bottomModule = data[(i + 1) * size + j] 23 | 24 | output += data[i * size + j] ? black : white// getBlockChar(topModule, bottomModule) 25 | } 26 | // output += white+'\n' 27 | output += vMargin + '\n' 28 | } 29 | 30 | output += hMargin + '\n' 31 | 32 | if (typeof cb === 'function') { 33 | cb(null, output) 34 | } 35 | 36 | return output 37 | } 38 | /* 39 | exports.renderToFile = function renderToFile (path, qrData, options, cb) { 40 | if (typeof cb === 'undefined') { 41 | cb = options 42 | options = undefined 43 | } 44 | 45 | let fs = require('fs') 46 | let utf8 = exports.render(qrData, options) 47 | fs.writeFile(path, utf8, cb) 48 | } 49 | */ 50 | -------------------------------------------------------------------------------- /src/components/bottom/1/bottom.less: -------------------------------------------------------------------------------- 1 | .c-bottom-1 { 2 | background-color: var(--font-second); 3 | color: #FFF; 4 | padding: 4em 1em 2em; 5 | 6 | a { 7 | color: #FFF; 8 | } 9 | 10 | .bottom { 11 | display: flex; 12 | justify-content: space-between; 13 | padding-bottom:3em; 14 | 15 | .slogan { 16 | font-size: 2em; 17 | font-weight: bold; 18 | .en{ 19 | font-size:.5em; 20 | color:#FFF; 21 | text-transform: uppercase; 22 | font-weight: normal; 23 | line-height:2; 24 | } 25 | } 26 | 27 | .tel { 28 | font-size: 1.125em; 29 | font-weight: bold; 30 | margin-top:2em; 31 | } 32 | 33 | .address { 34 | font-size: .85em; 35 | line-height: 2; 36 | } 37 | 38 | .middle { 39 | display: flex; 40 | 41 | .menu { 42 | margin: 0 2em; 43 | .title{ 44 | font-size:1.125em; 45 | font-weight: bold; 46 | } 47 | 48 | ul { 49 | margin-top: 1em; 50 | 51 | li { 52 | a { 53 | color: #FFF; 54 | font-size: .85em; 55 | line-height: 2em; 56 | } 57 | } 58 | } 59 | } 60 | } 61 | 62 | .right{ 63 | display: flex; 64 | .qrcode{ 65 | text-align:center; 66 | line-height: 2; 67 | &:nth-child(2){ 68 | margin-left:2em; 69 | } 70 | img{ 71 | max-width:100px; 72 | } 73 | } 74 | } 75 | } 76 | 77 | .copyright { 78 | border-top: 1px solid var(--font-second); 79 | padding:1.5em 0; 80 | font-size:.85em; 81 | text-align:center; 82 | } 83 | } -------------------------------------------------------------------------------- /src/components/culture/1/culture.less: -------------------------------------------------------------------------------- 1 | .c-culture-1 { 2 | .wrap { 3 | margin-top: 1.5em; 4 | background: url('./culture-1.jpg') center/cover no-repeat; 5 | background-blend-mode: multiply; 6 | display: flex; 7 | flex-wrap: wrap; 8 | justify-content: space-between; 9 | align-items: flex-end; 10 | position: relative; 11 | 12 | .item { 13 | width: 50%; 14 | height: 280px; 15 | display: flex; 16 | flex-direction: column; 17 | justify-content: center; 18 | align-items: center; 19 | color: #FFF; 20 | transition: all .2s linear; 21 | position: relative; 22 | 23 | .title{ 24 | font-size:1.75em; 25 | } 26 | 27 | &:nth-child(1), 28 | &:nth-child(3) { 29 | border-right: 15px solid #FFF; 30 | } 31 | 32 | &:nth-child(2), 33 | &:nth-child(4) { 34 | border-left: 15px solid #FFF; 35 | } 36 | 37 | &:nth-child(1), 38 | &:nth-child(2) { 39 | border-bottom: 15px solid #FFF; 40 | } 41 | 42 | &:nth-child(3), 43 | &:nth-child(4) { 44 | border-top: 15px solid #FFF; 45 | } 46 | 47 | &:hover { 48 | background-color: rgba(var(--primary), .82); 49 | 50 | &::after { 51 | transform: scale(.7); 52 | border-color: #FFF; 53 | } 54 | 55 | } 56 | 57 | &::after { 58 | content: ""; 59 | display: block; 60 | position: absolute; 61 | z-index: 10; 62 | width: calc(100%); 63 | height: calc(100%); 64 | border: 4px solid transparent; 65 | transition: all .2s linear; 66 | } 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /src/components/menu/4/menu.less: -------------------------------------------------------------------------------- 1 | .c-menu-4 { 2 | position: fixed; 3 | left: 0px; 4 | top: 0; 5 | width: 220px; 6 | text-align: center; 7 | border-right: 6px solid var(--border); 8 | transition: all .3s linear; 9 | z-index: 1000; 10 | line-height: 2.5; 11 | background-color: var(--bg); 12 | min-height: 100vh; 13 | 14 | .logo { 15 | padding: 0 2em; 16 | } 17 | 18 | &.show { 19 | left: 0; 20 | 21 | .close-btn { 22 | display: block; 23 | } 24 | 25 | .menu-btn { 26 | display: none; 27 | } 28 | 29 | .dashicons-arrow-down-alt2 { 30 | display: block; 31 | } 32 | } 33 | 34 | .menu-btn { 35 | display: none; 36 | } 37 | 38 | .close-btn { 39 | display: none; 40 | } 41 | 42 | .dashicons { 43 | &:hover { 44 | color: var(--secondary); 45 | } 46 | } 47 | 48 | .dashicons.close-btn, 49 | .dashicons.menu-btn { 50 | font-size: 40px; 51 | width: 40px; 52 | height: 40px; 53 | cursor: pointer; 54 | position: absolute; 55 | top: 5px; 56 | right: 5px; 57 | z-index: 10; 58 | } 59 | 60 | .menu-list { 61 | a { 62 | display: block; 63 | position: relative; 64 | 65 | 66 | &.current,&:hover { 67 | color: var(--secondary); 68 | } 69 | } 70 | 71 | &>li { 72 | 73 | &>a { 74 | font-size: 16px; 75 | line-height: 2.5; 76 | font-weight: bold; 77 | } 78 | 79 | } 80 | 81 | 82 | .sub-menu { 83 | display: block; 84 | background-color: var(--invert); 85 | box-shadow: inset 0 2px 6px var(--border); 86 | line-height: 2; 87 | padding: .5em 0; 88 | 89 | 90 | } 91 | 92 | } 93 | 94 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js2-static-builder", 3 | "version": "2.1.1", 4 | "description": "静态页面项目构建方案(脚手架/开发环境)", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "cross-env NODE_ENV=production webpack", 8 | "dev": "cross-env NODE_ENV=development webpack-dev-server" 9 | }, 10 | "keywords": [ 11 | "ejs", 12 | "html", 13 | "css", 14 | "js", 15 | "webpack", 16 | "scaffold", 17 | "static", 18 | "components", 19 | "modules" 20 | ], 21 | "author": "im@mkinit.com", 22 | "github": "https://github.com/mkinit/js2-static-builder", 23 | "license": "ISC", 24 | "devDependencies": { 25 | "@babel/core": "^7.6.2", 26 | "@babel/preset-env": "^7.6.2", 27 | "autoprefixer": "^9.6.1", 28 | "babel-loader": "^8.0.6", 29 | "clean-webpack-plugin": "^3.0.0", 30 | "cross-env": "^5.2.0", 31 | "css-loader": "^2.1.1", 32 | "ejs": "^3.0.1", 33 | "ejs-loader": "^0.3.5", 34 | "file-loader": "^3.0.1", 35 | "html-webpack-plugin": "^3.2.0", 36 | "less": "^3.9.0", 37 | "less-loader": "^4.1.0", 38 | "mini-css-extract-plugin": "^0.5.0", 39 | "optimize-css-assets-webpack-plugin": "^5.0.8", 40 | "postcss-loader": "^3.0.0", 41 | "webpack": "^4.29.6", 42 | "webpack-cli": "^3.2.3", 43 | "webpack-dev-server": "^3.7.2", 44 | "webpack-spritesmith": "^1.0.2" 45 | }, 46 | "dependencies": { 47 | "qrcode": "^1.5.1", 48 | "swiper": "^8.3.0" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/components/bottom/1/bottom.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |
一切皆有可能
7 |
Impossible is nothing
8 |
9 |
电话:020-88888888
10 |
地址:广东省,广州市,海珠区,阅江西路222号
11 |
12 |
13 | 22 | 32 | 40 |
41 |
42 |
43 | 44 |
关注公众号
45 |
46 |
47 | 48 |
关注公众号
49 |
50 |
51 |
52 | 56 |
57 |
-------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/canvas.js: -------------------------------------------------------------------------------- 1 | const Utils = require('./utils') 2 | 3 | function clearCanvas (ctx, canvas, size) { 4 | ctx.clearRect(0, 0, canvas.width, canvas.height) 5 | 6 | if (!canvas.style) canvas.style = {} 7 | canvas.height = size 8 | canvas.width = size 9 | canvas.style.height = size + 'px' 10 | canvas.style.width = size + 'px' 11 | } 12 | 13 | function getCanvasElement () { 14 | try { 15 | return document.createElement('canvas') 16 | } catch (e) { 17 | throw new Error('You need to specify a canvas element') 18 | } 19 | } 20 | 21 | exports.render = function render (qrData, canvas, options) { 22 | let opts = options 23 | let canvasEl = canvas 24 | 25 | if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) { 26 | opts = canvas 27 | canvas = undefined 28 | } 29 | 30 | if (!canvas) { 31 | canvasEl = getCanvasElement() 32 | } 33 | 34 | opts = Utils.getOptions(opts) 35 | const size = Utils.getImageWidth(qrData.modules.size, opts) 36 | 37 | const ctx = canvasEl.getContext('2d') 38 | const image = ctx.createImageData(size, size) 39 | Utils.qrToImageData(image.data, qrData, opts) 40 | 41 | clearCanvas(ctx, canvasEl, size) 42 | ctx.putImageData(image, 0, 0) 43 | 44 | return canvasEl 45 | } 46 | 47 | exports.renderToDataURL = function renderToDataURL (qrData, canvas, options) { 48 | let opts = options 49 | 50 | if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) { 51 | opts = canvas 52 | canvas = undefined 53 | } 54 | 55 | if (!opts) opts = {} 56 | 57 | const canvasEl = exports.render(qrData, canvas, opts) 58 | 59 | const type = opts.type || 'image/png' 60 | const rendererOpts = opts.rendererOpts || {} 61 | 62 | return canvasEl.toDataURL(type, rendererOpts.quality) 63 | } 64 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/bit-matrix.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Helper class to handle QR Code symbol modules 3 | * 4 | * @param {Number} size Symbol size 5 | */ 6 | function BitMatrix (size) { 7 | if (!size || size < 1) { 8 | throw new Error('BitMatrix size must be defined and greater than 0') 9 | } 10 | 11 | this.size = size 12 | this.data = new Uint8Array(size * size) 13 | this.reservedBit = new Uint8Array(size * size) 14 | } 15 | 16 | /** 17 | * Set bit value at specified location 18 | * If reserved flag is set, this bit will be ignored during masking process 19 | * 20 | * @param {Number} row 21 | * @param {Number} col 22 | * @param {Boolean} value 23 | * @param {Boolean} reserved 24 | */ 25 | BitMatrix.prototype.set = function (row, col, value, reserved) { 26 | const index = row * this.size + col 27 | this.data[index] = value 28 | if (reserved) this.reservedBit[index] = true 29 | } 30 | 31 | /** 32 | * Returns bit value at specified location 33 | * 34 | * @param {Number} row 35 | * @param {Number} col 36 | * @return {Boolean} 37 | */ 38 | BitMatrix.prototype.get = function (row, col) { 39 | return this.data[row * this.size + col] 40 | } 41 | 42 | /** 43 | * Applies xor operator at specified location 44 | * (used during masking process) 45 | * 46 | * @param {Number} row 47 | * @param {Number} col 48 | * @param {Boolean} value 49 | */ 50 | BitMatrix.prototype.xor = function (row, col, value) { 51 | this.data[row * this.size + col] ^= value 52 | } 53 | 54 | /** 55 | * Check if bit at specified location is reserved 56 | * 57 | * @param {Number} row 58 | * @param {Number} col 59 | * @return {Boolean} 60 | */ 61 | BitMatrix.prototype.isReserved = function (row, col) { 62 | return this.reservedBit[row * this.size + col] 63 | } 64 | 65 | module.exports = BitMatrix 66 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/kanji-data.js: -------------------------------------------------------------------------------- 1 | const Mode = require('./mode') 2 | const Utils = require('./utils') 3 | 4 | function KanjiData (data) { 5 | this.mode = Mode.KANJI 6 | this.data = data 7 | } 8 | 9 | KanjiData.getBitsLength = function getBitsLength (length) { 10 | return length * 13 11 | } 12 | 13 | KanjiData.prototype.getLength = function getLength () { 14 | return this.data.length 15 | } 16 | 17 | KanjiData.prototype.getBitsLength = function getBitsLength () { 18 | return KanjiData.getBitsLength(this.data.length) 19 | } 20 | 21 | KanjiData.prototype.write = function (bitBuffer) { 22 | let i 23 | 24 | // In the Shift JIS system, Kanji characters are represented by a two byte combination. 25 | // These byte values are shifted from the JIS X 0208 values. 26 | // JIS X 0208 gives details of the shift coded representation. 27 | for (i = 0; i < this.data.length; i++) { 28 | let value = Utils.toSJIS(this.data[i]) 29 | 30 | // For characters with Shift JIS values from 0x8140 to 0x9FFC: 31 | if (value >= 0x8140 && value <= 0x9FFC) { 32 | // Subtract 0x8140 from Shift JIS value 33 | value -= 0x8140 34 | 35 | // For characters with Shift JIS values from 0xE040 to 0xEBBF 36 | } else if (value >= 0xE040 && value <= 0xEBBF) { 37 | // Subtract 0xC140 from Shift JIS value 38 | value -= 0xC140 39 | } else { 40 | throw new Error( 41 | 'Invalid SJIS character: ' + this.data[i] + '\n' + 42 | 'Make sure your charset is UTF-8') 43 | } 44 | 45 | // Multiply most significant byte of result by 0xC0 46 | // and add least significant byte to product 47 | value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff) 48 | 49 | // Convert result to a 13-bit binary string 50 | bitBuffer.put(value, 13) 51 | } 52 | } 53 | 54 | module.exports = KanjiData 55 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/polynomial.js: -------------------------------------------------------------------------------- 1 | const GF = require('./galois-field') 2 | 3 | /** 4 | * Multiplies two polynomials inside Galois Field 5 | * 6 | * @param {Uint8Array} p1 Polynomial 7 | * @param {Uint8Array} p2 Polynomial 8 | * @return {Uint8Array} Product of p1 and p2 9 | */ 10 | exports.mul = function mul (p1, p2) { 11 | const coeff = new Uint8Array(p1.length + p2.length - 1) 12 | 13 | for (let i = 0; i < p1.length; i++) { 14 | for (let j = 0; j < p2.length; j++) { 15 | coeff[i + j] ^= GF.mul(p1[i], p2[j]) 16 | } 17 | } 18 | 19 | return coeff 20 | } 21 | 22 | /** 23 | * Calculate the remainder of polynomials division 24 | * 25 | * @param {Uint8Array} divident Polynomial 26 | * @param {Uint8Array} divisor Polynomial 27 | * @return {Uint8Array} Remainder 28 | */ 29 | exports.mod = function mod (divident, divisor) { 30 | let result = new Uint8Array(divident) 31 | 32 | while ((result.length - divisor.length) >= 0) { 33 | const coeff = result[0] 34 | 35 | for (let i = 0; i < divisor.length; i++) { 36 | result[i] ^= GF.mul(divisor[i], coeff) 37 | } 38 | 39 | // remove all zeros from buffer head 40 | let offset = 0 41 | while (offset < result.length && result[offset] === 0) offset++ 42 | result = result.slice(offset) 43 | } 44 | 45 | return result 46 | } 47 | 48 | /** 49 | * Generate an irreducible generator polynomial of specified degree 50 | * (used by Reed-Solomon encoder) 51 | * 52 | * @param {Number} degree Degree of the generator polynomial 53 | * @return {Uint8Array} Buffer containing polynomial coefficients 54 | */ 55 | exports.generateECPolynomial = function generateECPolynomial (degree) { 56 | let poly = new Uint8Array([1]) 57 | for (let i = 0; i < degree; i++) { 58 | poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)])) 59 | } 60 | 61 | return poly 62 | } 63 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/reed-solomon-encoder.js: -------------------------------------------------------------------------------- 1 | const Polynomial = require('./polynomial') 2 | 3 | function ReedSolomonEncoder (degree) { 4 | this.genPoly = undefined 5 | this.degree = degree 6 | 7 | if (this.degree) this.initialize(this.degree) 8 | } 9 | 10 | /** 11 | * Initialize the encoder. 12 | * The input param should correspond to the number of error correction codewords. 13 | * 14 | * @param {Number} degree 15 | */ 16 | ReedSolomonEncoder.prototype.initialize = function initialize (degree) { 17 | // create an irreducible generator polynomial 18 | this.degree = degree 19 | this.genPoly = Polynomial.generateECPolynomial(this.degree) 20 | } 21 | 22 | /** 23 | * Encodes a chunk of data 24 | * 25 | * @param {Uint8Array} data Buffer containing input data 26 | * @return {Uint8Array} Buffer containing encoded data 27 | */ 28 | ReedSolomonEncoder.prototype.encode = function encode (data) { 29 | if (!this.genPoly) { 30 | throw new Error('Encoder not initialized') 31 | } 32 | 33 | // Calculate EC for this data block 34 | // extends data size to data+genPoly size 35 | const paddedData = new Uint8Array(data.length + this.degree) 36 | paddedData.set(data) 37 | 38 | // The error correction codewords are the remainder after dividing the data codewords 39 | // by a generator polynomial 40 | const remainder = Polynomial.mod(paddedData, this.genPoly) 41 | 42 | // return EC data blocks (last n byte, where n is the degree of genPoly) 43 | // If coefficients number in remainder are less than genPoly degree, 44 | // pad with 0s to the left to reach the needed number of coefficients 45 | const start = this.degree - remainder.length 46 | if (start > 0) { 47 | const buff = new Uint8Array(this.degree) 48 | buff.set(remainder, start) 49 | 50 | return buff 51 | } 52 | 53 | return remainder 54 | } 55 | 56 | module.exports = ReedSolomonEncoder 57 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/utf8.js: -------------------------------------------------------------------------------- 1 | const Utils = require('./utils') 2 | 3 | const BLOCK_CHAR = { 4 | WW: ' ', 5 | WB: '▄', 6 | BB: '█', 7 | BW: '▀' 8 | } 9 | 10 | const INVERTED_BLOCK_CHAR = { 11 | BB: ' ', 12 | BW: '▄', 13 | WW: '█', 14 | WB: '▀' 15 | } 16 | 17 | function getBlockChar (top, bottom, blocks) { 18 | if (top && bottom) return blocks.BB 19 | if (top && !bottom) return blocks.BW 20 | if (!top && bottom) return blocks.WB 21 | return blocks.WW 22 | } 23 | 24 | exports.render = function (qrData, options, cb) { 25 | const opts = Utils.getOptions(options) 26 | let blocks = BLOCK_CHAR 27 | if (opts.color.dark.hex === '#ffffff' || opts.color.light.hex === '#000000') { 28 | blocks = INVERTED_BLOCK_CHAR 29 | } 30 | 31 | const size = qrData.modules.size 32 | const data = qrData.modules.data 33 | 34 | let output = '' 35 | let hMargin = Array(size + (opts.margin * 2) + 1).join(blocks.WW) 36 | hMargin = Array((opts.margin / 2) + 1).join(hMargin + '\n') 37 | 38 | const vMargin = Array(opts.margin + 1).join(blocks.WW) 39 | 40 | output += hMargin 41 | for (let i = 0; i < size; i += 2) { 42 | output += vMargin 43 | for (let j = 0; j < size; j++) { 44 | const topModule = data[i * size + j] 45 | const bottomModule = data[(i + 1) * size + j] 46 | 47 | output += getBlockChar(topModule, bottomModule, blocks) 48 | } 49 | 50 | output += vMargin + '\n' 51 | } 52 | 53 | output += hMargin.slice(0, -1) 54 | 55 | if (typeof cb === 'function') { 56 | cb(null, output) 57 | } 58 | 59 | return output 60 | } 61 | 62 | exports.renderToFile = function renderToFile (path, qrData, options, cb) { 63 | if (typeof cb === 'undefined') { 64 | cb = options 65 | options = undefined 66 | } 67 | 68 | const fs = require('fs') 69 | const utf8 = exports.render(qrData, options) 70 | fs.writeFile(path, utf8, cb) 71 | } 72 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/utils.js: -------------------------------------------------------------------------------- 1 | let toSJISFunction 2 | const CODEWORDS_COUNT = [ 3 | 0, // Not used 4 | 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 5 | 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 6 | 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 7 | 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706 8 | ] 9 | 10 | /** 11 | * Returns the QR Code size for the specified version 12 | * 13 | * @param {Number} version QR Code version 14 | * @return {Number} size of QR code 15 | */ 16 | exports.getSymbolSize = function getSymbolSize (version) { 17 | if (!version) throw new Error('"version" cannot be null or undefined') 18 | if (version < 1 || version > 40) throw new Error('"version" should be in range from 1 to 40') 19 | return version * 4 + 17 20 | } 21 | 22 | /** 23 | * Returns the total number of codewords used to store data and EC information. 24 | * 25 | * @param {Number} version QR Code version 26 | * @return {Number} Data length in bits 27 | */ 28 | exports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) { 29 | return CODEWORDS_COUNT[version] 30 | } 31 | 32 | /** 33 | * Encode data with Bose-Chaudhuri-Hocquenghem 34 | * 35 | * @param {Number} data Value to encode 36 | * @return {Number} Encoded value 37 | */ 38 | exports.getBCHDigit = function (data) { 39 | let digit = 0 40 | 41 | while (data !== 0) { 42 | digit++ 43 | data >>>= 1 44 | } 45 | 46 | return digit 47 | } 48 | 49 | exports.setToSJISFunction = function setToSJISFunction (f) { 50 | if (typeof f !== 'function') { 51 | throw new Error('"toSJISFunc" is not a valid function.') 52 | } 53 | 54 | toSJISFunction = f 55 | } 56 | 57 | exports.isKanjiModeEnabled = function () { 58 | return typeof toSJISFunction !== 'undefined' 59 | } 60 | 61 | exports.toSJIS = function toSJIS (kanji) { 62 | return toSJISFunction(kanji) 63 | } 64 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/alphanumeric-data.js: -------------------------------------------------------------------------------- 1 | const Mode = require('./mode') 2 | 3 | /** 4 | * Array of characters available in alphanumeric mode 5 | * 6 | * As per QR Code specification, to each character 7 | * is assigned a value from 0 to 44 which in this case coincides 8 | * with the array index 9 | * 10 | * @type {Array} 11 | */ 12 | const ALPHA_NUM_CHARS = [ 13 | '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 14 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 15 | 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 16 | ' ', '$', '%', '*', '+', '-', '.', '/', ':' 17 | ] 18 | 19 | function AlphanumericData (data) { 20 | this.mode = Mode.ALPHANUMERIC 21 | this.data = data 22 | } 23 | 24 | AlphanumericData.getBitsLength = function getBitsLength (length) { 25 | return 11 * Math.floor(length / 2) + 6 * (length % 2) 26 | } 27 | 28 | AlphanumericData.prototype.getLength = function getLength () { 29 | return this.data.length 30 | } 31 | 32 | AlphanumericData.prototype.getBitsLength = function getBitsLength () { 33 | return AlphanumericData.getBitsLength(this.data.length) 34 | } 35 | 36 | AlphanumericData.prototype.write = function write (bitBuffer) { 37 | let i 38 | 39 | // Input data characters are divided into groups of two characters 40 | // and encoded as 11-bit binary codes. 41 | for (i = 0; i + 2 <= this.data.length; i += 2) { 42 | // The character value of the first character is multiplied by 45 43 | let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45 44 | 45 | // The character value of the second digit is added to the product 46 | value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1]) 47 | 48 | // The sum is then stored as 11-bit binary number 49 | bitBuffer.put(value, 11) 50 | } 51 | 52 | // If the number of input data characters is not a multiple of two, 53 | // the character value of the final character is encoded as a 6-bit binary number. 54 | if (this.data.length % 2) { 55 | bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6) 56 | } 57 | } 58 | 59 | module.exports = AlphanumericData 60 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/png.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const PNG = require('pngjs').PNG 3 | const Utils = require('./utils') 4 | 5 | exports.render = function render (qrData, options) { 6 | const opts = Utils.getOptions(options) 7 | const pngOpts = opts.rendererOpts 8 | const size = Utils.getImageWidth(qrData.modules.size, opts) 9 | 10 | pngOpts.width = size 11 | pngOpts.height = size 12 | 13 | const pngImage = new PNG(pngOpts) 14 | Utils.qrToImageData(pngImage.data, qrData, opts) 15 | 16 | return pngImage 17 | } 18 | 19 | exports.renderToDataURL = function renderToDataURL (qrData, options, cb) { 20 | if (typeof cb === 'undefined') { 21 | cb = options 22 | options = undefined 23 | } 24 | 25 | exports.renderToBuffer(qrData, options, function (err, output) { 26 | if (err) cb(err) 27 | let url = 'data:image/png;base64,' 28 | url += output.toString('base64') 29 | cb(null, url) 30 | }) 31 | } 32 | 33 | exports.renderToBuffer = function renderToBuffer (qrData, options, cb) { 34 | if (typeof cb === 'undefined') { 35 | cb = options 36 | options = undefined 37 | } 38 | 39 | const png = exports.render(qrData, options) 40 | const buffer = [] 41 | 42 | png.on('error', cb) 43 | 44 | png.on('data', function (data) { 45 | buffer.push(data) 46 | }) 47 | 48 | png.on('end', function () { 49 | cb(null, Buffer.concat(buffer)) 50 | }) 51 | 52 | png.pack() 53 | } 54 | 55 | exports.renderToFile = function renderToFile (path, qrData, options, cb) { 56 | if (typeof cb === 'undefined') { 57 | cb = options 58 | options = undefined 59 | } 60 | 61 | let called = false 62 | const done = (...args) => { 63 | if (called) return 64 | called = true 65 | cb.apply(null, args) 66 | } 67 | const stream = fs.createWriteStream(path) 68 | 69 | stream.on('error', done) 70 | stream.on('close', done) 71 | 72 | exports.renderToFileStream(stream, qrData, options) 73 | } 74 | 75 | exports.renderToFileStream = function renderToFileStream (stream, qrData, options) { 76 | const png = exports.render(qrData, options) 77 | png.pack().pipe(stream) 78 | } 79 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/galois-field.js: -------------------------------------------------------------------------------- 1 | const EXP_TABLE = new Uint8Array(512) 2 | const LOG_TABLE = new Uint8Array(256) 3 | /** 4 | * Precompute the log and anti-log tables for faster computation later 5 | * 6 | * For each possible value in the galois field 2^8, we will pre-compute 7 | * the logarithm and anti-logarithm (exponential) of this value 8 | * 9 | * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields} 10 | */ 11 | ;(function initTables () { 12 | let x = 1 13 | for (let i = 0; i < 255; i++) { 14 | EXP_TABLE[i] = x 15 | LOG_TABLE[x] = i 16 | 17 | x <<= 1 // multiply by 2 18 | 19 | // The QR code specification says to use byte-wise modulo 100011101 arithmetic. 20 | // This means that when a number is 256 or larger, it should be XORed with 0x11D. 21 | if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256) 22 | x ^= 0x11D 23 | } 24 | } 25 | 26 | // Optimization: double the size of the anti-log table so that we don't need to mod 255 to 27 | // stay inside the bounds (because we will mainly use this table for the multiplication of 28 | // two GF numbers, no more). 29 | // @see {@link mul} 30 | for (let i = 255; i < 512; i++) { 31 | EXP_TABLE[i] = EXP_TABLE[i - 255] 32 | } 33 | }()) 34 | 35 | /** 36 | * Returns log value of n inside Galois Field 37 | * 38 | * @param {Number} n 39 | * @return {Number} 40 | */ 41 | exports.log = function log (n) { 42 | if (n < 1) throw new Error('log(' + n + ')') 43 | return LOG_TABLE[n] 44 | } 45 | 46 | /** 47 | * Returns anti-log value of n inside Galois Field 48 | * 49 | * @param {Number} n 50 | * @return {Number} 51 | */ 52 | exports.exp = function exp (n) { 53 | return EXP_TABLE[n] 54 | } 55 | 56 | /** 57 | * Multiplies two number inside Galois Field 58 | * 59 | * @param {Number} x 60 | * @param {Number} y 61 | * @return {Number} 62 | */ 63 | exports.mul = function mul (x, y) { 64 | if (x === 0 || y === 0) return 0 65 | 66 | // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized 67 | // @see {@link initTables} 68 | return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]] 69 | } 70 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/browser.js: -------------------------------------------------------------------------------- 1 | 2 | const canPromise = require('./can-promise') 3 | 4 | const QRCode = require('./core/qrcode') 5 | const CanvasRenderer = require('./renderer/canvas') 6 | const SvgRenderer = require('./renderer/svg-tag.js') 7 | 8 | function renderCanvas (renderFunc, canvas, text, opts, cb) { 9 | const args = [].slice.call(arguments, 1) 10 | const argsNum = args.length 11 | const isLastArgCb = typeof args[argsNum - 1] === 'function' 12 | 13 | if (!isLastArgCb && !canPromise()) { 14 | throw new Error('Callback required as last argument') 15 | } 16 | 17 | if (isLastArgCb) { 18 | if (argsNum < 2) { 19 | throw new Error('Too few arguments provided') 20 | } 21 | 22 | if (argsNum === 2) { 23 | cb = text 24 | text = canvas 25 | canvas = opts = undefined 26 | } else if (argsNum === 3) { 27 | if (canvas.getContext && typeof cb === 'undefined') { 28 | cb = opts 29 | opts = undefined 30 | } else { 31 | cb = opts 32 | opts = text 33 | text = canvas 34 | canvas = undefined 35 | } 36 | } 37 | } else { 38 | if (argsNum < 1) { 39 | throw new Error('Too few arguments provided') 40 | } 41 | 42 | if (argsNum === 1) { 43 | text = canvas 44 | canvas = opts = undefined 45 | } else if (argsNum === 2 && !canvas.getContext) { 46 | opts = text 47 | text = canvas 48 | canvas = undefined 49 | } 50 | 51 | return new Promise(function (resolve, reject) { 52 | try { 53 | const data = QRCode.create(text, opts) 54 | resolve(renderFunc(data, canvas, opts)) 55 | } catch (e) { 56 | reject(e) 57 | } 58 | }) 59 | } 60 | 61 | try { 62 | const data = QRCode.create(text, opts) 63 | cb(null, renderFunc(data, canvas, opts)) 64 | } catch (e) { 65 | cb(e) 66 | } 67 | } 68 | 69 | exports.create = QRCode.create 70 | exports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render) 71 | exports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL) 72 | 73 | // only svg for now. 74 | exports.toString = renderCanvas.bind(null, function (data, _, opts) { 75 | return SvgRenderer.render(data, opts) 76 | }) 77 | -------------------------------------------------------------------------------- /src/components/menu/3/menu.less: -------------------------------------------------------------------------------- 1 | .c-menu-3 { 2 | transition: all .3s linear; 3 | background-color: var(--invert); 4 | 5 | .dashicons { 6 | width: unset; 7 | height: unset; 8 | vertical-align: middle; 9 | } 10 | 11 | .container { 12 | display: flex; 13 | align-items: center; 14 | justify-content: space-between; 15 | } 16 | 17 | .logo { 18 | img { 19 | max-height: 80px; 20 | width: auto; 21 | } 22 | } 23 | 24 | .menu { 25 | white-space: nowrap; 26 | font-size: 1.075em; 27 | 28 | .dashicons-arrow-down-alt2 { 29 | font-size: .875em; 30 | transition: all .3s linear; 31 | } 32 | 33 | .menu-list { 34 | display: flex; 35 | justify-content: center; 36 | text-align: center; 37 | 38 | &>li { 39 | 40 | &::after { 41 | content: ''; 42 | display: block; 43 | width: 0; 44 | height: 2px; 45 | background-color: var(--primary); 46 | position: absolute; 47 | left: 50%; 48 | transform: translateX(-50%); 49 | bottom: 0; 50 | z-index: 10; 51 | transition: all .3s linear 52 | } 53 | 54 | &:hover { 55 | &::after { 56 | width: 100%; 57 | } 58 | } 59 | } 60 | 61 | li { 62 | position: relative; 63 | 64 | &:hover { 65 | &>.sub-menu { 66 | display: block; 67 | } 68 | 69 | &>a { 70 | .dashicons-arrow-down-alt2 { 71 | transform: rotate(180deg); 72 | } 73 | } 74 | } 75 | } 76 | 77 | a { 78 | display: inline-block; 79 | width: 100%; 80 | line-height: 3; 81 | padding: 0 1em; 82 | } 83 | 84 | .sub-menu { 85 | background: var(--invert); 86 | display: none; 87 | position: absolute; 88 | z-index: 10; 89 | left: 50%; 90 | top: 100%; 91 | transform: translateX(-50%); 92 | min-width: 8em; 93 | box-shadow: 0 0 3px var(--border); 94 | font-size: .95em; 95 | 96 | li { 97 | border-bottom: 1px solid var(--bg); 98 | 99 | &:last-child { 100 | border-bottom: none; 101 | } 102 | } 103 | 104 | .sub-menu { 105 | left: calc(100% + 1px); 106 | top: 0; 107 | transform: unset; 108 | } 109 | } 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /src/view/template-1/index/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('../public/header.ejs')({htmlWebpackPlugin}) %> 3 |
4 |
产品中心
5 |
Product Center
6 | <%= require('@/components/product-list/1/product-list.ejs')({htmlWebpackPlugin}) %> 7 | 8 |
9 |
10 | <%= require('@/components/about/1/about.ejs')({htmlWebpackPlugin}) %> 11 |
12 |
13 |
资讯中心
14 |
Newst Center
15 | <%= require('@/components/post-list/1/post-list.ejs')({htmlWebpackPlugin}) %> 16 | 17 |
18 |
19 |
我们的服务
20 |
Our Service
21 | <%= require('@/components/service/1/service.ejs')({htmlWebpackPlugin}) %> 22 |
23 |
24 |
企业文化
25 |
Corporate Culture
26 | <%= require('@/components/culture/1/culture.ejs')({htmlWebpackPlugin}) %> 27 |
28 |
29 |
合作伙伴
30 |
Cooperation Partners
31 | <%= require('@/components/client/1/client.ejs')({htmlWebpackPlugin}) %> 32 |
33 |
34 | <%= require('@/components/friend-link/1/friend-link.ejs')({htmlWebpackPlugin}) %> 35 |
36 | 37 | <%= require('../public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/svg-tag.js: -------------------------------------------------------------------------------- 1 | const Utils = require('./utils') 2 | 3 | function getColorAttrib (color, attrib) { 4 | const alpha = color.a / 255 5 | const str = attrib + '="' + color.hex + '"' 6 | 7 | return alpha < 1 8 | ? str + ' ' + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' 9 | : str 10 | } 11 | 12 | function svgCmd (cmd, x, y) { 13 | let str = cmd + x 14 | if (typeof y !== 'undefined') str += ' ' + y 15 | 16 | return str 17 | } 18 | 19 | function qrToPath (data, size, margin) { 20 | let path = '' 21 | let moveBy = 0 22 | let newRow = false 23 | let lineLength = 0 24 | 25 | for (let i = 0; i < data.length; i++) { 26 | const col = Math.floor(i % size) 27 | const row = Math.floor(i / size) 28 | 29 | if (!col && !newRow) newRow = true 30 | 31 | if (data[i]) { 32 | lineLength++ 33 | 34 | if (!(i > 0 && col > 0 && data[i - 1])) { 35 | path += newRow 36 | ? svgCmd('M', col + margin, 0.5 + row + margin) 37 | : svgCmd('m', moveBy, 0) 38 | 39 | moveBy = 0 40 | newRow = false 41 | } 42 | 43 | if (!(col + 1 < size && data[i + 1])) { 44 | path += svgCmd('h', lineLength) 45 | lineLength = 0 46 | } 47 | } else { 48 | moveBy++ 49 | } 50 | } 51 | 52 | return path 53 | } 54 | 55 | exports.render = function render (qrData, options, cb) { 56 | const opts = Utils.getOptions(options) 57 | const size = qrData.modules.size 58 | const data = qrData.modules.data 59 | const qrcodesize = size + opts.margin * 2 60 | 61 | const bg = !opts.color.light.a 62 | ? '' 63 | : '' 65 | 66 | const path = 67 | '' 69 | 70 | const viewBox = 'viewBox="' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '"' 71 | 72 | const width = !opts.width ? '' : 'width="' + opts.width + '" height="' + opts.width + '" ' 73 | 74 | const svgTag = '' + bg + path + '\n' 75 | 76 | if (typeof cb === 'function') { 77 | cb(null, svgTag) 78 | } 79 | 80 | return svgTag 81 | } 82 | -------------------------------------------------------------------------------- /src/style/demo.less: -------------------------------------------------------------------------------- 1 | /* 2 | 图标 3 | */ 4 | 5 | @import url("~@/sprite/sprite.css"); //精灵图样式 6 | @import url('~@/iconfont/dashicons.css'); //字体图标样式 7 | 8 | /* 9 | 基本页面组件 10 | */ 11 | 12 | //菜单 13 | @import url("~@/components/menu/1/menu.less"); 14 | @import url("~@/components/menu/2/menu.less"); 15 | @import url("~@/components/menu/3/menu.less"); 16 | @import url("~@/components/menu/4/menu.less"); 17 | 18 | //横幅/轮播图 19 | @import url("~@/components/banner/1/banner.less"); 20 | 21 | //顶部横幅 22 | @import url("~@/components/cover/1/cover.less"); 23 | 24 | //面包屑导航 25 | @import url("~@/components/crumbs/1/crumbs.less"); 26 | 27 | //友情链接 28 | @import url("~@/components/friend-link/1/friend-link.less"); 29 | 30 | //分页导航 31 | @import url("~@/components/pagination/1/pagination.less"); 32 | 33 | //底部 34 | @import url("~@/components/bottom/1/bottom.less"); 35 | @import url("~@/components/bottom/2/bottom.less"); 36 | 37 | //内容列表 38 | @import url("~@/components/post-list/1/post-list.less"); 39 | @import url("~@/components/post-list/2/post-list.less"); 40 | @import url("~@/components/post-list/3/post-list.less"); 41 | @import url("~@/components/post-list/4/post-list.less"); 42 | @import url("~@/components/post-list/5/post-list.less"); 43 | 44 | //产品列表 45 | @import url("~@/components/product-list/1/product-list.less"); 46 | @import url("~@/components/product-list/2/product-list.less"); 47 | 48 | //内容 49 | @import url("~@/components/post/1/post.less"); 50 | @import url("~@/components/post/2/post.less"); 51 | 52 | //评论列表 53 | @import url("~@/components/comment/1/comment.less"); 54 | 55 | //标签 56 | @import url("~@/components/tag-list/1/tag-list.less"); 57 | 58 | //边栏 59 | @import url("~@/components/sidebar/1/sidebar.less"); 60 | 61 | //边栏工具 62 | @import url("~@/components/sidebar-tool/1/sidebar-tool.less"); 63 | 64 | 65 | /* 66 | 商务网站组件 67 | */ 68 | 69 | //关于我们 70 | @import url("~@/components/about/1/about.less"); 71 | 72 | //公司文化 73 | @import url("~@/components/culture/1/culture.less"); 74 | 75 | //服务 76 | @import url("~@/components/service/1/service.less"); 77 | @import url("~@/components/service/2/service.less"); 78 | @import url("~@/components/service/3/service.less"); 79 | 80 | //合作客户 81 | @import url("~@/components/client/1/client.less"); 82 | 83 | 84 | /* 85 | 其他组件 86 | */ 87 | 88 | //留言表单 89 | @import url("~@/components/guestbook-form/1/guestbook-form.less"); 90 | @import url("~@/components/guestbook-form/2/guestbook-form.less"); 91 | 92 | //登录注册表单 93 | @import url("~@/components/login-register-form/1/login-register-form.less"); 94 | @import url("~@/components/login-register-form/2/login-register-form.less"); 95 | @import url("~@/components/login-register-form/3/login-register-form.less"); -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/terminal/terminal-small.js: -------------------------------------------------------------------------------- 1 | const backgroundWhite = '\x1b[47m' 2 | const backgroundBlack = '\x1b[40m' 3 | const foregroundWhite = '\x1b[37m' 4 | const foregroundBlack = '\x1b[30m' 5 | const reset = '\x1b[0m' 6 | const lineSetupNormal = backgroundWhite + foregroundBlack // setup colors 7 | const lineSetupInverse = backgroundBlack + foregroundWhite // setup colors 8 | 9 | const createPalette = function (lineSetup, foregroundWhite, foregroundBlack) { 10 | return { 11 | // 1 ... white, 2 ... black, 0 ... transparent (default) 12 | 13 | '00': reset + ' ' + lineSetup, 14 | '01': reset + foregroundWhite + '▄' + lineSetup, 15 | '02': reset + foregroundBlack + '▄' + lineSetup, 16 | 10: reset + foregroundWhite + '▀' + lineSetup, 17 | 11: ' ', 18 | 12: '▄', 19 | 20: reset + foregroundBlack + '▀' + lineSetup, 20 | 21: '▀', 21 | 22: '█' 22 | } 23 | } 24 | 25 | /** 26 | * Returns code for QR pixel 27 | * @param {boolean[][]} modules 28 | * @param {number} size 29 | * @param {number} x 30 | * @param {number} y 31 | * @return {'0' | '1' | '2'} 32 | */ 33 | const mkCodePixel = function (modules, size, x, y) { 34 | const sizePlus = size + 1 35 | if ((x >= sizePlus) || (y >= sizePlus) || (y < -1) || (x < -1)) return '0' 36 | if ((x >= size) || (y >= size) || (y < 0) || (x < 0)) return '1' 37 | const idx = (y * size) + x 38 | return modules[idx] ? '2' : '1' 39 | } 40 | 41 | /** 42 | * Returns code for four QR pixels. Suitable as key in palette. 43 | * @param {boolean[][]} modules 44 | * @param {number} size 45 | * @param {number} x 46 | * @param {number} y 47 | * @return {keyof palette} 48 | */ 49 | const mkCode = function (modules, size, x, y) { 50 | return ( 51 | mkCodePixel(modules, size, x, y) + 52 | mkCodePixel(modules, size, x, y + 1) 53 | ) 54 | } 55 | 56 | exports.render = function (qrData, options, cb) { 57 | const size = qrData.modules.size 58 | const data = qrData.modules.data 59 | 60 | const inverse = !!(options && options.inverse) 61 | const lineSetup = options && options.inverse ? lineSetupInverse : lineSetupNormal 62 | const white = inverse ? foregroundBlack : foregroundWhite 63 | const black = inverse ? foregroundWhite : foregroundBlack 64 | 65 | const palette = createPalette(lineSetup, white, black) 66 | const newLine = reset + '\n' + lineSetup 67 | 68 | let output = lineSetup // setup colors 69 | 70 | for (let y = -1; y < size + 1; y += 2) { 71 | for (let x = -1; x < size; x++) { 72 | output += palette[mkCode(data, size, x, y)] 73 | } 74 | 75 | output += palette[mkCode(data, size, size, y)] + newLine 76 | } 77 | 78 | output += reset 79 | 80 | if (typeof cb === 'function') { 81 | cb(null, output) 82 | } 83 | 84 | return output 85 | } 86 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.3.3](https://github.com/soldair/node-qrcode/compare/v1.3.2...v1.3.3) (2019-01-16) 2 | 3 | fixing security vulnerabillities reported by users of snyk and `npm audit` major 4 | versions of deps were bumped and should only impact development of qrcode. 5 | 6 | 7 | ## [1.3.2](https://github.com/soldair/node-qrcode/compare/v1.3.0...v1.3.2) (2019-01-16) 8 | 9 | 10 | ### Bug Fixes 11 | 12 | * forgot can-promise replacement ([2514445](https://github.com/soldair/node-qrcode/commit/2514445)) 13 | * replacing can-promise ([8197d78](https://github.com/soldair/node-qrcode/commit/8197d78)) 14 | * security vulnerabillities and a ref to new Buffer ([a40c757](https://github.com/soldair/node-qrcode/commit/a40c757)) 15 | 16 | 17 | 18 | # [1.3.0](https://github.com/soldair/node-qrcode/compare/v1.2.1...v1.3.0) (2018-10-01) 19 | 20 | 21 | 22 | ## [1.2.1](https://github.com/soldair/node-qrcode/compare/v1.2.0...v1.2.1) (2018-06-06) 23 | 24 | 25 | 26 | # [1.2.0](https://github.com/soldair/node-qrcode/compare/v1.1.0...v1.2.0) (2017-12-28) 27 | 28 | 29 | 30 | # [1.1.0](https://github.com/soldair/node-qrcode/compare/v1.0.1...v1.1.0) (2017-12-28) 31 | 32 | 33 | 34 | ## [1.0.1](https://github.com/soldair/node-qrcode/compare/v1.0.0...v1.0.1) (2017-12-27) 35 | 36 | 37 | 38 | # [1.0.0](https://github.com/soldair/node-qrcode/compare/v0.9.0...v1.0.0) (2017-11-08) 39 | 40 | no breaking changes. promoting to a stable semver 41 | 42 | # [0.9.0](https://github.com/soldair/node-qrcode/compare/v0.8.2...v0.9.0) (2017-07-22) 43 | 44 | 45 | 46 | ## [0.8.2](https://github.com/soldair/node-qrcode/compare/v0.8.0...v0.8.2) (2017-05-23) 47 | 48 | 49 | 50 | # [0.8.0](https://github.com/soldair/node-qrcode/compare/v0.7.1...v0.8.0) (2017-03-30) 51 | 52 | 53 | 54 | ## [0.7.1](https://github.com/soldair/node-qrcode/compare/v0.7.0...v0.7.1) (2017-03-17) 55 | 56 | 57 | 58 | # [0.7.0](https://github.com/soldair/node-qrcode/compare/v0.6.0...v0.7.0) (2017-02-27) 59 | 60 | 61 | 62 | # [0.6.0](https://github.com/soldair/node-qrcode/compare/v0.5.0...v0.6.0) (2017-02-24) 63 | 64 | 65 | 66 | # [0.5.0](https://github.com/soldair/node-qrcode/compare/v0.4.4...v0.5.0) (2016-09-19) 67 | 68 | 69 | 70 | ## [0.4.4](https://github.com/soldair/node-qrcode/compare/v0.4.3...v0.4.4) (2016-08-25) 71 | 72 | 73 | 74 | ## [0.4.3](https://github.com/soldair/node-qrcode/compare/v0.4.0...v0.4.3) (2016-08-16) 75 | 76 | 77 | 78 | # [0.4.0](https://github.com/soldair/node-qrcode/compare/0.2.10...v0.4.0) (2015-09-17) 79 | 80 | 81 | 82 | ## [0.1.1](https://github.com/soldair/node-qrcode/compare/v0.1.0...v0.1.1) (2011-04-17) 83 | 84 | 85 | 86 | # [0.1.0](https://github.com/soldair/node-qrcode/compare/0.0.3...v0.1.0) (2011-04-17) 87 | 88 | 89 | 90 | ## [0.0.3](https://github.com/soldair/node-qrcode/compare/0.0.2...0.0.3) (2011-02-27) 91 | 92 | 93 | 94 | ## 0.0.2 (2010-12-27) 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /src/view/demo/index/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= require('@/public/header.ejs')({htmlWebpackPlugin}) %> 3 | 4 |
5 |

图标

6 | 字体图标 7 | 精灵图 8 | 9 |

基本页面组件

10 | 菜单 11 | 轮播图 12 | 顶部横幅 13 | 面包屑导航 14 | 内容列表 15 | 标签列表 16 | 产品列表 17 | 内容详情 18 | 评论列表 19 | 边栏 20 | 边栏工具 21 | 友情链接 22 | 底部 23 | 分页 24 | 25 |

商务网站组件

26 | 关于我们 27 | 公司文化 28 | 服务/业务 29 | 合作/客户 30 | 31 |

其他组件

32 | 留言表单 33 | 登录注册表单 34 |
35 | 44 | 45 | <%= require('@/public/footer.ejs')({htmlWebpackPlugin}) %> -------------------------------------------------------------------------------- /src/route.js: -------------------------------------------------------------------------------- 1 | const NODE_ENV = process.env.NODE_ENV //环境变量 2 | 3 | const template_1 = [{ 4 | name: 'index', 5 | title: '首页' 6 | }, { 7 | name: 'products', 8 | title: '产品中心' 9 | }, { 10 | name: 'posts', 11 | title: '新闻中心' 12 | }, { 13 | name: 'post', 14 | title: '详情页' 15 | }, { 16 | name: 'guestbook', 17 | title: '留言页' 18 | }, { 19 | name: 'search', 20 | title: '搜索页' 21 | }, { 22 | name: 'tag', 23 | title: '标签页' 24 | }] 25 | 26 | //模版页面 27 | const templates = [ 28 | template_1, 29 | ] 30 | 31 | //组件演示页面 32 | const demo = [{ 33 | name: 'index', 34 | title: '组件示例', 35 | }, { 36 | name: 'iconfont', 37 | title: '字体图标示例', 38 | }, { 39 | name: 'sprite', 40 | title: '精灵图示例', 41 | }, 42 | //基本页面组件 43 | { 44 | name: 'menu', 45 | title: '菜单示例', 46 | }, { 47 | name: 'banner', 48 | title: '横幅/轮播图示例', 49 | }, { 50 | name: 'cover', 51 | title: '单页顶部横幅示例', 52 | }, { 53 | name: 'crumbs', 54 | title: '面包屑导航示例', 55 | }, { 56 | name: 'friend-link', 57 | title: '友情链接示例', 58 | }, { 59 | name: 'pagination', 60 | title: '分页示例', 61 | }, { 62 | name: 'bottom', 63 | title: '底部示例', 64 | }, { 65 | name: 'post-list', 66 | title: '内容列表示例', 67 | }, { 68 | name: 'product-list', 69 | title: '产品列表示例', 70 | }, { 71 | name: 'post', 72 | title: '内容页示例', 73 | }, { 74 | name: 'comment', 75 | title: '评论列表示例', 76 | }, { 77 | name: 'tag', 78 | title: '标签示例', 79 | }, { 80 | name: 'sidebar', 81 | title: '边栏示例', 82 | }, { 83 | name: 'sidebar-tool', 84 | title: '边栏工具示例', 85 | }, 86 | //商务网站组件 87 | { 88 | name: 'about', 89 | title: '关于我们示例', 90 | }, { 91 | name: 'culture', 92 | title: '公司文化示例', 93 | }, 94 | { 95 | name: 'service', 96 | title: '公司业务示例', 97 | }, { 98 | name: 'client', 99 | title: '合作客户示例', 100 | }, 101 | //其他组件 102 | { 103 | name: 'guestbook-form', 104 | title: '留言表单示例', 105 | }, 106 | { 107 | name: 'login-register-form', 108 | title: '登录注册表单示例', 109 | } 110 | ] 111 | 112 | const route = [] 113 | 114 | //添加directory属性,打包后为单独目录 115 | templates.forEach((items, index) => { 116 | items.forEach(item => { 117 | item.directory = 'template-' + (index + 1) 118 | }) 119 | route.push(...items) 120 | }) 121 | 122 | if (NODE_ENV != 'production') { 123 | //添加directory属性,打包后为单独目录 124 | demo.forEach(item => { 125 | item.directory = 'demo' //目录名称需要跟实际项目目录名称一致(src/view/demo/) 126 | }) 127 | route.push(...demo) 128 | } 129 | 130 | module.exports = { 131 | route 132 | } -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/alignment-pattern.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Alignment pattern are fixed reference pattern in defined positions 3 | * in a matrix symbology, which enables the decode software to re-synchronise 4 | * the coordinate mapping of the image modules in the event of moderate amounts 5 | * of distortion of the image. 6 | * 7 | * Alignment patterns are present only in QR Code symbols of version 2 or larger 8 | * and their number depends on the symbol version. 9 | */ 10 | 11 | const getSymbolSize = require('./utils').getSymbolSize 12 | 13 | /** 14 | * Calculate the row/column coordinates of the center module of each alignment pattern 15 | * for the specified QR Code version. 16 | * 17 | * The alignment patterns are positioned symmetrically on either side of the diagonal 18 | * running from the top left corner of the symbol to the bottom right corner. 19 | * 20 | * Since positions are simmetrical only half of the coordinates are returned. 21 | * Each item of the array will represent in turn the x and y coordinate. 22 | * @see {@link getPositions} 23 | * 24 | * @param {Number} version QR Code version 25 | * @return {Array} Array of coordinate 26 | */ 27 | exports.getRowColCoords = function getRowColCoords (version) { 28 | if (version === 1) return [] 29 | 30 | const posCount = Math.floor(version / 7) + 2 31 | const size = getSymbolSize(version) 32 | const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2 33 | const positions = [size - 7] // Last coord is always (size - 7) 34 | 35 | for (let i = 1; i < posCount - 1; i++) { 36 | positions[i] = positions[i - 1] - intervals 37 | } 38 | 39 | positions.push(6) // First coord is always 6 40 | 41 | return positions.reverse() 42 | } 43 | 44 | /** 45 | * Returns an array containing the positions of each alignment pattern. 46 | * Each array's element represent the center point of the pattern as (x, y) coordinates 47 | * 48 | * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords} 49 | * and filtering out the items that overlaps with finder pattern 50 | * 51 | * @example 52 | * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38. 53 | * The alignment patterns, therefore, are to be centered on (row, column) 54 | * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38). 55 | * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns 56 | * and are not therefore used for alignment patterns. 57 | * 58 | * let pos = getPositions(7) 59 | * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]] 60 | * 61 | * @param {Number} version QR Code version 62 | * @return {Array} Array of coordinates 63 | */ 64 | exports.getPositions = function getPositions (version) { 65 | const coords = [] 66 | const pos = exports.getRowColCoords(version) 67 | const posLength = pos.length 68 | 69 | for (let i = 0; i < posLength; i++) { 70 | for (let j = 0; j < posLength; j++) { 71 | // Skip if position is occupied by finder patterns 72 | if ((i === 0 && j === 0) || // top-left 73 | (i === 0 && j === posLength - 1) || // bottom-left 74 | (i === posLength - 1 && j === 0)) { // top-right 75 | continue 76 | } 77 | 78 | coords.push([pos[i], pos[j]]) 79 | } 80 | } 81 | 82 | return coords 83 | } 84 | -------------------------------------------------------------------------------- /src/style/public.less: -------------------------------------------------------------------------------- 1 | /* 2 | 公共样式 3 | */ 4 | 5 | /* 简易弹窗 6 |
7 | 11 |
12 | 13 | */ 14 | .js2-modal { 15 | position: fixed; 16 | left: 0; 17 | top: 0; 18 | width: 100vw; 19 | height: 100vh; 20 | z-index: 100; 21 | background-color: rgba(0, 0, 0, 0.28); 22 | display: none; 23 | justify-content: center; 24 | align-items: center; 25 | 26 | &.show { 27 | display: flex; 28 | } 29 | 30 | .modal-wrap { 31 | background-color: #fff; 32 | padding: calc(var(--base)*2.5) var(--base) var(--base); 33 | position: relative; 34 | border-radius:var(--radius); 35 | 36 | .modal-close { 37 | position: absolute; 38 | right: 0; 39 | top: 0; 40 | padding: calc(var(--base)/2); 41 | cursor: pointer; 42 | 43 | &:hover { 44 | color: var(--primary); 45 | } 46 | } 47 | } 48 | } 49 | 50 | /* 表单样式 */ 51 | .js2-form { 52 | label { 53 | display: block; 54 | margin-bottom: var(--base); 55 | } 56 | 57 | input[type="text"], 58 | input[type="number"], 59 | input[type="password"], 60 | input[type="search"] { 61 | width: 180px; 62 | } 63 | 64 | textarea { 65 | width: 360px; 66 | } 67 | 68 | .title { 69 | display: inline-block; 70 | min-width: 6em; 71 | text-align: right; 72 | } 73 | 74 | .required { 75 | color: var(--error); 76 | position: relative; 77 | 78 | &::before { 79 | content: '*'; 80 | } 81 | } 82 | } 83 | 84 | /* 透明容器 */ 85 | .js2-transparent-box { 86 | padding: var(--base) calc(var(--base) * 1.5); 87 | margin: var(--base); 88 | border-radius: 8px; 89 | background-color: var(--rgba-white-28); 90 | } 91 | 92 | /* 普通按钮 */ 93 | .js2-btn { 94 | display: inline-block; 95 | cursor: pointer; 96 | color: var(--invert); 97 | border-radius: 4px; 98 | min-width: 6em; 99 | padding: 0 var(--base); 100 | text-align: center; 101 | background-color: var(--primary); 102 | line-height: calc(var(--base)*2.5); 103 | 104 | &:hover { 105 | color: var(--invert); 106 | opacity: .82; 107 | } 108 | } 109 | 110 | /* prism代码高亮样式覆盖 */ 111 | div.code-toolbar>.toolbar { 112 | right: 2.2em; 113 | } 114 | 115 | /* swiper容器样式覆盖 */ 116 | .swiper-pagination-bullet { 117 | background-color: var(--primary); 118 | opacity: 1; 119 | } 120 | 121 | .swiper-pagination-bullet.swiper-pagination-bullet-active { 122 | background-color: var(--accent); 123 | } 124 | 125 | .swiper-button-next, 126 | .swiper-button-prev { 127 | width: unset; 128 | height: unset; 129 | color: var(--accent); 130 | } 131 | 132 | .swiper-button-next:after, 133 | .swiper-button-prev:after { 134 | font-size: 2em; 135 | } 136 | 137 | .swiper-button-next.swiper-button-disabled, 138 | .swiper-button-prev.swiper-button-disabled { 139 | pointer-events: unset; 140 | } 141 | 142 | /* 覆盖layui样式 */ 143 | .layui-icon { 144 | line-height: 1; 145 | } 146 | 147 | .layui-icon-menu-fill, 148 | .layui-icon-close, 149 | .layui-icon-heart, 150 | .layui-icon-heart-fill { 151 | cursor: pointer; 152 | } 153 | 154 | .layui-icon-heart, 155 | .layui-icon-heart-fill { 156 | color: var(--error); 157 | } -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/renderer/utils.js: -------------------------------------------------------------------------------- 1 | function hex2rgba (hex) { 2 | if (typeof hex === 'number') { 3 | hex = hex.toString() 4 | } 5 | 6 | if (typeof hex !== 'string') { 7 | throw new Error('Color should be defined as hex string') 8 | } 9 | 10 | let hexCode = hex.slice().replace('#', '').split('') 11 | if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) { 12 | throw new Error('Invalid hex color: ' + hex) 13 | } 14 | 15 | // Convert from short to long form (fff -> ffffff) 16 | if (hexCode.length === 3 || hexCode.length === 4) { 17 | hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) { 18 | return [c, c] 19 | })) 20 | } 21 | 22 | // Add default alpha value 23 | if (hexCode.length === 6) hexCode.push('F', 'F') 24 | 25 | const hexValue = parseInt(hexCode.join(''), 16) 26 | 27 | return { 28 | r: (hexValue >> 24) & 255, 29 | g: (hexValue >> 16) & 255, 30 | b: (hexValue >> 8) & 255, 31 | a: hexValue & 255, 32 | hex: '#' + hexCode.slice(0, 6).join('') 33 | } 34 | } 35 | 36 | exports.getOptions = function getOptions (options) { 37 | if (!options) options = {} 38 | if (!options.color) options.color = {} 39 | 40 | const margin = typeof options.margin === 'undefined' || 41 | options.margin === null || 42 | options.margin < 0 43 | ? 4 44 | : options.margin 45 | 46 | const width = options.width && options.width >= 21 ? options.width : undefined 47 | const scale = options.scale || 4 48 | 49 | return { 50 | width: width, 51 | scale: width ? 4 : scale, 52 | margin: margin, 53 | color: { 54 | dark: hex2rgba(options.color.dark || '#000000ff'), 55 | light: hex2rgba(options.color.light || '#ffffffff') 56 | }, 57 | type: options.type, 58 | rendererOpts: options.rendererOpts || {} 59 | } 60 | } 61 | 62 | exports.getScale = function getScale (qrSize, opts) { 63 | return opts.width && opts.width >= qrSize + opts.margin * 2 64 | ? opts.width / (qrSize + opts.margin * 2) 65 | : opts.scale 66 | } 67 | 68 | exports.getImageWidth = function getImageWidth (qrSize, opts) { 69 | const scale = exports.getScale(qrSize, opts) 70 | return Math.floor((qrSize + opts.margin * 2) * scale) 71 | } 72 | 73 | exports.qrToImageData = function qrToImageData (imgData, qr, opts) { 74 | const size = qr.modules.size 75 | const data = qr.modules.data 76 | const scale = exports.getScale(size, opts) 77 | const symbolSize = Math.floor((size + opts.margin * 2) * scale) 78 | const scaledMargin = opts.margin * scale 79 | const palette = [opts.color.light, opts.color.dark] 80 | 81 | for (let i = 0; i < symbolSize; i++) { 82 | for (let j = 0; j < symbolSize; j++) { 83 | let posDst = (i * symbolSize + j) * 4 84 | let pxColor = opts.color.light 85 | 86 | if (i >= scaledMargin && j >= scaledMargin && 87 | i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) { 88 | const iSrc = Math.floor((i - scaledMargin) / scale) 89 | const jSrc = Math.floor((j - scaledMargin) / scale) 90 | pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0] 91 | } 92 | 93 | imgData[posDst++] = pxColor.r 94 | imgData[posDst++] = pxColor.g 95 | imgData[posDst++] = pxColor.b 96 | imgData[posDst] = pxColor.a 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_args": [ 3 | [ 4 | "qrcode@1.5.1", 5 | "E:\\git\\js2-static-builder" 6 | ] 7 | ], 8 | "_from": "qrcode@1.5.1", 9 | "_id": "qrcode@1.5.1", 10 | "_inBundle": false, 11 | "_integrity": "sha512-nS8NJ1Z3md8uTjKtP+SGGhfqmTCs5flU/xR623oI0JX+Wepz9R8UrRVCTBTJm3qGw3rH6jJ6MUHjkDx15cxSSg==", 12 | "_location": "/qrcode", 13 | "_phantomChildren": { 14 | "camelcase": "5.3.1", 15 | "decamelize": "1.2.0", 16 | "get-caller-file": "2.0.5", 17 | "p-limit": "2.2.2", 18 | "require-directory": "2.1.1", 19 | "require-main-filename": "2.0.0", 20 | "set-blocking": "2.0.0", 21 | "which-module": "2.0.0", 22 | "y18n": "4.0.0" 23 | }, 24 | "_requested": { 25 | "type": "version", 26 | "registry": true, 27 | "raw": "qrcode@1.5.1", 28 | "name": "qrcode", 29 | "escapedName": "qrcode", 30 | "rawSpec": "1.5.1", 31 | "saveSpec": null, 32 | "fetchSpec": "1.5.1" 33 | }, 34 | "_requiredBy": [ 35 | "/" 36 | ], 37 | "_resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.1.tgz", 38 | "_spec": "1.5.1", 39 | "_where": "E:\\git\\js2-static-builder", 40 | "author": { 41 | "name": "Ryan Day", 42 | "email": "soldair@gmail.com" 43 | }, 44 | "bin": { 45 | "qrcode": "bin/qrcode" 46 | }, 47 | "browser": { 48 | "./lib/index.js": "./lib/browser.js", 49 | "fs": false 50 | }, 51 | "bugs": { 52 | "url": "https://github.com/soldair/node-qrcode/issues" 53 | }, 54 | "contributors": [ 55 | { 56 | "name": "Vincenzo Greco", 57 | "email": "greco.vincenzo@gmail.com" 58 | }, 59 | { 60 | "name": "Linus Unnebäck", 61 | "email": "linus@folkdatorn.se" 62 | } 63 | ], 64 | "dependencies": { 65 | "dijkstrajs": "^1.0.1", 66 | "encode-utf8": "^1.0.3", 67 | "pngjs": "^5.0.0", 68 | "yargs": "^15.3.1" 69 | }, 70 | "description": "QRCode / 2d Barcode api with both server side and client side support using canvas", 71 | "devDependencies": { 72 | "@babel/core": "^7.9.0", 73 | "@babel/preset-env": "^7.9.5", 74 | "@rollup/plugin-commonjs": "^11.1.0", 75 | "@rollup/plugin-node-resolve": "^7.1.3", 76 | "browserify": "^16.5.1", 77 | "canvas": "^2.8.0", 78 | "canvasutil": "0.0.4", 79 | "colors": "^1.4.0", 80 | "express": "^4.17.1", 81 | "htmlparser2": "^4.1.0", 82 | "rollup": "^2.6.1", 83 | "rollup-plugin-babel": "^4.4.0", 84 | "rollup-plugin-terser": "^5.3.0", 85 | "sinon": "^9.0.2", 86 | "standard": "^16.0.4", 87 | "tap": "^15.1.2" 88 | }, 89 | "engines": { 90 | "node": ">=10.13.0" 91 | }, 92 | "files": [ 93 | "bin", 94 | "build", 95 | "lib", 96 | "helper" 97 | ], 98 | "homepage": "http://github.com/soldair/node-qrcode", 99 | "keywords": [ 100 | "qr", 101 | "code", 102 | "canvas", 103 | "qrcode" 104 | ], 105 | "license": "MIT", 106 | "main": "./lib/index.js", 107 | "name": "qrcode", 108 | "repository": { 109 | "type": "git", 110 | "url": "git://github.com/soldair/node-qrcode.git" 111 | }, 112 | "scripts": { 113 | "browser": "node examples/clientsideserver.js", 114 | "build": "rollup -c", 115 | "lint": "standard", 116 | "prepublish": "npm run build", 117 | "pretest": "npm run lint", 118 | "test": "node --throw-deprecation test.js" 119 | }, 120 | "standard": { 121 | "ignore": [ 122 | "build/", 123 | "examples/vendors/", 124 | "lib/core/regex.js" 125 | ] 126 | }, 127 | "version": "1.5.1" 128 | } 129 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # 静态页面项目快速构建方案(脚手架/开发环境) 2 | 3 | 根据组件化、模块化的开发思想,用于快速构建前端静态页面项目的方案。 4 | 5 | 将页面的每一块元素拆分成可复用的组件,如头部、菜单、面包屑导航、列表、列表项、边栏、底部,需要时按需引用,方便网站某块区域的改版,不同组件的组合也可以快速构建成另一个网站。 6 | 7 | ## node.js版本 8 | - 12.16.2 9 | 10 | ## 模式(默认单入口模式) 11 | - 单入口模式:所有js、css都会打包到一起,npm引用的包除外(entry.js为入口文件) 12 | - 多入口模式:各个页面的js、css分别打包引用(页面的js即入口文件) 13 | - 多入口模式需要确保页面中有index.js作为入口文件 14 | 15 | ## 命令 16 | - 安装项目依赖:`npm install` 17 | - 项目启动:`npm run static` 18 | - 项目打包:`npm run build` 19 | 20 | ## 预览地址 21 | - 所有组件demo首页:http://localhost:9028/demo/index/index.html 22 | - 预览组件需要到src/style/style.less中取消样式的注释,默认注释,不引用,防止把没用到的组件样式一起打包 23 | - 模板首页:http://localhost:9028/template-1/index/index.html 24 | - 模板名称在src/route.js中定义 25 | 26 | ## 注意: 27 | - 项目中安装的qrcode和swiper库是演示组件需要,没引用的时候不会打包 28 | - 多级目录:需要在路由(src/route.js)声明要生成的目录名称属性:directory(属性值需要跟项目实际目录名称一致) 29 | - 打包后所有资源都是绝对路径,无法直接打开预览(不支持file://),需要服务器(本地预览推荐使用:live-server)。 30 | - webpack.config.js(包括导入模块)修改后需要重新启动项目 31 | - 首次放入图标生成精灵图时,需要重新启动项目 32 | - 引用“node_modules”文件夹中的第三方资源会另外打包,或者修改webpack.config.js中的配置名称 33 | 34 | ## 功能说明 35 | - 添加项目根目录(src)别名,JS引用使用“@”,CSS引用使用“~@”(2020-10-2) 36 | - CSS/JS使用contenthash标示(2020-9-30) 37 | - 自定义打包路径(用于生产环境匹配后端资源路径) 38 | - 分离第三方工具库,全部打包到vendors.js中(node_modules,npm下载引用的库) 39 | - 字体打包(用于字体图标库) 40 | - 自动生成精灵图 41 | - 自动添加CSS前缀 42 | - ES6语法转换 43 | - 使用less预处理 44 | - 使用ejs模板引擎 45 | - 图片资源打包 46 | 47 | ## 项目结构 48 | - webpack.config.js:工程配置文件 49 | - multiple_mode:可以修改工程模式 50 | - production_path:可自定义生产环境的资源打包路径 51 | - package.json:项目依赖、命令配置 52 | - postcss.config.js:CSS自动前缀插件配置 53 | - .babelrc:低版本JS语法转换配置 54 | - src:项目源文件 55 | - entry.js:项目的入口文件,引用项目的样式入口文件和自定义公共模块 56 | - router.js:页面路由文件 57 | - iconfont:字体图标(iconfont.cn) 58 | - iconfont.css:字体图标样式文件 59 | - images:图片目录 60 | - sprite:精灵图标原始图片(放入图标后会自动生成) 61 | - sprite:自动生成的精灵图目录 62 | - sprite.css:自动生成的精灵图样式文件 63 | - public:页面头部和底部的基本HTML结构 64 | - script:自定义公共模块 65 | - style:公共样式(可以在entry.js中删除引用,使用你自己的样式) 66 | - style.less:项目样式入口文件 67 | - 所有页面公用的样式,单入口模式的页面在此引用所有样式文件 68 | - reset.less:初始化样式文件 69 | - public.less:公共样式文件 70 | - nocss.less:单元化样式文件 71 | - view:页面文件 72 | - 三个文件构成一个完整页面,以下为示例 73 | - index 74 | - index.js:页面入口文件(多入口模式的页面在此引用页面样式文件,会分别打包;单入口模式不需要此文件) 75 | - index.less:页面样式文件 76 | - index.ejs:页面结构 77 | - admin:后台的页面(如果要打包成独立目录,需要在路由文件中定义directory属性) 78 | - login 79 | - login.js 80 | - login.less 81 | - login.ejs 82 | - components:所有组件目录 83 | - header:单个组件目录 84 | - header.ejs:组件结构 85 | - header.less:组件样式 86 | 87 | 88 | ## 引用 89 | - 组件的引用 90 | ``` 91 | 92 | <% 93 | const website = { 94 | title:'JS2', 95 | description:'——static' 96 | } 97 | %> 98 | <%= require('../../components/header/header.ejs')({htmlWebpackPlugin,website}) %> 99 | ``` 100 | - HtmlWebpackPlugin组件传参注意 101 | webpack.config.js中引用的 HtmlWebpackPlugin 变量虽然是大写的,但是在 ejs 文件中 中使用是 htmlWebpackPlugin。否则会出现 HtmlWebpackPlugin not defined 的报错(无论导入时是什么命名,ejs中使用都是htmlWebpackPlugin)。 102 | - ejs中的传参,形参和实参名称必须相同,子组件有用到的参数都是必传参数,否则会报错,项目无法运行;参数的属性是可选的。 103 | - 比如组件中使用了`<%= website.title %>`输出标题,但是传参时website没有title属性,输出为空,这是可以的。但是一定要传website参数 104 | - 图片的引用 105 | `````` 106 | 107 | ## 组件中的js 108 | 如果一定要在组件中编写js代码,需要使用`window.addEventListener('load',你的函数)`,否则组件的js会比入口js和第三方库的js先执行。 109 | 110 | 如果组件是在列表中循环输出的,那么函数的定义要使用const或let ,否则将执行多次。这是利用let和const不允许声明多次的特性,所以不会执行第二次。 111 | 112 | ```javascript 113 | /*function test(){ 114 | console.log('这是列表项组件的js') 115 | }*/ 116 | /*var test = function(){ 117 | console.log('这是列表项组件的js') 118 | }*/ 119 | const test = function(){ 120 | console.log('这是列表项组件的js') 121 | } 122 | window.addEventListener('load',test) 123 | ``` 124 | 125 | 但是最好还是不要这样咯,可以写在页面的js或公共的js中。 -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/error-correction-code.js: -------------------------------------------------------------------------------- 1 | const ECLevel = require('./error-correction-level') 2 | 3 | const EC_BLOCKS_TABLE = [ 4 | // L M Q H 5 | 1, 1, 1, 1, 6 | 1, 1, 1, 1, 7 | 1, 1, 2, 2, 8 | 1, 2, 2, 4, 9 | 1, 2, 4, 4, 10 | 2, 4, 4, 4, 11 | 2, 4, 6, 5, 12 | 2, 4, 6, 6, 13 | 2, 5, 8, 8, 14 | 4, 5, 8, 8, 15 | 4, 5, 8, 11, 16 | 4, 8, 10, 11, 17 | 4, 9, 12, 16, 18 | 4, 9, 16, 16, 19 | 6, 10, 12, 18, 20 | 6, 10, 17, 16, 21 | 6, 11, 16, 19, 22 | 6, 13, 18, 21, 23 | 7, 14, 21, 25, 24 | 8, 16, 20, 25, 25 | 8, 17, 23, 25, 26 | 9, 17, 23, 34, 27 | 9, 18, 25, 30, 28 | 10, 20, 27, 32, 29 | 12, 21, 29, 35, 30 | 12, 23, 34, 37, 31 | 12, 25, 34, 40, 32 | 13, 26, 35, 42, 33 | 14, 28, 38, 45, 34 | 15, 29, 40, 48, 35 | 16, 31, 43, 51, 36 | 17, 33, 45, 54, 37 | 18, 35, 48, 57, 38 | 19, 37, 51, 60, 39 | 19, 38, 53, 63, 40 | 20, 40, 56, 66, 41 | 21, 43, 59, 70, 42 | 22, 45, 62, 74, 43 | 24, 47, 65, 77, 44 | 25, 49, 68, 81 45 | ] 46 | 47 | const EC_CODEWORDS_TABLE = [ 48 | // L M Q H 49 | 7, 10, 13, 17, 50 | 10, 16, 22, 28, 51 | 15, 26, 36, 44, 52 | 20, 36, 52, 64, 53 | 26, 48, 72, 88, 54 | 36, 64, 96, 112, 55 | 40, 72, 108, 130, 56 | 48, 88, 132, 156, 57 | 60, 110, 160, 192, 58 | 72, 130, 192, 224, 59 | 80, 150, 224, 264, 60 | 96, 176, 260, 308, 61 | 104, 198, 288, 352, 62 | 120, 216, 320, 384, 63 | 132, 240, 360, 432, 64 | 144, 280, 408, 480, 65 | 168, 308, 448, 532, 66 | 180, 338, 504, 588, 67 | 196, 364, 546, 650, 68 | 224, 416, 600, 700, 69 | 224, 442, 644, 750, 70 | 252, 476, 690, 816, 71 | 270, 504, 750, 900, 72 | 300, 560, 810, 960, 73 | 312, 588, 870, 1050, 74 | 336, 644, 952, 1110, 75 | 360, 700, 1020, 1200, 76 | 390, 728, 1050, 1260, 77 | 420, 784, 1140, 1350, 78 | 450, 812, 1200, 1440, 79 | 480, 868, 1290, 1530, 80 | 510, 924, 1350, 1620, 81 | 540, 980, 1440, 1710, 82 | 570, 1036, 1530, 1800, 83 | 570, 1064, 1590, 1890, 84 | 600, 1120, 1680, 1980, 85 | 630, 1204, 1770, 2100, 86 | 660, 1260, 1860, 2220, 87 | 720, 1316, 1950, 2310, 88 | 750, 1372, 2040, 2430 89 | ] 90 | 91 | /** 92 | * Returns the number of error correction block that the QR Code should contain 93 | * for the specified version and error correction level. 94 | * 95 | * @param {Number} version QR Code version 96 | * @param {Number} errorCorrectionLevel Error correction level 97 | * @return {Number} Number of error correction blocks 98 | */ 99 | exports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) { 100 | switch (errorCorrectionLevel) { 101 | case ECLevel.L: 102 | return EC_BLOCKS_TABLE[(version - 1) * 4 + 0] 103 | case ECLevel.M: 104 | return EC_BLOCKS_TABLE[(version - 1) * 4 + 1] 105 | case ECLevel.Q: 106 | return EC_BLOCKS_TABLE[(version - 1) * 4 + 2] 107 | case ECLevel.H: 108 | return EC_BLOCKS_TABLE[(version - 1) * 4 + 3] 109 | default: 110 | return undefined 111 | } 112 | } 113 | 114 | /** 115 | * Returns the number of error correction codewords to use for the specified 116 | * version and error correction level. 117 | * 118 | * @param {Number} version QR Code version 119 | * @param {Number} errorCorrectionLevel Error correction level 120 | * @return {Number} Number of error correction codewords 121 | */ 122 | exports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) { 123 | switch (errorCorrectionLevel) { 124 | case ECLevel.L: 125 | return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0] 126 | case ECLevel.M: 127 | return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1] 128 | case ECLevel.Q: 129 | return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2] 130 | case ECLevel.H: 131 | return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3] 132 | default: 133 | return undefined 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/server.js: -------------------------------------------------------------------------------- 1 | const canPromise = require('./can-promise') 2 | const QRCode = require('./core/qrcode') 3 | const PngRenderer = require('./renderer/png') 4 | const Utf8Renderer = require('./renderer/utf8') 5 | const TerminalRenderer = require('./renderer/terminal') 6 | const SvgRenderer = require('./renderer/svg') 7 | 8 | function checkParams (text, opts, cb) { 9 | if (typeof text === 'undefined') { 10 | throw new Error('String required as first argument') 11 | } 12 | 13 | if (typeof cb === 'undefined') { 14 | cb = opts 15 | opts = {} 16 | } 17 | 18 | if (typeof cb !== 'function') { 19 | if (!canPromise()) { 20 | throw new Error('Callback required as last argument') 21 | } else { 22 | opts = cb || {} 23 | cb = null 24 | } 25 | } 26 | 27 | return { 28 | opts: opts, 29 | cb: cb 30 | } 31 | } 32 | 33 | function getTypeFromFilename (path) { 34 | return path.slice((path.lastIndexOf('.') - 1 >>> 0) + 2).toLowerCase() 35 | } 36 | 37 | function getRendererFromType (type) { 38 | switch (type) { 39 | case 'svg': 40 | return SvgRenderer 41 | 42 | case 'txt': 43 | case 'utf8': 44 | return Utf8Renderer 45 | 46 | case 'png': 47 | case 'image/png': 48 | default: 49 | return PngRenderer 50 | } 51 | } 52 | 53 | function getStringRendererFromType (type) { 54 | switch (type) { 55 | case 'svg': 56 | return SvgRenderer 57 | 58 | case 'terminal': 59 | return TerminalRenderer 60 | 61 | case 'utf8': 62 | default: 63 | return Utf8Renderer 64 | } 65 | } 66 | 67 | function render (renderFunc, text, params) { 68 | if (!params.cb) { 69 | return new Promise(function (resolve, reject) { 70 | try { 71 | const data = QRCode.create(text, params.opts) 72 | return renderFunc(data, params.opts, function (err, data) { 73 | return err ? reject(err) : resolve(data) 74 | }) 75 | } catch (e) { 76 | reject(e) 77 | } 78 | }) 79 | } 80 | 81 | try { 82 | const data = QRCode.create(text, params.opts) 83 | return renderFunc(data, params.opts, params.cb) 84 | } catch (e) { 85 | params.cb(e) 86 | } 87 | } 88 | 89 | exports.create = QRCode.create 90 | 91 | exports.toCanvas = require('./browser').toCanvas 92 | 93 | exports.toString = function toString (text, opts, cb) { 94 | const params = checkParams(text, opts, cb) 95 | const type = params.opts ? params.opts.type : undefined 96 | const renderer = getStringRendererFromType(type) 97 | return render(renderer.render, text, params) 98 | } 99 | 100 | exports.toDataURL = function toDataURL (text, opts, cb) { 101 | const params = checkParams(text, opts, cb) 102 | const renderer = getRendererFromType(params.opts.type) 103 | return render(renderer.renderToDataURL, text, params) 104 | } 105 | 106 | exports.toBuffer = function toBuffer (text, opts, cb) { 107 | const params = checkParams(text, opts, cb) 108 | const renderer = getRendererFromType(params.opts.type) 109 | return render(renderer.renderToBuffer, text, params) 110 | } 111 | 112 | exports.toFile = function toFile (path, text, opts, cb) { 113 | if (typeof path !== 'string' || !(typeof text === 'string' || typeof text === 'object')) { 114 | throw new Error('Invalid argument') 115 | } 116 | 117 | if ((arguments.length < 3) && !canPromise()) { 118 | throw new Error('Too few arguments provided') 119 | } 120 | 121 | const params = checkParams(text, opts, cb) 122 | const type = params.opts.type || getTypeFromFilename(path) 123 | const renderer = getRendererFromType(type) 124 | const renderToFile = renderer.renderToFile.bind(null, path) 125 | 126 | return render(renderToFile, text, params) 127 | } 128 | 129 | exports.toFileStream = function toFileStream (stream, text, opts) { 130 | if (arguments.length < 2) { 131 | throw new Error('Too few arguments provided') 132 | } 133 | 134 | const params = checkParams(text, opts, stream.emit.bind(stream, 'error')) 135 | const renderer = getRendererFromType('png') // Only png support for now 136 | const renderToFileStream = renderer.renderToFileStream.bind(null, stream) 137 | render(renderToFileStream, text, params) 138 | } 139 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/bin/qrcode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var yargs = require('yargs') 3 | var qr = require('../lib') 4 | 5 | function save (file, text, options) { 6 | qr.toFile(file, text, options, function (err, data) { 7 | if (err) { 8 | console.error('Error:', err.message) 9 | process.exit(1) 10 | } 11 | 12 | console.log('saved qrcode to: ' + file + '\n') 13 | }) 14 | } 15 | 16 | function print (text, options) { 17 | options.type = 'terminal' 18 | qr.toString(text, options, function (err, text) { 19 | if (err) { 20 | console.error('Error:', err.message) 21 | process.exit(1) 22 | } 23 | 24 | console.log(text) 25 | }) 26 | } 27 | 28 | function parseOptions (args) { 29 | return { 30 | version: args.qversion, 31 | errorCorrectionLevel: args.error, 32 | type: args.type, 33 | small: !!args.small, 34 | inverse: !!args.inverse, 35 | maskPattern: args.mask, 36 | margin: args.qzone, 37 | width: args.width, 38 | scale: args.scale, 39 | color: { 40 | light: args.lightcolor, 41 | dark: args.darkcolor 42 | } 43 | } 44 | } 45 | 46 | function processInputs (text, opts) { 47 | if (!text.length) { 48 | yargs.showHelp() 49 | process.exit(1) 50 | } 51 | 52 | if (opts.output) { 53 | save(opts.output, text, parseOptions(opts)) 54 | } else { 55 | print(text, parseOptions(opts)) 56 | } 57 | } 58 | 59 | var argv = yargs 60 | .detectLocale(false) 61 | .usage('Usage: $0 [options] ') 62 | .option('v', { 63 | alias: 'qversion', 64 | description: 'QR Code symbol version (1 - 40)', 65 | group: 'QR Code options:', 66 | type: 'number' 67 | }) 68 | .option('e', { 69 | alias: 'error', 70 | description: 'Error correction level', 71 | choices: ['L', 'M', 'Q', 'H'], 72 | group: 'QR Code options:' 73 | }) 74 | .option('m', { 75 | alias: 'mask', 76 | description: 'Mask pattern (0 - 7)', 77 | group: 'QR Code options:', 78 | type: 'number' 79 | }) 80 | .option('t', { 81 | alias: 'type', 82 | description: 'Output type', 83 | choices: ['png', 'svg', 'utf8'], 84 | implies: 'output', 85 | group: 'Renderer options:' 86 | }) 87 | .option('i', { 88 | alias: 'inverse', 89 | type: 'boolean', 90 | description: 'Invert colors', 91 | group: 'Renderer options:' 92 | }) 93 | .option('w', { 94 | alias: 'width', 95 | description: 'Image width (px)', 96 | conflicts: 'scale', 97 | group: 'Renderer options:', 98 | type: 'number' 99 | }) 100 | .option('s', { 101 | alias: 'scale', 102 | description: 'Scale factor', 103 | conflicts: 'width', 104 | group: 'Renderer options:', 105 | type: 'number' 106 | }) 107 | .option('q', { 108 | alias: 'qzone', 109 | description: 'Quiet zone size', 110 | group: 'Renderer options:', 111 | type: 'number' 112 | }) 113 | .option('l', { 114 | alias: 'lightcolor', 115 | description: 'Light RGBA hex color', 116 | group: 'Renderer options:' 117 | }) 118 | .option('d', { 119 | alias: 'darkcolor', 120 | description: 'Dark RGBA hex color', 121 | group: 'Renderer options:' 122 | }) 123 | .option('small', { 124 | type: 'boolean', 125 | description: 'Output smaller QR code to terminal', 126 | conflicts: 'type', 127 | group: 'Renderer options:' 128 | }) 129 | .option('o', { 130 | alias: 'output', 131 | description: 'Output file' 132 | }) 133 | .help('h') 134 | .alias('h', 'help') 135 | .version() 136 | .example('$0 "some text"', 'Draw in terminal window') 137 | .example('$0 -o out.png "some text"', 'Save as png image') 138 | .example('$0 -d F00 -o out.png "some text"', 'Use red as foreground color') 139 | .parserConfiguration({'parse-numbers': false}) 140 | .argv 141 | 142 | if (process.stdin.isTTY) { 143 | processInputs(argv._.join(' '), argv) 144 | } else { 145 | var text = '' 146 | process.stdin.setEncoding('utf8') 147 | process.stdin.on('readable', function () { 148 | var chunk = process.stdin.read() 149 | if (chunk !== null) { 150 | text += chunk 151 | } 152 | }) 153 | 154 | process.stdin.on('end', function () { 155 | // this process can be run as a command outside of a tty so if there was no 156 | // data on stdin read from argv 157 | processInputs(text.length?text:argv._.join(' '), argv) 158 | }) 159 | } 160 | -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/mode.js: -------------------------------------------------------------------------------- 1 | const VersionCheck = require('./version-check') 2 | const Regex = require('./regex') 3 | 4 | /** 5 | * Numeric mode encodes data from the decimal digit set (0 - 9) 6 | * (byte values 30HEX to 39HEX). 7 | * Normally, 3 data characters are represented by 10 bits. 8 | * 9 | * @type {Object} 10 | */ 11 | exports.NUMERIC = { 12 | id: 'Numeric', 13 | bit: 1 << 0, 14 | ccBits: [10, 12, 14] 15 | } 16 | 17 | /** 18 | * Alphanumeric mode encodes data from a set of 45 characters, 19 | * i.e. 10 numeric digits (0 - 9), 20 | * 26 alphabetic characters (A - Z), 21 | * and 9 symbols (SP, $, %, *, +, -, ., /, :). 22 | * Normally, two input characters are represented by 11 bits. 23 | * 24 | * @type {Object} 25 | */ 26 | exports.ALPHANUMERIC = { 27 | id: 'Alphanumeric', 28 | bit: 1 << 1, 29 | ccBits: [9, 11, 13] 30 | } 31 | 32 | /** 33 | * In byte mode, data is encoded at 8 bits per character. 34 | * 35 | * @type {Object} 36 | */ 37 | exports.BYTE = { 38 | id: 'Byte', 39 | bit: 1 << 2, 40 | ccBits: [8, 16, 16] 41 | } 42 | 43 | /** 44 | * The Kanji mode efficiently encodes Kanji characters in accordance with 45 | * the Shift JIS system based on JIS X 0208. 46 | * The Shift JIS values are shifted from the JIS X 0208 values. 47 | * JIS X 0208 gives details of the shift coded representation. 48 | * Each two-byte character value is compacted to a 13-bit binary codeword. 49 | * 50 | * @type {Object} 51 | */ 52 | exports.KANJI = { 53 | id: 'Kanji', 54 | bit: 1 << 3, 55 | ccBits: [8, 10, 12] 56 | } 57 | 58 | /** 59 | * Mixed mode will contain a sequences of data in a combination of any of 60 | * the modes described above 61 | * 62 | * @type {Object} 63 | */ 64 | exports.MIXED = { 65 | bit: -1 66 | } 67 | 68 | /** 69 | * Returns the number of bits needed to store the data length 70 | * according to QR Code specifications. 71 | * 72 | * @param {Mode} mode Data mode 73 | * @param {Number} version QR Code version 74 | * @return {Number} Number of bits 75 | */ 76 | exports.getCharCountIndicator = function getCharCountIndicator (mode, version) { 77 | if (!mode.ccBits) throw new Error('Invalid mode: ' + mode) 78 | 79 | if (!VersionCheck.isValid(version)) { 80 | throw new Error('Invalid version: ' + version) 81 | } 82 | 83 | if (version >= 1 && version < 10) return mode.ccBits[0] 84 | else if (version < 27) return mode.ccBits[1] 85 | return mode.ccBits[2] 86 | } 87 | 88 | /** 89 | * Returns the most efficient mode to store the specified data 90 | * 91 | * @param {String} dataStr Input data string 92 | * @return {Mode} Best mode 93 | */ 94 | exports.getBestModeForData = function getBestModeForData (dataStr) { 95 | if (Regex.testNumeric(dataStr)) return exports.NUMERIC 96 | else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC 97 | else if (Regex.testKanji(dataStr)) return exports.KANJI 98 | else return exports.BYTE 99 | } 100 | 101 | /** 102 | * Return mode name as string 103 | * 104 | * @param {Mode} mode Mode object 105 | * @returns {String} Mode name 106 | */ 107 | exports.toString = function toString (mode) { 108 | if (mode && mode.id) return mode.id 109 | throw new Error('Invalid mode') 110 | } 111 | 112 | /** 113 | * Check if input param is a valid mode object 114 | * 115 | * @param {Mode} mode Mode object 116 | * @returns {Boolean} True if valid mode, false otherwise 117 | */ 118 | exports.isValid = function isValid (mode) { 119 | return mode && mode.bit && mode.ccBits 120 | } 121 | 122 | /** 123 | * Get mode object from its name 124 | * 125 | * @param {String} string Mode name 126 | * @returns {Mode} Mode object 127 | */ 128 | function fromString (string) { 129 | if (typeof string !== 'string') { 130 | throw new Error('Param is not a string') 131 | } 132 | 133 | const lcStr = string.toLowerCase() 134 | 135 | switch (lcStr) { 136 | case 'numeric': 137 | return exports.NUMERIC 138 | case 'alphanumeric': 139 | return exports.ALPHANUMERIC 140 | case 'kanji': 141 | return exports.KANJI 142 | case 'byte': 143 | return exports.BYTE 144 | default: 145 | throw new Error('Unknown mode: ' + string) 146 | } 147 | } 148 | 149 | /** 150 | * Returns mode from a value. 151 | * If value is not a valid mode, returns defaultValue 152 | * 153 | * @param {Mode|String} value Encoding mode 154 | * @param {Mode} defaultValue Fallback value 155 | * @return {Mode} Encoding mode 156 | */ 157 | exports.from = function from (value, defaultValue) { 158 | if (exports.isValid(value)) { 159 | return value 160 | } 161 | 162 | try { 163 | return fromString(value) 164 | } catch (e) { 165 | return defaultValue 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /src/style/reset.less: -------------------------------------------------------------------------------- 1 | /* 2 | 初始化样式 3 | */ 4 | 5 | /* 主题配色变量 */ 6 | :root { 7 | --font-family: 'Microsoft Yahei'; 8 | /*背景*/ 9 | --bg: #f1f1f1; 10 | --bg-light: #f8f8f8; 11 | /*边框*/ 12 | --border: #DEDEDE; 13 | /*字体*/ 14 | --font: #333; 15 | /*次字体*/ 16 | --font-second: #555; 17 | /*第三字体*/ 18 | --font-third: #888; 19 | /*主色60%*/ 20 | --primary: #00a2ca; 21 | /*次色30%*/ 22 | --secondary: #FF4684; 23 | /*强调色10%*/ 24 | --accent: #FA8E57; 25 | /*反色*/ 26 | --invert: #FFF; 27 | /*禁用*/ 28 | --disabled: #F3F3F3; 29 | /*链接*/ 30 | --link: #00a2ca; 31 | /*成功*/ 32 | --success: #5BBF60; 33 | /*错误、失败*/ 34 | --error: #FA5A57; 35 | /*警告*/ 36 | --warn: #FFB027; 37 | 38 | /* 透明背景 */ 39 | --rgba-black-28: rgba(0, 0, 0, .28); 40 | --rgba-black-50: rgba(0, 0, 0, .5); 41 | --rgba-black-82: rgba(0, 0, 0, .82); 42 | --rgba-white-28: rgba(255, 255, 255, .28); 43 | --rgba-white-50: rgba(255, 255, 255, .5); 44 | --rgba-white-82: rgba(255, 255, 255, .82); 45 | 46 | 47 | /* 基本尺寸 */ 48 | --base: 12px; 49 | 50 | /* 基本字体尺寸 */ 51 | --font-base: 15px; 52 | 53 | /* 基本行高尺寸 */ 54 | --line-height: 1; 55 | 56 | /* 圆角半径 */ 57 | --radius: 4px; 58 | } 59 | 60 | * { 61 | box-sizing: border-box; 62 | word-break: break-all; 63 | max-width: 100%; 64 | } 65 | 66 | h1, 67 | h2, 68 | h3, 69 | h4, 70 | h5, 71 | h6, 72 | ul, 73 | ol, 74 | p, 75 | pre, 76 | input[type="range"], 77 | input[type="checkbox"], 78 | input[type="radio"] { 79 | margin: 0; 80 | } 81 | 82 | ul, 83 | ol { 84 | padding: 0; 85 | list-style: none; 86 | } 87 | 88 | html, 89 | body { 90 | color: var(--font); 91 | font-size: var(--font-base); 92 | margin: 0; 93 | padding: 0; 94 | letter-spacing: 1px; 95 | line-height: var(--line-height); 96 | } 97 | 98 | html { 99 | /* 防止AOS出现横向滚动 */ 100 | overflow-x: hidden; 101 | } 102 | 103 | .icon, 104 | .iconfont { 105 | display: inline-block; 106 | font-size: calc(~"var(--base) * 1.25"); 107 | } 108 | 109 | p { 110 | text-indent: 2em; 111 | line-height: calc(~"var(--line-height) * 1.5"); 112 | padding: calc(~"var(--base) / 2") 0; 113 | } 114 | 115 | p img { 116 | max-width: calc(100% - 4em); 117 | } 118 | 119 | h1 { 120 | font-size: calc(~"var(--font-base) * 2"); 121 | 122 | } 123 | 124 | h2 { 125 | font-size: calc(~"var(--font-base) * 1.75"); 126 | 127 | } 128 | 129 | h3 { 130 | font-size: calc(~"var(--font-base) * 1.5"); 131 | 132 | } 133 | 134 | h4 { 135 | font-size: calc(~"var(--font-base) * 1.25"); 136 | 137 | } 138 | 139 | h5 { 140 | font-size: calc(~"var(--font-base) * 1.175"); 141 | 142 | } 143 | 144 | h6 { 145 | font-size: var(--font-base); 146 | } 147 | 148 | img { 149 | height: auto; 150 | object-fit: cover; 151 | } 152 | 153 | img.object-fit-contain { 154 | object-fit: contain; 155 | } 156 | 157 | a { 158 | color: var(--link); 159 | text-decoration: none; 160 | } 161 | 162 | a:hover { 163 | color: var(--accent); 164 | } 165 | 166 | /*表单元素*/ 167 | input, 168 | input[type="text"], 169 | input[type="email"], 170 | input[type="password"], 171 | input[type="number"], 172 | input[type="search"], 173 | input[type="url"], 174 | input[type="tel"], 175 | input[type="reset"], 176 | input[type="submit"], 177 | input[type="button"], 178 | textarea, 179 | button, 180 | select { 181 | color: var(--font); 182 | font-size: 1rem; 183 | font-family: var(--font-family); 184 | outline: none; 185 | border: 1px solid var(--border); 186 | border-radius: 4px; 187 | line-height: calc(~"var(--base) * 2.5"); 188 | padding: 0 calc(~"var(--base) / 2"); 189 | margin: 0; 190 | } 191 | 192 | input[type="number"] { 193 | padding-right: 0; 194 | } 195 | 196 | textarea { 197 | width: 100%; 198 | min-height: 7em; 199 | line-height: 1.5; 200 | padding: calc(~"var(--base) / 2") calc(~"var(--base) / 1.25"); 201 | 202 | } 203 | 204 | input[type="reset"], 205 | input[type="submit"], 206 | input[type="button"], 207 | button { 208 | min-width: 6em; 209 | text-align: center; 210 | cursor: pointer; 211 | border: none; 212 | padding: 0 var(--base); 213 | 214 | &:hover { 215 | opacity: .82; 216 | } 217 | } 218 | 219 | ::placeholder { 220 | color: var(--font-second); 221 | font-family: var(--font-family); 222 | font-size: .85rem; 223 | } 224 | 225 | select { 226 | border-color: var(--border); 227 | 228 | &:focus { 229 | outline: none; 230 | } 231 | } 232 | 233 | fieldset { 234 | border: 1px solid var(--border); 235 | } 236 | 237 | /* 表格 */ 238 | table { 239 | width: 100%; 240 | background-color: var(--invert); 241 | border-spacing: 0; 242 | border-collapse: collapse; 243 | 244 | caption { 245 | padding: var(--base) 0; 246 | } 247 | 248 | tr { 249 | &:hover { 250 | background-color: var(--bg); 251 | } 252 | } 253 | 254 | th, 255 | td { 256 | border: 1px solid var(--border); 257 | padding: calc(~"var(--base) / 3") calc(~"var(--base) / 2"); 258 | line-height: 1.5; 259 | } 260 | } 261 | 262 | /* 代码块 */ 263 | pre[class*="language-"], 264 | code[class*="language-"] { 265 | white-space: break-spaces; 266 | } 267 | 268 | /* 滚动条 */ 269 | /* 270 | ::-webkit-scrollbar { 271 | width: calc(~"var(--base) / 2); 272 | height: calc(~"var(--base) / 2); 273 | } 274 | 275 | ::-webkit-scrollbar-track { 276 | background-color: var(--bg); 277 | } 278 | 279 | ::-webkit-scrollbar-thumb { 280 | background-color: var(--primary); 281 | border-radius: calc(~"var(--base) / 2); 282 | } 283 | 284 | ::-webkit-scrollbar-thumb:hover { 285 | background-color: var(--accent); 286 | } 287 | */ -------------------------------------------------------------------------------- /src/view/template-1/script/qrcode/lib/core/version.js: -------------------------------------------------------------------------------- 1 | const Utils = require('./utils') 2 | const ECCode = require('./error-correction-code') 3 | const ECLevel = require('./error-correction-level') 4 | const Mode = require('./mode') 5 | const VersionCheck = require('./version-check') 6 | 7 | // Generator polynomial used to encode version information 8 | const G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0) 9 | const G18_BCH = Utils.getBCHDigit(G18) 10 | 11 | function getBestVersionForDataLength (mode, length, errorCorrectionLevel) { 12 | for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { 13 | if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) { 14 | return currentVersion 15 | } 16 | } 17 | 18 | return undefined 19 | } 20 | 21 | function getReservedBitsCount (mode, version) { 22 | // Character count indicator + mode indicator bits 23 | return Mode.getCharCountIndicator(mode, version) + 4 24 | } 25 | 26 | function getTotalBitsFromDataArray (segments, version) { 27 | let totalBits = 0 28 | 29 | segments.forEach(function (data) { 30 | const reservedBits = getReservedBitsCount(data.mode, version) 31 | totalBits += reservedBits + data.getBitsLength() 32 | }) 33 | 34 | return totalBits 35 | } 36 | 37 | function getBestVersionForMixedData (segments, errorCorrectionLevel) { 38 | for (let currentVersion = 1; currentVersion <= 40; currentVersion++) { 39 | const length = getTotalBitsFromDataArray(segments, currentVersion) 40 | if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) { 41 | return currentVersion 42 | } 43 | } 44 | 45 | return undefined 46 | } 47 | 48 | /** 49 | * Returns version number from a value. 50 | * If value is not a valid version, returns defaultValue 51 | * 52 | * @param {Number|String} value QR Code version 53 | * @param {Number} defaultValue Fallback value 54 | * @return {Number} QR Code version number 55 | */ 56 | exports.from = function from (value, defaultValue) { 57 | if (VersionCheck.isValid(value)) { 58 | return parseInt(value, 10) 59 | } 60 | 61 | return defaultValue 62 | } 63 | 64 | /** 65 | * Returns how much data can be stored with the specified QR code version 66 | * and error correction level 67 | * 68 | * @param {Number} version QR Code version (1-40) 69 | * @param {Number} errorCorrectionLevel Error correction level 70 | * @param {Mode} mode Data mode 71 | * @return {Number} Quantity of storable data 72 | */ 73 | exports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) { 74 | if (!VersionCheck.isValid(version)) { 75 | throw new Error('Invalid QR Code version') 76 | } 77 | 78 | // Use Byte mode as default 79 | if (typeof mode === 'undefined') mode = Mode.BYTE 80 | 81 | // Total codewords for this QR code version (Data + Error correction) 82 | const totalCodewords = Utils.getSymbolTotalCodewords(version) 83 | 84 | // Total number of error correction codewords 85 | const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel) 86 | 87 | // Total number of data codewords 88 | const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8 89 | 90 | if (mode === Mode.MIXED) return dataTotalCodewordsBits 91 | 92 | const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version) 93 | 94 | // Return max number of storable codewords 95 | switch (mode) { 96 | case Mode.NUMERIC: 97 | return Math.floor((usableBits / 10) * 3) 98 | 99 | case Mode.ALPHANUMERIC: 100 | return Math.floor((usableBits / 11) * 2) 101 | 102 | case Mode.KANJI: 103 | return Math.floor(usableBits / 13) 104 | 105 | case Mode.BYTE: 106 | default: 107 | return Math.floor(usableBits / 8) 108 | } 109 | } 110 | 111 | /** 112 | * Returns the minimum version needed to contain the amount of data 113 | * 114 | * @param {Segment} data Segment of data 115 | * @param {Number} [errorCorrectionLevel=H] Error correction level 116 | * @param {Mode} mode Data mode 117 | * @return {Number} QR Code version 118 | */ 119 | exports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) { 120 | let seg 121 | 122 | const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M) 123 | 124 | if (Array.isArray(data)) { 125 | if (data.length > 1) { 126 | return getBestVersionForMixedData(data, ecl) 127 | } 128 | 129 | if (data.length === 0) { 130 | return 1 131 | } 132 | 133 | seg = data[0] 134 | } else { 135 | seg = data 136 | } 137 | 138 | return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl) 139 | } 140 | 141 | /** 142 | * Returns version information with relative error correction bits 143 | * 144 | * The version information is included in QR Code symbols of version 7 or larger. 145 | * It consists of an 18-bit sequence containing 6 data bits, 146 | * with 12 error correction bits calculated using the (18, 6) Golay code. 147 | * 148 | * @param {Number} version QR Code version 149 | * @return {Number} Encoded version info bits 150 | */ 151 | exports.getEncodedBits = function getEncodedBits (version) { 152 | if (!VersionCheck.isValid(version) || version < 7) { 153 | throw new Error('Invalid QR Code version') 154 | } 155 | 156 | let d = version << 12 157 | 158 | while (Utils.getBCHDigit(d) - G18_BCH >= 0) { 159 | d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH)) 160 | } 161 | 162 | return (version << 12) | d 163 | } 164 | --------------------------------------------------------------------------------