feat: 工程化

This commit is contained in:
mozzie 2023-02-21 17:58:09 +08:00
parent 2e1e14e5dd
commit 8fde7ef976
167 changed files with 12227 additions and 60403 deletions

View File

@ -24,37 +24,24 @@
"dotenv": "16.0.3",
"axios": "0.27.2",
"jsonwebtoken": "9.0.0",
"@babel/core": "7.20.12"
"jquery": "3.2.1",
"bootstrap": "5.2.3",
"@popperjs/core": "2.11.6"
},
"devDependencies": {
"@midwayjs/cli": "^2.0.0",
"@midwayjs/mock": "^3.0.0",
"@types/koa": "^2.13.4",
"@types/node": "14",
"cross-env": "^6.0.0",
"jest": "^29.2.2",
"mwts": "^1.0.5",
"typescript": "~4.8.0",
"@types/mongoose": "^5.11.97",
"less": "3.8.0",
"less-loader": "4.1.0",
"mini-css-extract-plugin": "2.7.2",
"css-loader": "6.7.3",
"ts-loader": "9.4.2",
"url-loader": "4.1.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"buffer": "^6.0.3",
"cash-dom": "8.1.3",
"chalk": "4.1.2",
"copy-webpack-plugin": "5.1.2",
"crypto-browserify": "^3.12.0",
"stream-browserify": "3.0.0",
"inquirer": "8.0.0",
"assert": "2.0.0",
"babel-loader": "8.1.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0"
"@typescript-eslint/parser": "^5.0.0",
"@types/jsonwebtoken": "9.0.1",
"@types/jquery": "3.5.16",
"@types/bootstrap": "5.2.6"
},
"engines": {
"node": ">=12.0.0"
@ -63,6 +50,7 @@
"start": "NODE_ENV=production node ./bootstrap.js",
"dev:be": "cross-env NODE_ENV=local midway-bin dev --ts",
"dev:fe": "cross-env RUNNING_ENV=dev webpack -w",
"build:fe": "cross-env RUNNING_ENV=prod webpack build",
"cov": "midway-bin cov --ts",
"lint": "mwts check",
"lint:fix": "mwts fix",

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,24 @@
/*!
* Sizzle CSS Selector Engine v2.3.3
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-08-08
*/
/*!
* jQuery JavaScript Library v3.2.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2017-03-20T18:59Z
*/

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
/*!
* Bootstrap v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

View File

@ -1,4 +0,0 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ../../node_modules/.pnpm/registry.npmmirror.com+css-loader@6.7.3_webpack@5.75.0/node_modules/css-loader/dist/cjs.js!../../node_modules/.pnpm/registry.npmmirror.com+less-loader@4.1.0_less@3.8.0+webpack@5.75.0/node_modules/less-loader/dist/cjs.js!./view/page/home/index.less ***!
\********************************************************************************************************************************************************************************************************************************************************************************************/

View File

@ -1,79 +0,0 @@
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./view/page/home/index.less":
/*!***********************************!*\
!*** ./view/page/home/index.less ***!
\***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@backset/server/./view/page/home/index.less?");
/***/ }),
/***/ "./view/page/home/index.ts":
/*!*********************************!*\
!*** ./view/page/home/index.ts ***!
\*********************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__webpack_require__(/*! ./index.less */ \"./view/page/home/index.less\");\nconsole.log('use ts wepack');\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi92aWV3L3BhZ2UvaG9tZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHdCQUFzQjtBQUV0QixPQUFPLENBQUMsR0FBRyxDQUFDLGVBQWUsQ0FBQyxDQUFDIn0=\n\n//# sourceURL=webpack://@backset/server/./view/page/home/index.ts?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./view/page/home/index.ts");
/******/
/******/ })()
;

View File

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
404
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,79 +0,0 @@
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./view/page/notFound/index.less":
/*!***************************************!*\
!*** ./view/page/notFound/index.less ***!
\***************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@backset/server/./view/page/notFound/index.less?");
/***/ }),
/***/ "./view/page/notFound/index.ts":
/*!*************************************!*\
!*** ./view/page/notFound/index.ts ***!
\*************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__webpack_require__(/*! ./index.less */ \"./view/page/notFound/index.less\");\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi92aWV3L3BhZ2Uvbm90Rm91bmQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx3QkFBc0IifQ==\n\n//# sourceURL=webpack://@backset/server/./view/page/notFound/index.ts?");
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./view/page/notFound/index.ts");
/******/
/******/ })()
;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -20,13 +20,23 @@ eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extr
/***/ }),
/***/ "./view/page/home/index.scss":
/*!***********************************!*\
!*** ./view/page/home/index.scss ***!
\***********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack://@backset/server/./view/page/home/index.scss?");
/***/ }),
/***/ "./view/page/home/index.ts":
/*!*********************************!*\
!*** ./view/page/home/index.ts ***!
\*********************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__webpack_require__(/*! ./index.less */ \"./view/page/home/index.less\");\nconsole.log('use ts wepack');\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi92aWV3L3BhZ2UvaG9tZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHdCQUFzQjtBQUV0QixPQUFPLENBQUMsR0FBRyxDQUFDLGVBQWUsQ0FBQyxDQUFDIn0=\n\n//# sourceURL=webpack://@backset/server/./view/page/home/index.ts?");
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__webpack_require__(/*! ./index.less */ \"./view/page/home/index.less\");\n__webpack_require__(/*! ./index.scss */ \"./view/page/home/index.scss\");\nconsole.log('use ts wepack');\n// import { createPopper } from '@popperjs/core';\n// const popcorn = document.querySelector('#popcorn');\n// const tooltip = document.querySelector('#tooltip');\n// createPopper(popcorn, tooltip, {\n// placement: 'top',\n// });\nconst bootstrap_1 = __webpack_require__(/*! bootstrap */ \"../../node_modules/.pnpm/registry.npmmirror.com+bootstrap@5.2.3_@popperjs+core@2.11.6/node_modules/bootstrap/dist/js/bootstrap.esm.js\");\nconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]');\n[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap_1.Tooltip(tooltipTriggerEl, { delay: 100 }));\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi92aWV3L3BhZ2UvaG9tZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHdCQUFzQjtBQUN0Qix3QkFBc0I7QUFFdEIsT0FBTyxDQUFDLEdBQUcsQ0FBQyxlQUFlLENBQUMsQ0FBQztBQUU3QixpREFBaUQ7QUFDakQsc0RBQXNEO0FBQ3RELHNEQUFzRDtBQUN0RCxtQ0FBbUM7QUFDbkMsc0JBQXNCO0FBQ3RCLE1BQU07QUFFTix5Q0FJbUI7QUFFbkIsTUFBTSxrQkFBa0IsR0FBRyxRQUFRLENBQUMsZ0JBQWdCLENBQ2xELDRCQUE0QixDQUM3QixDQUFDO0FBQ0YsQ0FBQyxHQUFHLGtCQUFrQixDQUFDLENBQUMsR0FBRyxDQUN6QixnQkFBZ0IsQ0FBQyxFQUFFLENBQUMsSUFBSSxtQkFBTyxDQUFDLGdCQUFnQixFQUFFLEVBQUUsS0FBSyxFQUFFLEdBQUcsRUFBRSxDQUFDLENBQ2xFLENBQUMifQ==\n\n//# sourceURL=webpack://@backset/server/./view/page/home/index.ts?");
/***/ })
@ -56,7 +66,59 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__we
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
@ -68,12 +130,66 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__we
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "home": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunk_backset_server"] = self["webpackChunk_backset_server"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./view/page/home/index.ts");
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["chunk-vendors"], () => (__webpack_require__("./view/page/home/index.ts")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,36 @@
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "../../packages/util/dist/cjs/index.js":
/*!*********************************************!*\
!*** ../../packages/util/dist/cjs/index.js ***!
\*********************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
eval("\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.RegUtil = exports.ValidateUtil = void 0;\nconst ValidateUtil = __importStar(__webpack_require__(/*! ./validate */ \"../../packages/util/dist/cjs/validate.js\"));\nexports.ValidateUtil = ValidateUtil;\nconst RegUtil = __importStar(__webpack_require__(/*! ./reg */ \"../../packages/util/dist/cjs/reg.js\"));\nexports.RegUtil = RegUtil;\n\n//# sourceURL=webpack://@backset/server/../../packages/util/dist/cjs/index.js?");
/***/ }),
/***/ "../../packages/util/dist/cjs/reg.js":
/*!*******************************************!*\
!*** ../../packages/util/dist/cjs/reg.js ***!
\*******************************************/
/***/ ((__unused_webpack_module, exports) => {
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PHONE = void 0;\n/**\n * 手机号正则[常用]\n */\nexports.PHONE = /^1[3456789]\\d{9}$/;\n\n//# sourceURL=webpack://@backset/server/../../packages/util/dist/cjs/reg.js?");
/***/ }),
/***/ "../../packages/util/dist/cjs/validate.js":
/*!************************************************!*\
!*** ../../packages/util/dist/cjs/validate.js ***!
\************************************************/
/***/ ((__unused_webpack_module, exports) => {
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.withEmpty = void 0;\n/**\n * 检测对象是否存在空 value\n * @param {Object} obj 检测的对象\n */\nconst withEmpty = obj => Object.values(obj).some(v => !v);\nexports.withEmpty = withEmpty;\n\n//# sourceURL=webpack://@backset/server/../../packages/util/dist/cjs/validate.js?");
/***/ }),
/***/ "./view/page/signup/index.less":
/*!*************************************!*\
!*** ./view/page/signup/index.less ***!
@ -20,33 +50,13 @@ eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extr
/***/ }),
/***/ "./view/api/index.ts":
/*!***************************!*\
!*** ./view/api/index.ts ***!
\***************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.createUser = exports.getVerifyCode = exports.userLogin = void 0;\nconst request_1 = __webpack_require__(/*! ../lib/request */ \"./view/lib/request.ts\");\n/**\n * 用户登录\n */\nconst userLogin = (p) => request_1.axiosCommon.post('/auth/user/login', p);\nexports.userLogin = userLogin;\n/**\n * 获取验证码\n */\nconst getVerifyCode = (p) => request_1.axiosCommon.post('/sms/verifycode', p);\nexports.getVerifyCode = getVerifyCode;\n/**\n * 用户注册\n */\nconst createUser = (p) => request_1.axiosCommon.post('/user/create', p);\nexports.createUser = createUser;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi92aWV3L2FwaS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSw0Q0FBd0Q7QUFFeEQ7O0dBRUc7QUFDSSxNQUFNLFNBQVMsR0FBRyxDQUFDLENBQW9CLEVBQUUsRUFBRSxDQUNoRCxxQkFBTyxDQUFDLElBQUksQ0FBQyxrQkFBa0IsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUR6QixRQUFBLFNBQVMsYUFDZ0I7QUFFdEM7O0dBRUc7QUFDSSxNQUFNLGFBQWEsR0FBRyxDQUFDLENBQXFCLEVBQUUsRUFBRSxDQUNyRCxxQkFBTyxDQUFDLElBQUksQ0FBQyxpQkFBaUIsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUR4QixRQUFBLGFBQWEsaUJBQ1c7QUFFckM7O0dBRUc7QUFDSSxNQUFNLFVBQVUsR0FBRyxDQUFDLENBQWUsRUFBRSxFQUFFLENBQUMscUJBQU8sQ0FBQyxJQUFJLENBQUMsY0FBYyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQWxFLFFBQUEsVUFBVSxjQUF3RCJ9\n\n//# sourceURL=webpack://@backset/server/./view/api/index.ts?");
/***/ }),
/***/ "./view/lib/request.ts":
/*!*****************************!*\
!*** ./view/lib/request.ts ***!
\*****************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.axiosCommon = exports.sourceCommon = void 0;\nconst axios_1 = __webpack_require__(Object(function webpackMissingModule() { var e = new Error(\"Cannot find module 'axios'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));\nconst router_1 = __webpack_require__(Object(function webpackMissingModule() { var e = new Error(\"Cannot find module '../../config/router'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));\nconst CancelToken = axios_1.default.CancelToken;\nexports.sourceCommon = CancelToken.source();\nconst axiosCommon = axios_1.default.create({\n timeout: 6000 * 1000,\n cancelToken: exports.sourceCommon.token,\n baseURL: router_1.PREFIX.startsWith('/') ? router_1.PREFIX : '/' + router_1.PREFIX,\n});\nexports.axiosCommon = axiosCommon;\n// 请求拦截\naxiosCommon.interceptors.request.use((config) => {\n //TODO 一些拦截操作 here\n return config;\n}, (error) => {\n //TODO 一些提示...here\n return Promise.reject(error);\n});\n// 响应拦截\naxiosCommon.interceptors.response.use((response) => {\n const { code } = response.data;\n switch (code) {\n case 1000:\n if (window.location.pathname != '/login') {\n window.location.href = `/login`;\n }\n // message.warn('即将回到登录页');\n // setTimeout(() => {\n // }, 3000);\n break;\n default:\n break;\n }\n return response.data;\n}, (err) => Promise.reject(err));\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3ZpZXcvbGliL3JlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQTBCO0FBQzFCLGdEQUE2QztBQUU3QyxNQUFNLFdBQVcsR0FBRyxlQUFLLENBQUMsV0FBVyxDQUFDO0FBQ3pCLFFBQUEsWUFBWSxHQUFHLFdBQVcsQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUVqRCxNQUFNLFdBQVcsR0FBRyxlQUFLLENBQUMsTUFBTSxDQUFDO0lBQy9CLE9BQU8sRUFBRSxJQUFJLEdBQUcsSUFBSTtJQUNwQixXQUFXLEVBQUUsb0JBQVksQ0FBQyxLQUFLO0lBQy9CLE9BQU8sRUFBRSxlQUFNLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxlQUFNLENBQUMsQ0FBQyxDQUFDLEdBQUcsR0FBRyxlQUFNO0NBQ3hELENBQUMsQ0FBQztBQW9DTSxrQ0FBVztBQWxDcEIsT0FBTztBQUNQLFdBQVcsQ0FBQyxZQUFZLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FDbEMsQ0FBQyxNQUFNLEVBQUUsRUFBRTtJQUNULGtCQUFrQjtJQUNsQixPQUFPLE1BQU0sQ0FBQztBQUNoQixDQUFDLEVBQ0QsQ0FBQyxLQUFLLEVBQUUsRUFBRTtJQUNSLGtCQUFrQjtJQUNsQixPQUFPLE9BQU8sQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDL0IsQ0FBQyxDQUNGLENBQUM7QUFFRixPQUFPO0FBQ1AsV0FBVyxDQUFDLFlBQVksQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUNuQyxDQUFDLFFBQVEsRUFBRSxFQUFFO0lBQ1gsTUFBTSxFQUFFLElBQUksRUFBRSxHQUFHLFFBQVEsQ0FBQyxJQUFJLENBQUM7SUFDL0IsUUFBUSxJQUFJLEVBQUU7UUFDWixLQUFLLElBQUk7WUFDUCxJQUFJLE1BQU0sQ0FBQyxRQUFRLENBQUMsUUFBUSxJQUFJLFFBQVEsRUFBRTtnQkFDeEMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxJQUFJLEdBQUcsUUFBUSxDQUFDO2FBQ2pDO1lBQ0QsMkJBQTJCO1lBQzNCLHFCQUFxQjtZQUVyQixZQUFZO1lBQ1osTUFBTTtRQUNSO1lBQ0UsTUFBTTtLQUNUO0lBQ0QsT0FBTyxRQUFRLENBQUMsSUFBSSxDQUFDO0FBQ3ZCLENBQUMsRUFDRCxDQUFDLEdBQUcsRUFBRSxFQUFFLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FDN0IsQ0FBQyJ9\n\n//# sourceURL=webpack://@backset/server/./view/lib/request.ts?");
/***/ }),
/***/ "./view/page/signup/index.ts":
/*!***********************************!*\
!*** ./view/page/signup/index.ts ***!
\***********************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst api_1 = __webpack_require__(/*! ../../api */ \"./view/api/index.ts\");\n__webpack_require__(/*! ./index.less */ \"./view/page/signup/index.less\");\nconst cash_dom_1 = __webpack_require__(Object(function webpackMissingModule() { var e = new Error(\"Cannot find module 'cash-dom'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));\nconst { RegUtil, ValidateUtil } = __webpack_require__(Object(function webpackMissingModule() { var e = new Error(\"Cannot find module '@backset/util'\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));\n(0, cash_dom_1.default)(function () {\n (0, cash_dom_1.default)('#signup-module').on('click', '#btn-signup', handleCreateUser);\n /**\n * 注册\n */\n function handleCreateUser() {\n const params = {\n user_login: '' + (0, cash_dom_1.default)('#username').val(),\n user_pass: '' + (0, cash_dom_1.default)('#password').val(),\n user_phone: '' + (0, cash_dom_1.default)('#tel').val(),\n };\n if (ValidateUtil.withEmpty(params))\n return;\n // return message.error({ text: '请补全表单' });\n if (!RegUtil.PHONE.test(params.user_phone))\n return;\n // return message.error({ text: '手机号格式错误' });\n (0, api_1.createUser)(params).then((res) => {\n console.log(res);\n });\n }\n});\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi92aWV3L3BhZ2Uvc2lnbnVwL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUNBQXVDO0FBQ3ZDLHdCQUFzQjtBQUN0Qix1Q0FBeUI7QUFDekIsTUFBTSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsR0FBRyxPQUFPLENBQUMsZUFBZSxDQUFDLENBQUE7QUFFMUQsSUFBQSxrQkFBQyxFQUFDO0lBQ0EsSUFBQSxrQkFBQyxFQUFDLGdCQUFnQixDQUFDLENBQUMsRUFBRSxDQUFDLE9BQU8sRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQztJQUVqRTs7T0FFRztJQUNILFNBQVMsZ0JBQWdCO1FBQ3ZCLE1BQU0sTUFBTSxHQUFHO1lBQ2IsVUFBVSxFQUFFLEVBQUUsR0FBRyxJQUFBLGtCQUFDLEVBQUMsV0FBVyxDQUFDLENBQUMsR0FBRyxFQUFFO1lBQ3JDLFNBQVMsRUFBRSxFQUFFLEdBQUcsSUFBQSxrQkFBQyxFQUFDLFdBQVcsQ0FBQyxDQUFDLEdBQUcsRUFBRTtZQUNwQyxVQUFVLEVBQUUsRUFBRSxHQUFHLElBQUEsa0JBQUMsRUFBQyxNQUFNLENBQUMsQ0FBQyxHQUFHLEVBQUU7U0FDakMsQ0FBQztRQUNGLElBQUksWUFBWSxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUM7WUFBRSxPQUFPO1FBQzNDLDJDQUEyQztRQUMzQyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQVUsQ0FBQztZQUFFLE9BQU87UUFDbkQsNkNBQTZDO1FBQzdDLElBQUEsZ0JBQVUsRUFBQyxNQUFNLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRTtZQUM5QixPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ25CLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztBQUNILENBQUMsQ0FBQyxDQUFDIn0=\n\n//# sourceURL=webpack://@backset/server/./view/page/signup/index.ts?");
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n__webpack_require__(/*! ./index.less */ \"./view/page/signup/index.less\");\nconst util_1 = __webpack_require__(/*! @backset/util */ \"../../packages/util/dist/cjs/index.js\");\nconst jquery_1 = __importDefault(__webpack_require__(/*! jquery */ \"../../node_modules/.pnpm/registry.npmmirror.com+jquery@3.2.1/node_modules/jquery/dist/jquery.js\"));\n(0, jquery_1.default)(function () {\n (0, jquery_1.default)('#signup-module').on('click', '#btn-signup', handleCreateUser);\n /**\n * 注册\n */\n function handleCreateUser() {\n const params = {\n user_login: '' + (0, jquery_1.default)('#username').val(),\n user_pass: '' + (0, jquery_1.default)('#password').val(),\n user_phone: '' + (0, jquery_1.default)('#tel').val(),\n };\n if (util_1.ValidateUtil.withEmpty(params))\n return;\n // return message.error({ text: '请补全表单' });\n if (!util_1.RegUtil.PHONE.test(params.user_phone))\n return;\n // return message.error({ text: '手机号格式错误' });\n jquery_1.default.post('/user/create', params, res => {\n console.log(res);\n });\n }\n});\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi92aWV3L3BhZ2Uvc2lnbnVwL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsd0JBQXNCO0FBQ3RCLHdDQUFzRDtBQUN0RCxvREFBdUI7QUFFdkIsSUFBQSxnQkFBQyxFQUFDO0lBQ0EsSUFBQSxnQkFBQyxFQUFDLGdCQUFnQixDQUFDLENBQUMsRUFBRSxDQUFDLE9BQU8sRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQztJQUVqRTs7T0FFRztJQUNILFNBQVMsZ0JBQWdCO1FBQ3ZCLE1BQU0sTUFBTSxHQUFHO1lBQ2IsVUFBVSxFQUFFLEVBQUUsR0FBRyxJQUFBLGdCQUFDLEVBQUMsV0FBVyxDQUFDLENBQUMsR0FBRyxFQUFFO1lBQ3JDLFNBQVMsRUFBRSxFQUFFLEdBQUcsSUFBQSxnQkFBQyxFQUFDLFdBQVcsQ0FBQyxDQUFDLEdBQUcsRUFBRTtZQUNwQyxVQUFVLEVBQUUsRUFBRSxHQUFHLElBQUEsZ0JBQUMsRUFBQyxNQUFNLENBQUMsQ0FBQyxHQUFHLEVBQUU7U0FDakMsQ0FBQztRQUNGLElBQUksbUJBQVksQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDO1lBQUUsT0FBTztRQUMzQywyQ0FBMkM7UUFDM0MsSUFBSSxDQUFDLGNBQU8sQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxVQUFVLENBQUM7WUFBRSxPQUFPO1FBQ25ELDZDQUE2QztRQUM3QyxnQkFBQyxDQUFDLElBQUksQ0FBQyxjQUFjLEVBQUUsTUFBTSxFQUFFLEdBQUcsQ0FBQyxFQUFFO1lBQ25DLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDbkIsQ0FBQyxDQUFDLENBQUM7SUFDTCxDQUFDO0FBQ0gsQ0FBQyxDQUFDLENBQUMifQ==\n\n//# sourceURL=webpack://@backset/server/./view/page/signup/index.ts?");
/***/ })
@ -70,13 +80,53 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
@ -88,12 +138,66 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\ncons
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "signup": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunk_backset_server"] = self["webpackChunk_backset_server"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./view/page/signup/index.ts");
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["chunk-lib"], () => (__webpack_require__("./view/page/signup/index.ts")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;

View File

@ -2,7 +2,7 @@ import { Middleware, IMiddleware } from '@midwayjs/core';
import { NextFunction, Context } from '@midwayjs/koa';
const locals = {
assets: 'public/dev/',
assets: 'public/',
version: Date.now(),
};

View File

@ -0,0 +1,15 @@
import hash = require('object-hash');
import jwt = require('jsonwebtoken');
export const md5 = (text: string) => hash(text, { algorithm: 'md5' });
/**
* payload生成token
*/
export const createToken = (payload: any): string =>
jwt.sign({ ...payload }, 'mozzie');
/**
* token payload
*/
export const decodeToken = (token: string): any => jwt.verify(token, 'mozzie');

View File

@ -6,7 +6,8 @@
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"inlineSourceMap":true,
"esModuleInterop": true,
"inlineSourceMap": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"stripInternal": true,
@ -14,7 +15,10 @@
"pretty": true,
"declaration": true,
"forceConsistentCasingInFileNames": true,
"typeRoots": [ "./typings", "./node_modules/@types"],
"typeRoots": [
"./typings",
"./node_modules/@types"
],
"outDir": "dist"
},
"exclude": [

View File

@ -1,16 +1,14 @@
import { axiosCommon as Request } from '../lib/request';
/**
*
*/
export const userLogin = (p: any) => Request.post('/auth/user/login', p);
export const userLogin = (p: any) => $.post('/auth/user/login', p);
/**
*
*/
export const getVerifyCode = (p: any) => Request.post('/sms/verifycode', p);
export const getVerifyCode = (p: any) => $.post('/sms/verifycode', p);
/**
*
*/
export const createUser = (p: any) => Request.post('/user/create', p);
export const createUser = (p: any) => $.post('/user/create', p);

View File

@ -1,7 +1,3 @@
@import './spectre-less/spectre.less';
@import './spectre-less/spectre-exp.less';
@import './spectre-less/spectre-icons.less';
@font-face {
font-family: backset;
src: url('../assets/font/backset.woff');

View File

@ -1,16 +0,0 @@
/*! Spectre.css Experimentals | MIT License | github.com/picturepan2/spectre */
// Core variables and mixins
@import 'src/variables.less';
@import 'src/mixins.less';
// Experimentals
@import 'src/calendars.less';
@import 'src/carousels.less';
@import 'src/comparison-sliders.less';
@import 'src/filters.less';
@import 'src/meters.less';
@import 'src/parallax.less';
@import 'src/progress.less';
@import 'src/sliders.less';
@import 'src/timelines.less';

View File

@ -1,8 +0,0 @@
/*! Spectre.css Icons | MIT License | github.com/picturepan2/spectre */
// Core variables and mixins
@import 'src/variables.less';
@import 'src/mixins.less';
// Icons
@import 'src/icons.less';

View File

@ -1,50 +0,0 @@
/*! Spectre.css | MIT License | github.com/picturepan2/spectre */
// Core variables and mixins
@import 'src/variables.less';
@import 'src/mixins.less';
// Reset and dependencies
@import 'src/normalize.less';
@import 'src/base.less';
// Core classes
@import 'src/typography.less';
@import 'src/asian.less';
@import 'src/tables.less';
@import 'src/buttons.less';
@import 'src/forms.less';
@import 'src/labels.less';
@import 'src/codes.less';
@import 'src/media.less';
// Layout
@import 'src/layout.less';
@import 'src/navbar.less';
@import 'src/panels.less';
@import 'src/empty.less';
// Components
@import 'src/accordions.less';
@import 'src/autocomplete.less';
@import 'src/avatars.less';
@import 'src/badges.less';
@import 'src/breadcrumbs.less';
@import 'src/bars.less';
@import 'src/cards.less';
@import 'src/chips.less';
@import 'src/dropdowns.less';
@import 'src/menus.less';
@import 'src/modals.less';
@import 'src/navs.less';
@import 'src/pagination.less';
@import 'src/popovers.less';
@import 'src/steps.less';
@import 'src/tabs.less';
@import 'src/tiles.less';
@import 'src/toasts.less';
@import 'src/tooltips.less';
// Utility classes
@import 'src/animations.less';
@import 'src/utilities.less';

View File

@ -1,34 +0,0 @@
// Accordions
.accordion {
.accordion-item {
input {
&:checked {
& ~ .accordion-header {
.icon {
transform: rotate(90deg);
}
}
& ~ .accordion-body {
max-height: 1000px;
}
}
}
.accordion-header {
display: block;
padding: @unit-1 @unit-2;
.icon {
transition: all .2s ease;
}
}
.accordion-body {
margin-bottom: @layout-spacing;
max-height: 0;
overflow: hidden;
transition: max-height .2s ease;
}
}
}

View File

@ -1,20 +0,0 @@
// Animations
@keyframes loading {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes slide-down {
0% {
opacity: 0;
transform: translateY(-@unit-8);
}
100% {
opacity: 1;
transform: translateY(0);
}
}

View File

@ -1,33 +0,0 @@
// Optimized for East Asian CJK
:lang(zh) {
font-family: @cjk-zh-font-family;
}
:lang(ja) {
font-family: @cjk-jp-font-family;
}
:lang(ko) {
font-family: @cjk-ko-font-family;
}
:lang(zh),
:lang(ja),
.cjk {
ins,
u {
border-bottom: @border-width solid;
text-decoration: none;
}
del + del,
del + s,
ins + ins,
ins + u,
s + del,
s + s,
u + ins,
u + u {
margin-left: .125em;
}
}

View File

@ -1,41 +0,0 @@
// Autocomplete
.form-autocomplete {
position: relative;
.form-autocomplete-input {
align-content: flex-start;
display: flex;
flex-wrap: wrap;
height: auto;
min-height: @unit-8;
padding: @unit-h;
&.is-focused {
border-color: @primary-color;
.control-shadow();
}
.form-input {
border-color: transparent;
box-shadow: none;
display: inline-block;
flex: 1 0 auto;
height: @unit-6;
line-height: @unit-4;
margin: @unit-h;
width: auto;
}
}
mark {
font-size: 1;
padding: .1em 0;
}
.menu {
left: 0;
position: absolute;
top: 100%;
width: 100%;
}
}

View File

@ -1,77 +0,0 @@
// Avatars
.avatar {
.avatar-base();
background: @primary-color;
border-radius: 50%;
color: fade(@light-color, 85%);
display: inline-block;
font-weight: 300;
line-height: 1;
margin: 0;
position: relative;
vertical-align: middle;
&.avatar-xs {
.avatar-base(@unit-4);
}
&.avatar-sm {
.avatar-base(@unit-6);
}
&.avatar-lg {
.avatar-base(@unit-12);
}
&.avatar-xl {
.avatar-base(@unit-16);
}
img {
border-radius: 50%;
height: 100%;
position: relative;
width: 100%;
z-index: @zindex-0;
}
.avatar-icon,
.avatar-presence {
background: @bg-color-light;
bottom: 14.64%;
height: 50%;
padding: @border-width-lg;
position: absolute;
right: 14.64%;
transform: translate(50%, 50%);
width: 50%;
z-index: @zindex-0 + 1;
}
.avatar-presence {
background: @gray-color;
box-shadow: 0 0 0 @border-width-lg @light-color;
border-radius: 50%;
height: .5em;
width: .5em;
&.online {
background: @success-color;
}
&.busy {
background: @error-color;
}
&.away {
background: @warning-color;
}
}
&[data-initial]::before {
color: currentColor;
content: attr(data-initial);
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
z-index: @zindex-0;
}
}

View File

@ -1,70 +0,0 @@
// Badges
.badge {
position: relative;
white-space: nowrap;
&[data-badge],
&:not([data-badge]) {
&::after {
background: @primary-color;
background-clip: padding-box;
border-radius: .5rem;
box-shadow: 0 0 0 .1rem @bg-color-light;
color: @light-color;
content: attr(data-badge);
display: inline-block;
transform: translate(-.1rem, -.5rem);
}
}
&[data-badge] {
&::after {
font-size: @font-size-sm;
height: 18px;
line-height: 1;
min-width: 18px;
padding: 3px 5px;
text-align: center;
white-space: nowrap;
}
}
&:not([data-badge]),
&[data-badge=''] {
&::after {
height: 6px;
min-width: 6px;
padding: 0;
width: 6px;
}
}
// Badges for Buttons
&.btn {
&::after {
position: absolute;
top: 0;
right: 0;
transform: translate(50%, -50%);
}
}
// Badges for Avatars
&.avatar {
&::after {
position: absolute;
top: 14.64%;
right: 14.64%;
transform: translate(50%, -50%);
z-index: @zindex-1;
}
}
&.avatar-xs {
&::after {
content: "";
height: @unit-2;
min-width: @unit-2;
padding: 0;
width: @unit-2;
}
}
}

View File

@ -1,71 +0,0 @@
// Bars
.bar {
background: @bg-color-dark;
border-radius: @border-radius;
display: flex;
flex-wrap: nowrap;
height: @unit-4;
width: 100%;
&.bar-sm {
height: @unit-1;
}
// TODO: attr() support
.bar-item {
background: @primary-color;
color: @light-color;
display: block;
font-size: @font-size-sm;
flex-shrink: 0;
line-height: @unit-4;
height: 100%;
position: relative;
text-align: center;
width: 0;
&:first-child {
border-bottom-left-radius: @border-radius;
border-top-left-radius: @border-radius;
}
&:last-child {
border-bottom-right-radius: @border-radius;
border-top-right-radius: @border-radius;
flex-shrink: 1;
}
}
}
// Slider bar
.bar-slider {
height: @border-width-lg;
margin: @layout-spacing 0;
position: relative;
.bar-item {
left: 0;
padding: 0;
position: absolute;
&:not(:last-child):first-child {
background: @bg-color-dark;
z-index: @zindex-0;
}
}
.bar-slider-btn {
background: @primary-color;
border: 0;
border-radius: 50%;
height: @unit-3;
padding: 0;
position: absolute;
right: 0;
top: 50%;
transform: translate(50%, -50%);
width: @unit-3;
&:active {
box-shadow: 0 0 0 .1rem @primary-color;
}
}
}

View File

@ -1,40 +0,0 @@
// Base
*,
*::before,
*::after {
box-sizing: inherit;
}
html {
box-sizing: border-box;
font-size: @html-font-size;
line-height: @html-line-height;
-webkit-tap-highlight-color: transparent;
}
body {
background: @body-bg;
color: @body-font-color;
font-family: @body-font-family;
font-size: @font-size;
overflow-x: hidden;
text-rendering: optimizeLegibility;
}
a {
color: @link-color;
outline: none;
text-decoration: none;
&:focus {
.control-shadow();
}
&:focus,
&:hover,
&:active,
&.active {
color: @link-color-dark;
text-decoration: underline;
}
}

View File

@ -1,29 +0,0 @@
// Breadcrumbs
.breadcrumb {
list-style: none;
margin: @unit-1 0;
padding: @unit-1 0;
.breadcrumb-item {
color: @gray-color-dark;
display: inline-block;
margin: 0;
padding: @unit-1 0;
&:not(:last-child) {
margin-right: @unit-1;
a {
color: @gray-color-dark;
}
}
&:not(:first-child) {
&::before {
color: @gray-color-light;
content: "/";
padding-right: @unit-1;
}
}
}
}

View File

@ -1,182 +0,0 @@
// Buttons
.btn {
appearance: none;
background: @bg-color-light;
border: @border-width solid @primary-color;
border-radius: @border-radius;
color: @primary-color;
.control-transition();
cursor: pointer;
display: inline-block;
font-size: @font-size;
height: @control-size;
line-height: @line-height;
outline: none;
padding: @control-padding-v @control-padding-h;
text-align: center;
text-decoration: none;
user-select: none;
vertical-align: middle;
white-space: nowrap;
&:focus {
.control-shadow();
}
&:focus,
&:hover {
background: @secondary-color;
border-color: @primary-color-dark;
text-decoration: none;
}
&:active,
&.active {
background: @primary-color-dark;
border-color: darken(@primary-color-dark, 5%);
color: @light-color;
text-decoration: none;
&.loading {
&::after {
border-bottom-color: @light-color;
border-left-color: @light-color;
}
}
}
&[disabled],
&:disabled,
&.disabled {
cursor: default;
opacity: .5;
pointer-events: none;
}
// Button Primary
&.btn-primary {
background: @primary-color;
border-color: @primary-color-dark;
color: @light-color;
&:focus,
&:hover {
background: darken(@primary-color-dark, 2%);
border-color: darken(@primary-color-dark, 5%);
color: @light-color;
}
&:active,
&.active {
background: darken(@primary-color-dark, 4%);
border-color: darken(@primary-color-dark, 7%);
color: @light-color;
}
&.loading {
&::after {
border-bottom-color: @light-color;
border-left-color: @light-color;
}
}
}
// Button Link
&.btn-link {
background: transparent;
border-color: transparent;
color: @link-color;
&:focus,
&:hover,
&:active,
&.active {
color: @link-color-dark;
}
}
// Button Sizes
&.btn-sm {
font-size: @font-size-sm;
height: @control-size-sm;
padding: @control-padding-v-sm @control-padding-h * .75;
}
&.btn-lg {
font-size: @font-size-lg;
height: @control-size-lg;
padding: @control-padding-v-lg @control-padding-h * 1.5;
}
// Button Block
&.btn-block {
display: block;
width: 100%;
}
// Button Action
&.btn-action {
width: @control-size;
padding-left: 0;
padding-right: 0;
&.btn-sm {
width: @control-size-sm;
}
&.btn-lg {
width: @control-size-lg;
}
}
// Button Clear
&.btn-clear {
background: transparent;
border: 0;
color: currentColor;
height: @unit-4;
line-height: @unit-4;
margin-left: @unit-1;
margin-right: -2px;
opacity: .45;
padding: 0 2px;
text-decoration: none;
width: @unit-4;
&:hover {
opacity: .85;
}
&::before {
content: "\2715";
}
}
}
// Button groups
.btn-group {
display: inline-flex;
flex-wrap: wrap;
.btn {
flex: 1 0 auto;
&:first-child:not(:last-child) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
&:not(:first-child):not(:last-child) {
border-radius: 0;
margin-left: -@border-width;
}
&:last-child:not(:first-child) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
margin-left: -@border-width;
}
&:focus,
&:hover,
&:active,
&.active {
z-index: @zindex-0;
}
}
&.btn-group-block {
display: flex;
.btn {
flex: 1 0 0;
}
}
}

View File

@ -1,206 +0,0 @@
// Calendars
.calendar {
border: @border-width solid @border-color;
border-radius: @border-radius;
display: block;
min-width: 280px;
text-align: center;
.calendar-nav {
align-items: center;
background: @bg-color;
border-top-left-radius: @border-radius;
border-top-right-radius: @border-radius;
display: flex;
font-size: @font-size-lg;
padding: @layout-spacing;
}
.calendar-header,
.calendar-body {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: @layout-spacing 0;
.calendar-date {
flex: 0 0 14.28%; // 7 calendar-items each row
max-width: 14.28%;
}
}
.calendar-header {
background: @bg-color;
border-bottom: @border-width solid @border-color;
color: @gray-color;
font-size: @font-size-sm;
}
.calendar-body {
color: @gray-color-dark;
}
.calendar-date {
border: 0;
padding: @unit-1;
.date-item {
appearance: none;
background: transparent;
border: @border-width solid transparent;
border-radius: 50%;
color: @gray-color-dark;
.control-transition();
cursor: pointer;
height: @unit-7;
line-height: @unit-5;
outline: none;
padding: @unit-h;
position: relative;
text-align: center;
text-decoration: none;
vertical-align: middle;
white-space: nowrap;
width: @unit-7;
&.date-today {
border-color: @secondary-color-dark;
color: @primary-color;
}
&:focus {
.control-shadow();
}
&:focus,
&:hover {
background: @secondary-color-light;
border-color: @secondary-color-dark;
color: @primary-color;
text-decoration: none;
}
&:active,
&.active {
background: @primary-color-dark;
border-color: darken(@primary-color-dark, 5%);
color: @light-color;
}
// Calendar badge support
&.badge {
&::after {
position: absolute;
top: 3px;
right: 3px;
transform: translate(50%, -50%);
}
}
}
&.disabled .date-item,
&.disabled .calendar-event,
.date-item:disabled,
.calendar-event:disabled {
cursor: default;
opacity: .25;
pointer-events: none;
}
}
.calendar-range {
position: relative;
&::before {
background: @secondary-color;
content: "";
height: @unit-7;
left: 0;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
&.range-start {
&::before {
left: 50%;
}
}
&.range-end {
&::before {
right: 50%;
}
}
.date-item {
color: @primary-color;
}
}
&.calendar-lg {
.calendar-body {
padding: 0;
.calendar-date {
border-bottom: @border-width solid @border-color;
border-right: @border-width solid @border-color;
display: flex;
flex-direction: column;
height: 5.5rem;
padding: 0;
&:nth-child(7n) {
border-right: 0;
}
&:nth-last-child(-n+7) {
border-bottom: 0;
}
}
}
.date-item {
align-self: flex-end;
height: @unit-7;
margin-right: @layout-spacing-sm;
margin-top: @layout-spacing-sm;
}
.calendar-range {
&::before {
top: 19px;
}
&.range-start {
&::before {
left: auto;
width: 19px;
}
}
&.range-end {
&::before {
right: 19px;
}
}
}
.calendar-events {
flex-grow: 1;
line-height: 1;
overflow-y: auto;
padding: @layout-spacing-sm;
}
.calendar-event {
background: @secondary-color;
border-radius: @border-radius;
color: @primary-color;
font-size: @font-size-sm;
display: block;
margin: @unit-h auto;
overflow: hidden;
padding: 3px 4px;
text-align: left;
text-overflow: ellipsis;
vertical-align: baseline;
white-space: nowrap;
}
}
}

View File

@ -1,39 +0,0 @@
// Cards
.card {
background: @bg-color-light;
border: @border-width solid @border-color;
border-radius: @border-radius;
display: flex;
flex-direction: column;
.card-header,
.card-body,
.card-footer {
padding: @layout-spacing-lg;
padding-bottom: 0;
&:last-child {
padding-bottom: @layout-spacing-lg;
}
}
.card-image {
padding-top: @layout-spacing-lg;
&:first-child {
padding-top: 0;
img {
border-top-left-radius: @border-radius;
border-top-right-radius: @border-radius;
}
}
&:last-child {
img {
border-bottom-left-radius: @border-radius;
border-bottom-right-radius: @border-radius;
}
}
}
}

View File

@ -1,124 +0,0 @@
// Carousels
.carousel {
background: @bg-color;
display: block;
overflow: hidden;
position: relative;
width: 100%;
.carousel-container {
height: 100%;
left: 0;
position: relative;
&::before {
content: "";
display: block;
padding-bottom: 56.25%;
}
.carousel-item {
animation: carousel-slideout 1s ease-in-out 1;
height: 100%;
left: 0;
margin: 0;
opacity: 0;
position: absolute;
top: 0;
width: 100%;
&:hover {
.item-prev,
.item-next {
opacity: 1;
}
}
}
.item-prev,
.item-next {
background: fade(@gray-color-light, 25%);
border-color: fade(@gray-color-light, 50%);
color: @gray-color-light;
opacity: 0;
position: absolute;
top: 50%;
transition: all .4s ease;
transform: translateY(-50%);
z-index: @zindex-2;
}
.item-prev {
left: 1rem;
}
.item-next {
right: 1rem;
}
}
.carousel-locator {
&:nth-of-type(1):checked ~ .carousel-container .carousel-item:nth-of-type(1),
&:nth-of-type(2):checked ~ .carousel-container .carousel-item:nth-of-type(2),
&:nth-of-type(3):checked ~ .carousel-container .carousel-item:nth-of-type(3),
&:nth-of-type(4):checked ~ .carousel-container .carousel-item:nth-of-type(4) {
animation: carousel-slidein .75s ease-in-out 1;
opacity: 1;
z-index: @zindex-1;
}
&:nth-of-type(1):checked ~ .carousel-nav .nav-item:nth-of-type(1),
&:nth-of-type(2):checked ~ .carousel-nav .nav-item:nth-of-type(2),
&:nth-of-type(3):checked ~ .carousel-nav .nav-item:nth-of-type(3),
&:nth-of-type(4):checked ~ .carousel-nav .nav-item:nth-of-type(4) {
color: @gray-color-light;
}
}
.carousel-nav {
bottom: @layout-spacing;
display: flex;
justify-content: center;
left: 50%;
position: absolute;
transform: translateX(-50%);
width: 10rem;
z-index: @zindex-2;
.nav-item {
color: fade(@gray-color-light, 50%);
display: block;
flex: 1 0 auto;
height: @unit-8;
margin: @unit-1;
max-width: 2.5rem;
position: relative;
&::before {
background: currentColor;
content: "";
display: block;
height: @border-width-lg;
position: absolute;
top: .5rem;
width: 100%;
}
}
}
}
@keyframes carousel-slidein {
0% {
transform: translateX(100%);
}
100% {
transform: translateX(0);
}
}
@keyframes carousel-slideout {
0% {
opacity: 1;
transform: translateX(0);
}
100% {
opacity: 1;
transform: translateX(-50%);
}
}

View File

@ -1,24 +0,0 @@
// Chips
.chip {
align-items: center;
background: @bg-color-dark;
border-radius: 5rem;
color: @gray-color-dark;
display: inline-flex;
height: @unit-6;
margin: @unit-h;
max-width: 100%;
padding: @unit-h @unit-2 + @unit-h;
text-decoration: none;
vertical-align: middle;
&.active {
background: @primary-color;
color: @light-color;
}
.avatar {
margin-left: -(@unit-2 + @unit-h);
margin-right: @unit-1;
}
}

View File

@ -1,32 +0,0 @@
// Codes
code {
font-size: .65rem;
.label-base();
.label-variant(@code-color, lighten(@code-color, 33%));
}
.code {
border-radius: @border-radius;
color: @body-font-color;
line-height: @line-height;
position: relative;
&::before {
content: attr(data-lang);
color: @gray-color;
font-size: @font-size-sm;
position: absolute;
right: @layout-spacing;
top: @unit-h;
}
code {
background: @bg-color;
color: inherit;
display: block;
line-height: inherit;
overflow-x: auto;
padding: 1rem;
width: 100%;
}
}

View File

@ -1,114 +0,0 @@
// Image comparison slider
// Credit: http://codepen.io/solipsistacp/pen/Gpmaq
.comparison-slider {
height: 50vh;
overflow: hidden;
position: relative;
width: 100%;
.comparison-before,
.comparison-after {
height: 100%;
left: 0;
margin: 0;
overflow: hidden;
position: absolute;
top: 0;
img {
height: 100%;
object-fit: none;
object-position: left center;
position: absolute;
width: 100%;
}
}
.comparison-before {
width: 100%;
z-index: 1;
.comparison-label {
right: @unit-4;
}
}
.comparison-after {
max-width: 100%;
min-width: 0;
z-index: 2;
&::before {
background: transparent;
content: "";
cursor: default;
height: 100%;
left: 0;
position: absolute;
right: @unit-4;
top: 0;
z-index: @zindex-0;
}
&::after {
background: currentColor;
border-radius: 50%;
box-shadow: 0 -5px, 0 5px;
color: @light-color;
content: "";
height: 3px;
position: absolute;
right: @unit-2;
top: 50%;
transform: translate(50%, -50%);
width: 3px;
}
.comparison-label {
left: @unit-4;
}
}
.comparison-resizer {
animation: first-run 1.5s 1 ease-in-out;
cursor: ew-resize;
height: @unit-4;
left: 0;
max-width: 100%;
min-width: @unit-4;
opacity: 0;
outline: none;
position: relative;
resize: horizontal;
top: 50%;
transform: translateY(-50%) scaleY(30);
width: 0;
}
.comparison-label {
background: fade(@dark-color, 50%);
bottom: @unit-4;
color: @light-color;
padding: @unit-1 @unit-2;
position: absolute;
user-select: none;
}
}
@keyframes first-run {
0% {
width: 0;
}
25% {
width: @unit-12;
}
50% {
width: @unit-4;
}
75% {
width: @unit-6;
}
100% {
width: 0;
}
}

View File

@ -1,36 +0,0 @@
// Dropdown
.dropdown {
display: inline-block;
position: relative;
.menu {
animation: slide-down .15s ease 1;
display: none;
left: 0;
max-height: 50vh;
overflow-y: auto;
position: absolute;
top: 100%;
}
&.dropdown-right {
.menu {
left: auto;
right: 0;
}
}
&.active .menu,
.dropdown-toggle:focus + .menu,
.menu:hover {
display: block;
}
// Fix dropdown-toggle border radius in button groups
.btn-group {
.dropdown-toggle:nth-last-child(2) {
border-bottom-right-radius: @border-radius;
border-top-right-radius: @border-radius;
}
}
}

View File

@ -1,21 +0,0 @@
// Empty states (or Blank slates)
.empty {
background: @bg-color;
border-radius: @border-radius;
color: @gray-color-dark;
text-align: center;
padding: 4 * @layout-spacing;
.empty-icon {
margin-bottom: @layout-spacing-lg;
}
.empty-title,
.empty-subtitle {
margin: @layout-spacing auto;
}
.empty-action {
margin-top: @layout-spacing-lg;
}
}

View File

@ -1,29 +0,0 @@
// Filters
.filter {
.filter-nav {
margin: @layout-spacing 0;
}
.filter-body {
display: flex;
flex-wrap: wrap;
}
.filter-tag {
&#tag-all:checked ~ .filter-nav .chip[for="tag-all"],
&#tag-action:checked ~ .filter-nav .chip[for="tag-action"],
&#tag-roleplaying:checked ~ .filter-nav .chip[for="tag-roleplaying"],
&#tag-shooter:checked ~ .filter-nav .chip[for="tag-shooter"],
&#tag-sports:checked ~ .filter-nav .chip[for="tag-sports"] {
background: @primary-color;
color: @light-color;
}
&#tag-action:checked ~ .filter-body .column:not([data-tag~="tag-action"]),
&#tag-roleplaying:checked ~ .filter-body .column:not([data-tag~="tag-roleplaying"]),
&#tag-shooter:checked ~ .filter-body .column:not([data-tag~="tag-shooter"]),
&#tag-sports:checked ~ .filter-body .column:not([data-tag~="tag-sports"]) {
display: none;
}
}
}

View File

@ -1,514 +0,0 @@
// Forms
.form-group {
&:not(:last-child) {
margin-bottom: @layout-spacing;
}
}
fieldset {
margin-bottom: @layout-spacing-lg;
}
legend {
font-size: @font-size-lg;
font-weight: 500;
margin-bottom: @layout-spacing-lg;
}
// Form element: Label
.form-label {
display: block;
padding: @control-padding-v + @border-width 0;
&.label-sm {
padding: @control-padding-v-sm + @border-width 0;
}
&.label-lg {
padding: @control-padding-v-lg + @border-width 0;
}
}
// Form element: Input
.form-input {
appearance: none;
background: @bg-color-light;
background-image: none;
border: @border-width solid @border-color-dark;
border-radius: @border-radius;
color: @body-font-color;
.control-transition();
display: block;
font-size: @font-size;
height: @control-size;
line-height: @line-height;
max-width: 100%;
outline: none;
padding: @control-padding-v @control-padding-h;
position: relative;
width: 100%;
&:focus {
border-color: @primary-color;
.control-shadow();
}
&::placeholder {
color: @gray-color;
}
// Input sizes
&.input-sm {
font-size: @font-size-sm;
height: @control-size-sm;
padding: @control-padding-v-sm @control-padding-h;
}
&.input-lg {
font-size: @font-size-lg;
height: @control-size-lg;
padding: @control-padding-v-lg @control-padding-h;
}
&.input-inline {
display: inline-block;
vertical-align: middle;
width: auto;
}
// Textarea
textarea& {
height: auto;
}
// Input types
&[type="file"] {
height: auto;
}
}
// Form element: Input hint
.form-input-hint {
color: @gray-color;
font-size: @font-size-sm;
margin-top: @unit-1;
.has-success &,
.is-success + & {
color: @success-color;
}
.has-error &,
.is-error + & {
color: @error-color;
}
}
// Form element: Select
.form-select {
appearance: none;
border: @border-width solid @border-color-dark;
border-radius: @border-radius;
color: inherit;
font-size: @font-size;
height: @control-size;
line-height: @line-height;
outline: none;
padding: @control-padding-v @control-padding-h;
vertical-align: middle;
width: 100%;
&[size],
&[multiple] {
height: auto;
option {
padding: @unit-h @unit-1;
}
}
&:not([multiple]):not([size]) {
background: @bg-color-light url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23667189' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right (@control-icon-size / 2) center / .4rem .5rem;
padding-right: @control-icon-size + @control-padding-h;
}
&:focus {
border-color: @primary-color;
.control-shadow();
}
&::-ms-expand {
display: none;
}
// Select sizes
&.select-sm {
font-size: @font-size-sm;
height: @control-size-sm;
padding: @control-padding-v-sm (@control-icon-size + @control-padding-h) @control-padding-v-sm @control-padding-h;
}
&.select-lg {
font-size: @font-size-lg;
height: @control-size-lg;
padding: @control-padding-v-lg (@control-icon-size + @control-padding-h) @control-padding-v-lg @control-padding-h;
}
}
// Form Icons
.has-icon-left,
.has-icon-right {
position: relative;
.form-icon {
height: @control-icon-size;
margin: 0 @control-padding-v;
position: absolute;
top: 50%;
transform: translateY(-50%);
width: @control-icon-size;
}
}
.has-icon-left {
.form-icon {
left: @border-width;
}
.form-input {
padding-left: @control-icon-size + @control-padding-v * 2;
}
}
.has-icon-right {
.form-icon {
right: @border-width;
}
.form-input {
padding-right: @control-icon-size + @control-padding-v * 2;
}
}
// Form element: Checkbox and Radio
.form-checkbox,
.form-radio,
.form-switch {
display: inline-block;
line-height: @line-height;
padding: (@control-size-sm - @line-height) / 2 (@control-icon-size + @control-padding-h);
position: relative;
input {
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
overflow: hidden;
position: absolute;
width: 1px;
&:focus + .form-icon {
border-color: @primary-color;
.control-shadow();
}
&:checked + .form-icon {
background: @primary-color;
border-color: @primary-color;
}
}
.form-icon {
border: @border-width solid @border-color-dark;
.control-transition();
cursor: pointer;
display: inline-block;
position: absolute;
}
}
.form-checkbox,
.form-radio {
.form-icon {
background: @bg-color-light;
height: @control-icon-size;
left: 0;
top: (@control-size-sm - @control-icon-size) / 2;
width: @control-icon-size;
}
input {
&:active + .form-icon {
background: @bg-color-dark;
}
}
}
.form-checkbox {
.form-icon {
border-radius: @border-radius;
}
input {
&:checked + .form-icon {
&::before {
background-clip: padding-box;
border: @border-width-lg solid @light-color;
border-left-width: 0;
border-top-width: 0;
content: "";
height: 10px;
left: 50%;
margin-left: -3px;
margin-top: -6px;
position: absolute;
top: 50%;
transform: rotate(45deg);
width: 6px;
}
}
&:indeterminate + .form-icon {
background: @primary-color;
border-color: @primary-color;
&::before {
background: @bg-color-light;
content: "";
height: 2px;
left: 50%;
margin-left: -5px;
margin-top: -1px;
position: absolute;
top: 50%;
width: 10px;
}
}
}
}
.form-radio {
.form-icon {
border-radius: @control-icon-size / 2;
}
input {
&:checked + .form-icon {
&::before {
background: @bg-color-light;
border-radius: @border-radius;
content: "";
height: 4px;
left: 50%;
margin-left: -2px;
margin-top: -2px;
position: absolute;
top: 50%;
width: 4px;
}
}
}
}
// Form element: Switch
.form-switch {
padding-left: (@unit-8 + @control-padding-h);
.form-icon {
background: @gray-color-light;
background-clip: padding-box;
border-radius: @unit-2 + @border-width;
height: @unit-4 + @border-width * 2;
left: 0;
top: (@control-size-sm - @unit-4) / 2 - @border-width;
width: @unit-8;
&::before {
background: @bg-color-light;
border-radius: @unit-2;
content: "";
display: block;
height: @unit-4;
left: 0;
position: absolute;
top: 0;
.control-transition();
width: @unit-4;
}
}
input {
&:checked + .form-icon {
&::before {
left: 14px;
}
}
&:active + .form-icon {
&::before {
background: @bg-color;
}
}
}
}
// Form element: Input groups
.input-group {
display: flex;
.input-group-addon {
background: @bg-color;
border: @border-width solid @border-color-dark;
border-radius: @border-radius;
line-height: @line-height;
padding: @control-padding-v @control-padding-h;
&.addon-sm {
font-size: @font-size-sm;
padding: @control-padding-v-sm @control-padding-h;
}
&.addon-lg {
font-size: @font-size-lg;
padding: @control-padding-v-lg @control-padding-h;
}
}
.form-input,
.form-select {
flex: 1 1 auto;
}
.input-group-btn {
z-index: @zindex-0;
}
.form-input,
.form-select,
.input-group-addon,
.input-group-btn {
&:first-child:not(:last-child) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
&:not(:first-child):not(:last-child) {
border-radius: 0;
margin-left: -@border-width;
}
&:last-child:not(:first-child) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
margin-left: -@border-width;
}
&:focus {
z-index: @zindex-0 + 1;
}
}
.form-select {
width: auto;
}
&.input-inline {
display: inline-flex;
}
}
// Form validation states
.form-input,
.form-select {
.has-success &,
&.is-success {
border-color: @success-color;
&:focus {
.control-shadow(@success-color);
}
}
.has-error &,
&.is-error {
border-color: @error-color;
&:focus {
.control-shadow(@error-color);
}
}
}
.form-checkbox,
.form-radio,
.form-switch {
.has-error &,
&.is-error {
.form-icon {
border-color: @error-color;
}
input {
&:checked + .form-icon {
background: @error-color;
border-color: @error-color;
}
&:focus + .form-icon {
border-color: @error-color;
.control-shadow(@error-color);
}
}
}
}
// validation based on :placeholder-shown (Edge doesn't support it yet)
.form-input {
&:not(:placeholder-shown) {
&:invalid {
border-color: @error-color;
&:focus {
.control-shadow(@error-color);
}
& + .form-input-hint {
color: @error-color;
}
}
}
}
// Form disabled and readonly
.form-input,
.form-select {
&:disabled,
&.disabled {
background-color: @bg-color-dark;
cursor: not-allowed;
opacity: .5;
}
}
.form-input {
&[readonly] {
background-color: @bg-color;
}
}
input {
&:disabled,
&.disabled {
& + .form-icon {
background: @bg-color-dark;
cursor: not-allowed;
opacity: .5;
}
}
}
.form-switch {
input {
&:disabled,
&.disabled {
& + .form-icon::before {
background: @bg-color-light;
}
}
}
}
// Form Horizontal
.form-horizontal {
padding: @layout-spacing;
.form-group {
display: flex;
}
.form-checkbox,
.form-radio,
.form-switch {
margin: (@control-size - @control-size-sm) / 2 0;
}
}

View File

@ -1,656 +0,0 @@
// CSS Icons
@icon-border-width: @border-width-lg;
.icon {
box-sizing: border-box;
display: inline-block;
font-size: inherit;
font-style: normal;
height: 1em;
position: relative;
text-indent: -9999px;
vertical-align: middle;
width: 1em;
&::before,
&::after {
display: block;
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}
}
// Icon arrows
.icon-arrow-down,
.icon-arrow-left,
.icon-arrow-right,
.icon-arrow-up,
.icon-downward,
.icon-back,
.icon-forward,
.icon-upward {
&::before {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-right: 0;
content: "";
height: .65em;
width: .65em;
}
}
.icon-arrow-down {
&::before {
transform: translate(-50%, -75%) rotate(225deg);
}
}
.icon-arrow-left {
&::before {
transform: translate(-25%, -50%) rotate(-45deg);
}
}
.icon-arrow-right {
&::before {
transform: translate(-75%, -50%) rotate(135deg);
}
}
.icon-arrow-up {
&::before {
transform: translate(-50%, -25%) rotate(45deg);
}
}
.icon-back,
.icon-forward {
&::after {
background: currentColor;
content: "";
height: @icon-border-width;
width: .8em;
}
}
.icon-downward,
.icon-upward {
&::after {
background: currentColor;
content: "";
height: .8em;
width: @icon-border-width;
}
}
.icon-back {
&::after {
left: 55%;
}
&::before {
transform: translate(-50%, -50%) rotate(-45deg);
}
}
.icon-downward {
&::after {
top: 45%;
}
&::before {
transform: translate(-50%, -50%) rotate(-135deg);
}
}
.icon-forward {
&::after {
left: 45%;
}
&::before {
transform: translate(-50%, -50%) rotate(135deg);
}
}
.icon-upward {
&::after {
top: 55%;
}
&::before {
transform: translate(-50%, -50%) rotate(45deg);
}
}
// Icon caret
.icon-caret {
&::before {
border-top: .3em solid currentColor;
border-right: .3em solid transparent;
border-left: .3em solid transparent;
content: "";
height: 0;
width: 0;
transform: translate(-50%, -25%);
}
}
// Icon menu
.icon-menu {
&::before {
background: currentColor;
box-shadow: 0 -.35em, 0 .35em;
content: "";
height: @icon-border-width;
width: 100%;
}
}
// Icon apps
.icon-apps {
&::before {
background: currentColor;
box-shadow: -.35em -.35em, -.35em 0, -.35em .35em, 0 -.35em, 0 .35em, .35em -.35em, .35em 0, .35em .35em;
content: "";
height: 3px;
width: 3px;
}
}
// Icon resize
.icon-resize-horiz,
.icon-resize-vert {
&::before,
&::after {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-right: 0;
content: "";
height: .45em;
width: .45em;
}
&::before {
transform: translate(-50%, -90%) rotate(45deg);
}
&::after {
transform: translate(-50%, -10%) rotate(225deg);
}
}
.icon-resize-horiz {
&::before {
transform: translate(-90%, -50%) rotate(-45deg);
}
&::after {
transform: translate(-10%, -50%) rotate(135deg);
}
}
// Icon more
.icon-more-horiz,
.icon-more-vert {
&::before {
background: currentColor;
box-shadow: -.4em 0, .4em 0;
border-radius: 50%;
content: "";
height: 3px;
width: 3px;
}
}
.icon-more-vert {
&::before {
box-shadow: 0 -.4em, 0 .4em;
}
}
// Icon plus, minus, cross
.icon-plus,
.icon-minus,
.icon-cross {
&::before {
background: currentColor;
content: "";
height: @icon-border-width;
width: 100%;
}
}
.icon-plus,
.icon-cross {
&::after {
background: currentColor;
content: "";
height: 100%;
width: @icon-border-width;
}
}
.icon-cross {
&::before {
width: 100%;
}
&::after {
height: 100%;
}
&::before,
&::after {
transform: translate(-50%, -50%) rotate(45deg);
}
}
// Icon check
.icon-check {
&::before {
border: @icon-border-width solid currentColor;
border-right: 0;
border-top: 0;
content: "";
height: .5em;
width: .9em;
transform: translate(-50%, -75%) rotate(-45deg);
}
}
// Icon stop
.icon-stop {
border: @icon-border-width solid currentColor;
border-radius: 50%;
&::before {
background: currentColor;
content: "";
height: @icon-border-width;
transform: translate(-50%, -50%) rotate(45deg);
width: 1em;
}
}
// Icon shutdown
.icon-shutdown {
border: @icon-border-width solid currentColor;
border-radius: 50%;
border-top-color: transparent;
&::before {
background: currentColor;
content: "";
height: .5em;
top: .1em;
width: @icon-border-width;
}
}
// Icon refresh
.icon-refresh {
&::before {
border: @icon-border-width solid currentColor;
border-radius: 50%;
border-right-color: transparent;
content: "";
height: 1em;
width: 1em;
}
&::after {
border: .2em solid currentColor;
border-top-color: transparent;
border-left-color: transparent;
content: "";
height: 0;
left: 80%;
top: 20%;
width: 0;
}
}
// Icon search
.icon-search {
&::before {
border: @icon-border-width solid currentColor;
border-radius: 50%;
content: "";
height: .75em;
left: 5%;
top: 5%;
transform: translate(0, 0) rotate(45deg);
width: .75em;
}
&::after {
background: currentColor;
content: "";
height: @icon-border-width;
left: 80%;
top: 80%;
transform: translate(-50%, -50%) rotate(45deg);
width: .4em;
}
}
// Icon edit
.icon-edit {
&::before {
border: @icon-border-width solid currentColor;
content: "";
height: .4em;
transform: translate(-40%, -60%) rotate(-45deg);
width: .85em;
}
&::after {
border: .15em solid currentColor;
border-top-color: transparent;
border-right-color: transparent;
content: "";
height: 0;
left: 5%;
top: 95%;
transform: translate(0, -100%);
width: 0;
}
}
// Icon delete
.icon-delete {
&::before {
border: @icon-border-width solid currentColor;
border-bottom-left-radius: @border-radius;
border-bottom-right-radius: @border-radius;
border-top: 0;
content: "";
height: .75em;
top: 60%;
width: .75em;
}
&::after {
background: currentColor;
box-shadow: -.25em .2em, .25em .2em;
content: "";
height: @icon-border-width;
top: @icon-border-width/2;
width: .5em;
}
}
// Icon share
.icon-share {
border: @icon-border-width solid currentColor;
border-radius: @border-radius;
border-right: 0;
border-top: 0;
&::before {
border: @icon-border-width solid currentColor;
border-left: 0;
border-top: 0;
content: "";
height: .4em;
left: 100%;
top: .25em;
transform: translate(-125%, -50%) rotate(-45deg);
width: .4em;
}
&::after {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-right: 0;
border-radius: 75% 0;
content: "";
height: .5em;
width: .6em;
}
}
// Icon flag
.icon-flag {
&::before {
background: currentColor;
content: "";
height: 1em;
left: 15%;
width: @icon-border-width;
}
&::after {
border: @icon-border-width solid currentColor;
border-bottom-right-radius: @border-radius;
border-left: 0;
border-top-right-radius: @border-radius;
content: "";
height: .65em;
top: 35%;
left: 60%;
width: .8em;
}
}
// Icon bookmark
.icon-bookmark {
&::before {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-top-left-radius: @border-radius;
border-top-right-radius: @border-radius;
content: "";
height: .9em;
width: .8em;
}
&::after {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-left: 0;
border-radius: @border-radius;
content: "";
height: .5em;
transform: translate(-50%, 35%) rotate(-45deg) skew(15deg, 15deg);
width: .5em;
}
}
// Icon download & upload
.icon-download,
.icon-upload {
border-bottom: @icon-border-width solid currentColor;
&::before {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-right: 0;
content: "";
height: .5em;
width: .5em;
transform: translate(-50%, -60%) rotate(-135deg);
}
&::after {
background: currentColor;
content: "";
height: .6em;
top: 40%;
width: @icon-border-width;
}
}
.icon-upload {
&::before {
transform: translate(-50%, -60%) rotate(45deg);
}
&::after {
top: 50%;
}
}
// Icon time
.icon-time {
border: @icon-border-width solid currentColor;
border-radius: 50%;
&::before {
background: currentColor;
content: "";
height: .4em;
transform: translate(-50%, -75%);
width: @icon-border-width;
}
&::after {
background: currentColor;
content: "";
height: .3em;
transform: translate(-50%, -75%) rotate(90deg);
transform-origin: 50% 90%;
width: @icon-border-width;
}
}
// Icon mail
.icon-mail {
&::before {
border: @icon-border-width solid currentColor;
border-radius: @border-radius;
content: "";
height: .8em;
width: 1em;
}
&::after {
border: @icon-border-width solid currentColor;
border-right: 0;
border-top: 0;
content: "";
height: .5em;
transform: translate(-50%, -90%) rotate(-45deg) skew(10deg, 10deg);
width: .5em;
}
}
// Icon people
.icon-people {
&::before {
border: @icon-border-width solid currentColor;
border-radius: 50%;
content: "";
height: .45em;
top: 25%;
width: .45em;
}
&::after {
border: @icon-border-width solid currentColor;
border-radius: 50% 50% 0 0;
content: "";
height: .4em;
top: 75%;
width: .9em;
}
}
// Icon message
.icon-message {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-radius: @border-radius;
border-right: 0;
&::before {
border: @icon-border-width solid currentColor;
border-left: 0;
border-bottom-right-radius: @border-radius;
border-top: 0;
content: "";
height: .8em;
left: 65%;
top: 40%;
width: .7em;
}
&::after {
background: currentColor;
border-radius: @border-radius;
content: "";
height: .3em;
left: 10%;
top: 100%;
transform: translate(0, -90%) rotate(45deg);
width: @icon-border-width;
}
}
// Icon photo
.icon-photo {
border: @icon-border-width solid currentColor;
border-radius: @border-radius;
&::before {
border: @icon-border-width solid currentColor;
border-radius: 50%;
content: "";
height: .25em;
left: 35%;
top: 35%;
width: .25em;
}
&::after {
border: @icon-border-width solid currentColor;
border-bottom: 0;
border-left: 0;
content: "";
height: .5em;
left: 60%;
transform: translate(-50%, 25%) rotate(-45deg);
width: .5em;
}
}
// Icon link
.icon-link {
&::before,
&::after {
border: @icon-border-width solid currentColor;
border-radius: 5em 0 0 5em;
border-right: 0;
content: "";
height: .5em;
width: .75em;
}
&::before {
transform: translate(-70%, -45%) rotate(-45deg);
}
&::after {
transform: translate(-30%, -55%) rotate(135deg);
}
}
// Icon location
.icon-location {
&::before {
border: @icon-border-width solid currentColor;
border-radius: 50% 50% 50% 0;
content: "";
height: .8em;
transform: translate(-50%, -60%) rotate(-45deg);
width: .8em;
}
&::after {
border: @icon-border-width solid currentColor;
border-radius: 50%;
content: "";
height: .2em;
transform: translate(-50%, -80%);
width: .2em;
}
}
// Icon emoji
.icon-emoji {
border: @icon-border-width solid currentColor;
border-radius: 50%;
&::before {
border-radius: 50%;
box-shadow: -.17em -.15em, .17em -.15em;
content: "";
height: .1em;
width: .1em;
}
&::after {
border: @icon-border-width solid currentColor;
border-bottom-color: transparent;
border-radius: 50%;
border-right-color: transparent;
content: "";
height: .5em;
transform: translate(-50%, -40%) rotate(-135deg);
width: .5em;
}
}
// Component icon support
.accordion,
.btn,
.toast,
.menu {
.icon {
vertical-align: -10%;
}
}

View File

@ -1,33 +0,0 @@
// Labels
.label {
display: inline-block;
.label-base();
.label-variant(lighten(@body-font-color, 5%), @bg-color);
line-height: 1;
&.label-rounded {
border-radius: 5rem;
padding-left: .4rem;
padding-right: .4rem;
}
&.label-primary {
.label-variant(@light-color, @primary-color);
}
&.label-secondary {
.label-variant(@primary-color, @secondary-color);
}
&.label-success {
.label-variant(@light-color, @success-color);
}
&.label-warning {
.label-variant(@light-color, @warning-color);
}
&.label-error {
.label-variant(@light-color, @error-color);
}
}

View File

@ -1,422 +0,0 @@
// Layout
.container {
margin-left: auto;
margin-right: auto;
padding-left: @layout-spacing;
padding-right: @layout-spacing;
width: 100%;
&:extend(.clearfix all);
&.grid-xl {
max-width: @size-xl + 2 * @layout-spacing * @html-font-size;
}
&.grid-lg {
max-width: @size-lg + 2 * @layout-spacing * @html-font-size;
}
&.grid-md {
max-width: @size-md + 2 * @layout-spacing * @html-font-size;
}
&.grid-sm {
max-width: @size-sm + 2 * @layout-spacing * @html-font-size;
}
&.grid-xs {
max-width: @size-xs + 2 * @layout-spacing * @html-font-size;
}
}
// Responsive breakpoint system
.show-xs,
.show-sm,
.show-md,
.show-lg,
.show-xl {
display: none !important;
}
// Responsive grid system
.columns {
display: flex;
flex-wrap: wrap;
margin-left: -@layout-spacing;
margin-right: -@layout-spacing;
&.col-gapless {
margin-left: 0;
margin-right: 0;
& > .column {
padding-left: 0;
padding-right: 0;
}
}
&.col-oneline {
flex-wrap: nowrap;
overflow-x: auto;
}
}
.column {
flex: 1;
max-width: 100%;
padding-left: @layout-spacing;
padding-right: @layout-spacing;
&.col-12,
&.col-11,
&.col-10,
&.col-9,
&.col-8,
&.col-7,
&.col-6,
&.col-5,
&.col-4,
&.col-3,
&.col-2,
&.col-1 {
flex: none;
}
}
.col-12 {
width: 100%;
}
.col-11 {
width: 91.66666667%;
}
.col-10 {
width: 83.33333333%;
}
.col-9 {
width: 75%;
}
.col-8 {
width: 66.66666667%;
}
.col-7 {
width: 58.33333333%;
}
.col-6 {
width: 50%;
}
.col-5 {
width: 41.66666667%;
}
.col-4 {
width: 33.33333333%;
}
.col-3 {
width: 25%;
}
.col-2 {
width: 16.66666667%;
}
.col-1 {
width: 8.33333333%;
}
.col-auto {
flex: 0 0 auto;
max-width: none;
width: auto;
}
.col-mx-auto {
margin-left: auto;
margin-right: auto;
}
.col-ml-auto {
margin-left: auto;
}
.col-mr-auto {
margin-right: auto;
}
@media screen and (max-width: @size-xl ) {
.col-xl-12,
.col-xl-11,
.col-xl-10,
.col-xl-9,
.col-xl-8,
.col-xl-7,
.col-xl-6,
.col-xl-5,
.col-xl-4,
.col-xl-3,
.col-xl-2,
.col-xl-1 {
flex: none;
}
.col-xl-12 {
width: 100%;
}
.col-xl-11 {
width: 91.66666667%;
}
.col-xl-10 {
width: 83.33333333%;
}
.col-xl-9 {
width: 75%;
}
.col-xl-8 {
width: 66.66666667%;
}
.col-xl-7 {
width: 58.33333333%;
}
.col-xl-6 {
width: 50%;
}
.col-xl-5 {
width: 41.66666667%;
}
.col-xl-4 {
width: 33.33333333%;
}
.col-xl-3 {
width: 25%;
}
.col-xl-2 {
width: 16.66666667%;
}
.col-xl-1 {
width: 8.33333333%;
}
.hide-xl {
display: none !important;
}
.show-xl {
display: block !important;
}
}
@media screen and (max-width: @size-lg ) {
.col-lg-12,
.col-lg-11,
.col-lg-10,
.col-lg-9,
.col-lg-8,
.col-lg-7,
.col-lg-6,
.col-lg-5,
.col-lg-4,
.col-lg-3,
.col-lg-2,
.col-lg-1 {
flex: none;
}
.col-lg-12 {
width: 100%;
}
.col-lg-11 {
width: 91.66666667%;
}
.col-lg-10 {
width: 83.33333333%;
}
.col-lg-9 {
width: 75%;
}
.col-lg-8 {
width: 66.66666667%;
}
.col-lg-7 {
width: 58.33333333%;
}
.col-lg-6 {
width: 50%;
}
.col-lg-5 {
width: 41.66666667%;
}
.col-lg-4 {
width: 33.33333333%;
}
.col-lg-3 {
width: 25%;
}
.col-lg-2 {
width: 16.66666667%;
}
.col-lg-1 {
width: 8.33333333%;
}
.hide-lg {
display: none !important;
}
.show-lg {
display: block !important;
}
}
@media screen and (max-width: @size-md ) {
.col-md-12,
.col-md-11,
.col-md-10,
.col-md-9,
.col-md-8,
.col-md-7,
.col-md-6,
.col-md-5,
.col-md-4,
.col-md-3,
.col-md-2,
.col-md-1 {
flex: none;
}
.col-md-12 {
width: 100%;
}
.col-md-11 {
width: 91.66666667%;
}
.col-md-10 {
width: 83.33333333%;
}
.col-md-9 {
width: 75%;
}
.col-md-8 {
width: 66.66666667%;
}
.col-md-7 {
width: 58.33333333%;
}
.col-md-6 {
width: 50%;
}
.col-md-5 {
width: 41.66666667%;
}
.col-md-4 {
width: 33.33333333%;
}
.col-md-3 {
width: 25%;
}
.col-md-2 {
width: 16.66666667%;
}
.col-md-1 {
width: 8.33333333%;
}
.hide-md {
display: none !important;
}
.show-md {
display: block !important;
}
}
@media screen and (max-width: @size-sm ) {
.col-sm-12,
.col-sm-11,
.col-sm-10,
.col-sm-9,
.col-sm-8,
.col-sm-7,
.col-sm-6,
.col-sm-5,
.col-sm-4,
.col-sm-3,
.col-sm-2,
.col-sm-1 {
flex: none;
}
.col-sm-12 {
width: 100%;
}
.col-sm-11 {
width: 91.66666667%;
}
.col-sm-10 {
width: 83.33333333%;
}
.col-sm-9 {
width: 75%;
}
.col-sm-8 {
width: 66.66666667%;
}
.col-sm-7 {
width: 58.33333333%;
}
.col-sm-6 {
width: 50%;
}
.col-sm-5 {
width: 41.66666667%;
}
.col-sm-4 {
width: 33.33333333%;
}
.col-sm-3 {
width: 25%;
}
.col-sm-2 {
width: 16.66666667%;
}
.col-sm-1 {
width: 8.33333333%;
}
.hide-sm {
display: none !important;
}
.show-sm {
display: block !important;
}
}
@media screen and (max-width: @size-xs) {
.col-xs-12,
.col-xs-11,
.col-xs-10,
.col-xs-9,
.col-xs-8,
.col-xs-7,
.col-xs-6,
.col-xs-5,
.col-xs-4,
.col-xs-3,
.col-xs-2,
.col-xs-1 {
flex: none;
}
.col-xs-12 {
width: 100%;
}
.col-xs-11 {
width: 91.66666667%;
}
.col-xs-10 {
width: 83.33333333%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-8 {
width: 66.66666667%;
}
.col-xs-7 {
width: 58.33333333%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-5 {
width: 41.66666667%;
}
.col-xs-4 {
width: 33.33333333%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-2 {
width: 16.66666667%;
}
.col-xs-1 {
width: 8.33333333%;
}
.hide-xs {
display: none !important;
}
.show-xs {
display: block !important;
}
}

View File

@ -1,70 +0,0 @@
// Media
.img-responsive {
display: block;
height: auto;
max-width: 100%;
}
// object-fit support is coming to Microsoft Edge
// https://developer.microsoft.com/en-us/microsoft-edge/platform/status/objectfitandobjectposition/
.img-fit-cover {
object-fit: cover;
}
.img-fit-contain {
object-fit: contain;
}
// Video responsive
.video-responsive {
display: block;
overflow: hidden;
padding: 0;
position: relative;
width: 100%;
&::before {
content: "";
display: block;
padding-bottom: 56.25%; // Default ratio 16:9, you can calculate this value by dividing 9 by 16
}
iframe,
object,
embed {
border: 0;
bottom: 0;
height: 100%;
left: 0;
position: absolute;
right: 0;
top: 0;
width: 100%;
}
video {
height: auto;
max-width: 100%;
width: 100%;
}
}
.video-responsive-4-3 {
&::before {
padding-bottom: 75%; // Ratio 4:3
}
}
.video-responsive-1-1 {
&::before {
padding-bottom: 100%; // Ratio 1:1
}
}
.figure {
margin: 0 0 @layout-spacing 0;
.figure-caption {
color: @gray-color-dark;
margin-top: @layout-spacing;
}
}

View File

@ -1,56 +0,0 @@
// Menus
.menu {
background: @bg-color-light;
border-radius: @border-radius;
list-style: none;
margin: 0;
min-width: @control-min-width;
padding: @unit-2;
.shadow-variant(.05rem);
transform: translateY(@layout-spacing-sm);
z-index: @zindex-1;
&.menu-nav {
background: transparent;
box-shadow: none;
}
.menu-item {
margin-top: 0;
padding: 0 @unit-2;
text-decoration: none;
user-select: none;
& > a {
border-radius: @border-radius;
color: inherit;
display: block;
margin: 0 -@unit-2;
padding: @unit-1 @unit-2;
text-decoration: none;
&:focus,
&:hover {
background: @secondary-color;
color: @primary-color;
}
&:active,
&.active {
background: @secondary-color;
color: @primary-color;
}
}
& + .menu-item {
margin-top: @unit-1;
}
}
.menu-badge {
float: right;
padding: @unit-1 0;
.btn {
margin-top: -@unit-h;
}
}
}

View File

@ -1,57 +0,0 @@
// Meters
// Credit: https://css-tricks.com/html5-meter-element/
.meter {
appearance: none;
background: @bg-color;
border: 0;
border-radius: @border-radius;
display: block;
width: 100%;
height: @unit-4;
&::-webkit-meter-inner-element {
display: block;
}
&::-webkit-meter-bar,
&::-webkit-meter-optimum-value,
&::-webkit-meter-suboptimum-value,
&::-webkit-meter-even-less-good-value {
border-radius: @border-radius;
}
&::-webkit-meter-bar {
background: @bg-color;
}
&::-webkit-meter-optimum-value {
background: @success-color;
}
&::-webkit-meter-suboptimum-value {
background: @warning-color;
}
&::-webkit-meter-even-less-good-value {
background: @error-color;
}
&::-moz-meter-bar,
&:-moz-meter-optimum,
&:-moz-meter-sub-optimum,
&:-moz-meter-sub-sub-optimum {
border-radius: @border-radius;
}
&:-moz-meter-optimum::-moz-meter-bar {
background: @success-color;
}
&:-moz-meter-sub-optimum::-moz-meter-bar {
background: @warning-color;
}
&:-moz-meter-sub-sub-optimum::-moz-meter-bar {
background: @error-color;
}
}

View File

@ -1,175 +0,0 @@
// Mixins
// Avatar mixin
.avatar-base(@size: @unit-8) {
font-size: @size / 2;
height: @size;
width: @size;
}
// Background color utility mixin
.bg-color-variant(@color: @primary-color) {
background: @color;
}
// Button variant mixin
.button-variant(@color: @primary-color) {
background: @color;
border-color: darken(@color, 3%);
color: @light-color;
&:focus {
.control-shadow(@color);
}
&:focus,
&:hover {
background: darken(@color, 2%);
border-color: darken(@color, 5%);
color: @light-color;
}
&:active,
&.active {
background: darken(@color, 7%);
border-color: darken(@color, 10%);
color: @light-color;
}
&.loading {
&::after {
border-bottom-color: @light-color;
border-left-color: @light-color;
}
}
}
.button-outline-variant(@color: @primary-color) {
background: @light-color;
border-color: @color;
color: @color;
&:focus {
.control-shadow(@color);
}
&:focus,
&:hover {
background: lighten(@color, 50%);
border-color: darken(@color, 2%);
color: @color;
}
&:active,
&.active {
background: @color;
border-color: darken(@color, 5%);
color: @light-color;
}
&.loading {
&::after {
border-bottom-color: @color;
border-left-color: @color;
}
}
}
// Clearfix mixin
.clearfix() {
&::after {
clear: both;
content: "";
display: table;
}
}
// Component focus shadow
.control-shadow(@color: @primary-color) {
box-shadow: 0 0 0 .1rem fade(@color, 20%);
}
// Component transition
.control-transition() {
transition: all .2s ease;
}
// Label base style
.label-base() {
border-radius: @border-radius;
line-height: 1;
padding: .15rem .2rem;
}
.label-variant(@color: @light-color, @bg-color: @primary-color) {
background: @bg-color;
color: @color;
}
// Margin utility mixin
.margin-variant(@id: 1, @size: 1) {
.m-@{id} {
margin: @size;
}
.mb-@{id} {
margin-bottom: @size;
}
.ml-@{id} {
margin-left: @size;
}
.mr-@{id} {
margin-right: @size;
}
.mt-@{id} {
margin-top: @size;
}
.mx-@{id} {
margin-left: @size;
margin-right: @size;
}
.my-@{id} {
margin-bottom: @size;
margin-top: @size;
}
}
// Padding utility mixin
.padding-variant(@id: 1, @size: 1) {
.p-@{id} {
padding: @size;
}
.pb-@{id} {
padding-bottom: @size;
}
.pl-@{id} {
padding-left: @size;
}
.pr-@{id} {
padding-right: @size;
}
.pt-@{id} {
padding-top: @size;
}
.px-@{id} {
padding-left: @size;
padding-right: @size;
}
.py-@{id} {
padding-bottom: @size;
padding-top: @size;
}
}
// Shadow mixin
.shadow-variant(@offset) {
box-shadow: 0 @offset (@offset + .05rem) * 2 fade(@dark-color, 30%);
}
// Text color utility mixin
.text-color-variant(@color: @primary-color) {
color: @color;
a& {
&:focus,
&:hover {
color: darken(@color, 5%);
}
}
}
// Toast variant mixin
.toast-variant(@color: @dark-color) {
background: fade(@color, 90%);
border-color: @color;
}

View File

@ -1,73 +0,0 @@
// Modals
.modal {
align-items: center;
bottom: 0;
display: none;
justify-content: center;
left: 0;
opacity: 0;
overflow: hidden;
padding: @layout-spacing;
position: fixed;
right: 0;
top: 0;
&:target,
&.active {
display: flex;
opacity: 1;
z-index: @zindex-4;
.modal-overlay {
background: fade(@bg-color, 75%);
bottom: 0;
cursor: default;
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
}
.modal-container {
animation: slide-down .2s ease 1;
max-width: 640px;
z-index: @zindex-0;
}
}
&.modal-sm {
.modal-container {
max-width: @control-max-width;
}
}
}
.modal-container {
background: @bg-color-light;
border-radius: @border-radius;
display: block;
padding: 0;
.shadow-variant(.2rem);
text-align: left;
.modal-header {
padding: @layout-spacing-lg;
.modal-title {
margin: 0;
}
}
.modal-body {
max-height: 50vh;
overflow-y: auto;
padding: @layout-spacing-lg;
position: relative;
}
.modal-footer {
padding: @layout-spacing-lg;
text-align: right;
}
}

View File

@ -1,29 +0,0 @@
// Navbar
.navbar {
align-items: stretch;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.navbar-section {
align-items: center;
display: flex;
flex: 1 0 0;
&:last-child {
justify-content: flex-end;
}
}
.navbar-center {
align-items: center;
display: flex;
flex: 0 0 auto;
}
.navbar-brand {
font-size: @font-size-lg;
font-weight: 500;
text-decoration: none;
}
}

View File

@ -1,34 +0,0 @@
// Navs
.nav {
display: flex;
flex-direction: column;
list-style: none;
margin: @unit-1 0;
.nav-item {
a {
color: @gray-color-dark;
padding: @unit-1 @unit-2;
text-decoration: none;
&:focus,
&:hover {
color: @primary-color;
}
}
&.active {
& > a {
color: darken(@gray-color-dark, 10%);
font-weight: bold;
&:focus,
&:hover {
color: @primary-color;
}
}
}
}
& .nav {
margin-bottom: @unit-2;
margin-left: @unit-4;
}
}

View File

@ -1,437 +0,0 @@
/* Manually forked from Normalize.css */
/* normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Correct the line height in all browsers.
* 3. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
/* Document
========================================================================== */
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 3 */
-webkit-text-size-adjust: 100%; /* 3 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main { /* 1 */
display: block;
}
/**
* Add the correct margin in IE 8 (removed).
*/
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers. (removed)
* 2. Correct the odd `em` font sizing in all browsers.
*/
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. (removed)
*/
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: @mono-font-family; /* 1 (changed) */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-. (Removed)
*/
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
font-weight: 400; /* (added) */
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 (changed) */
font-size: inherit; /* 1 (changed) */
line-height: inherit; /* 1 (changed) */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule (removed).
*/
/**
* Change the border, margin, and padding in all browsers (opinionated) (changed).
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details, /* 1 */
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}

View File

@ -1,61 +0,0 @@
// Pagination
.pagination {
display: flex;
list-style: none;
margin: @unit-1 0;
padding: @unit-1 0;
.page-item {
margin: @unit-1 @unit-o;
span {
display: inline-block;
padding: @unit-1 @unit-1;
}
a {
border-radius: @border-radius;
color: @gray-color-dark;
display: inline-block;
padding: @unit-1 @unit-2;
text-decoration: none;
&:focus,
&:hover {
color: @primary-color;
}
}
&.disabled {
a {
cursor: default;
opacity: .5;
pointer-events: none;
}
}
&.active {
a {
background: @primary-color;
color: @light-color;
}
}
&.page-prev,
&.page-next {
flex: 1 0 50%;
}
&.page-next {
text-align: right;
}
.page-item-title {
margin: 0;
}
.page-item-subtitle {
margin: 0;
opacity: .5;
}
}
}

View File

@ -1,23 +0,0 @@
// Panels
.panel {
border: @border-width solid @border-color;
border-radius: @border-radius;
display: flex;
flex-direction: column;
.panel-header,
.panel-footer {
flex: 0 0 auto;
padding: @layout-spacing-lg;
}
.panel-nav {
flex: 0 0 auto;
}
.panel-body {
flex: 1 1 auto;
overflow-y: auto;
padding: 0 @layout-spacing-lg;
}
}

View File

@ -1,129 +0,0 @@
// Parallax
@parallax-deg: 3deg;
@parallax-offset: 6.5px;
@parallax-offset-z: 100px;
@parallax-perspective: 1000px;
@parallax-scale: 1 - unit(@parallax-offset-z / @parallax-perspective);
.parallax {
display: block;
height: auto;
position: relative;
width: auto;
.parallax-content {
height: auto;
.shadow-variant(1rem);
transform: perspective(@parallax-perspective);
transform-style: preserve-3d;
transition: all .4s ease;
width: 100%;
&::before {
content: "";
display: block;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
}
.parallax-front {
align-items: center;
color: @light-color;
display: flex;
height: 100%;
justify-content: center;
left: 0;
position: absolute;
text-align: center;
text-shadow: 0 0 20px fade(@dark-color, 50%);
top: 0;
transform: translateZ(@parallax-offset-z) scale(@parallax-scale);
transition: all .4s ease;
width: 100%;
z-index: @zindex-0;
}
.parallax-top-left {
.parallax-dir();
left: 0;
top: 0;
&:hover ~ .parallax-content {
transform: perspective(@parallax-perspective) rotateX(-@parallax-deg) rotateY(@parallax-deg);
&::before {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
}
.parallax-front {
transform: translate3d(-@parallax-offset, -@parallax-offset, @parallax-offset-z) scale(@parallax-scale);
}
}
}
.parallax-top-right {
.parallax-dir();
right: 0;
top: 0;
&:hover ~ .parallax-content {
transform: perspective(@parallax-perspective) rotateX(-@parallax-deg) rotateY(-@parallax-deg);
&::before {
background: linear-gradient(-135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
}
.parallax-front {
transform: translate3d(@parallax-offset, -@parallax-offset, @parallax-offset-z) scale(@parallax-scale);
}
}
}
.parallax-bottom-left {
.parallax-dir();
bottom: 0;
left: 0;
&:hover ~ .parallax-content {
transform: perspective(@parallax-perspective) rotateX(@parallax-deg) rotateY(@parallax-deg);
&::before {
background: linear-gradient(45deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
}
.parallax-front {
transform: translate3d(-@parallax-offset, @parallax-offset, @parallax-offset-z) scale(@parallax-scale);
}
}
}
.parallax-bottom-right {
.parallax-dir();
bottom: 0;
right: 0;
&:hover ~ .parallax-content {
transform: perspective(@parallax-perspective) rotateX(@parallax-deg) rotateY(-@parallax-deg);
&::before {
background: linear-gradient(-45deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 50%);
}
.parallax-front {
transform: translate3d(@parallax-offset, @parallax-offset, @parallax-offset-z) scale(@parallax-scale);
}
}
}
}
// Mixin: Parallax direction
.parallax-dir() {
height: 50%;
position: absolute;
width: 50%;
z-index: @zindex-3;
}

View File

@ -1,70 +0,0 @@
// Popovers
.popover {
display: inline-block;
position: relative;
.popover-container {
content: attr(data-tooltip);
opacity: 0;
left: 50%;
padding: @layout-spacing;
position: absolute;
top: 0;
transform: translate(-50%, -50%) scale(0);
transition: transform .2s ease;
width: @control-max-width;
z-index: @zindex-4;
}
:focus + .popover-container,
&:hover .popover-container,
.popover-container:hover {
display: block;
opacity: 1;
transform: translate(-50%, -100%) scale(1);
}
&.popover-right {
.popover-container {
left: 100%;
top: 50%;
}
:focus + .popover-container,
&:hover .popover-container,
.popover-container:hover {
transform: translate(0, -50%) scale(1);
}
}
&.popover-bottom {
.popover-container {
left: 50%;
top: 100%;
}
:focus + .popover-container,
&:hover .popover-container,
.popover-container:hover {
transform: translate(-50%, 0) scale(1);
}
}
&.popover-left {
.popover-container {
left: 0;
top: 50%;
}
:focus + .popover-container,
&:hover .popover-container,
.popover-container:hover {
transform: translate(-100%, -50%) scale(1);
}
}
.card {
border: 0;
.shadow-variant(.2rem);
}
}

View File

@ -1,45 +0,0 @@
// Progress
// Credit: https://css-tricks.com/html5-progress-element/
.progress {
appearance: none;
background: @bg-color-dark;
border: 0;
border-radius: @border-radius;
color: @primary-color;
height: @unit-1;
position: relative;
width: 100%;
&::-webkit-progress-bar {
background: transparent;
border-radius: @border-radius;
}
&::-webkit-progress-value {
background: @primary-color;
border-radius: @border-radius;
}
&::-moz-progress-bar {
background: @primary-color;
border-radius: @border-radius;
}
&:indeterminate {
animation: progress-indeterminate 1.5s linear infinite;
background: @bg-color-dark linear-gradient(to right, @primary-color 30%, @bg-color-dark 30%) top left / 150% 150% no-repeat;
&::-moz-progress-bar {
background: transparent;
}
}
}
@keyframes progress-indeterminate {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}

View File

@ -1,93 +0,0 @@
// Sliders
// Credit: https://css-tricks.com/styling-cross-browser-compatible-range-inputs-css/
.slider {
appearance: none;
background: transparent;
display: block;
width: 100%;
height: @unit-6;
&:focus {
.control-shadow();
outline: none;
}
// Slider Thumb
&::-webkit-slider-thumb {
-webkit-appearance: none;
background: @primary-color;
border: 0;
border-radius: 50%;
height: @unit-3;
margin-top: -(@unit-3 - @unit-h) / 2 ;
transition: transform .2s ease;
width: @unit-3;
}
&::-moz-range-thumb {
background: @primary-color;
border: 0;
border-radius: 50%;
height: @unit-3;
transition: transform .2s ease;
width: @unit-3;
}
&::-ms-thumb {
background: @primary-color;
border: 0;
border-radius: 50%;
height: @unit-3;
transition: transform .2s ease;
width: @unit-3;
}
&:active {
&::-webkit-slider-thumb {
transform: scale(1.25);
}
&::-moz-range-thumb {
transform: scale(1.25);
}
&::-ms-thumb {
transform: scale(1.25);
}
}
&:disabled,
&.disabled {
&::-webkit-slider-thumb {
background: @gray-color-light;
transform: scale(1);
}
&::-moz-range-thumb {
background: @gray-color-light;
transform: scale(1);
}
&::-ms-thumb {
background: @gray-color-light;
transform: scale(1);
}
}
// Slider Track
&::-webkit-slider-runnable-track {
background: @bg-color-dark;
border-radius: @border-radius;
height: @unit-h;
width: 100%;
}
&::-moz-range-track {
background: @bg-color-dark;
border-radius: @border-radius;
height: @unit-h;
width: 100%;
}
&::-ms-track {
background: @bg-color-dark;
border-radius: @border-radius;
height: @unit-h;
width: 100%;
}
&::-ms-fill-lower {
background: @primary-color;
}
}

View File

@ -1,70 +0,0 @@
// Steps
.step {
display: flex;
flex-wrap: nowrap;
list-style: none;
margin: @unit-1 0;
width: 100%;
.step-item {
flex: 1 1 0;
margin-top: 0;
min-height: 20px;
text-align: center;
position: relative;
&:not(:first-child)::before {
background: @primary-color;
content: "";
height: 2px;
left: -50%;
position: absolute;
top: 9px;
width: 100%;
}
a {
color: @gray-color;
display: inline-block;
padding: 20px 10px 0;
text-decoration: none;
&::before {
background: @primary-color;
border: @border-width-lg solid @light-color;
border-radius: 50%;
content: "";
display: block;
height: @unit-3;
left: 50%;
position: absolute;
top: @unit-1;
transform: translateX(-50%);
width: @unit-3;
z-index: @zindex-0;
}
}
&.active {
a {
&::before {
background: @light-color;
border: @border-width-lg solid @primary-color;
}
}
& ~ .step-item {
&::before {
background: @border-color;
}
a {
&::before {
background: @gray-color-light;
}
}
}
}
}
}

View File

@ -1,45 +0,0 @@
// Tables
.table {
border-collapse: collapse;
border-spacing: 0;
text-align: left;
width: 100%;
&.table-striped {
tbody {
tr:nth-of-type(odd) {
background: @bg-color;
}
}
}
&.table-hover {
tbody {
tr {
&:hover {
background: @bg-color-dark;
}
}
}
}
&,
&.table-striped {
tbody {
tr {
&.active {
background: @bg-color-dark;
}
}
}
}
td,
th {
border-bottom: @border-width solid @border-color;
padding: @unit-3 @unit-2;
}
th {
border-bottom-width: @border-width-lg;
}
}

View File

@ -1,62 +0,0 @@
// Tabs
.tab {
align-items: center;
border-bottom: @border-width solid @border-color;
display: flex;
flex-wrap: wrap;
list-style: none;
margin: @unit-1 0 @unit-1 - @border-width 0;
.tab-item {
margin-top: 0;
&.tab-action {
flex: 1 0 auto;
text-align: right;
}
a {
border-bottom: @border-width-lg solid transparent;
color: inherit;
display: block;
margin: 0 @unit-2 0 0;
padding: @unit-2 @unit-1 @unit-2 - @border-width-lg @unit-1;
text-decoration: none;
&:focus,
&:hover {
color: @link-color;
}
}
&.active a,
a.active {
border-bottom-color: @primary-color;
color: @link-color;
}
}
&.tab-block {
.tab-item {
flex: 1 0 0;
text-align: center;
a {
margin: 0;
}
.badge {
&[data-badge]::after {
position: absolute;
right: -4px;
top: -4px;
transform: translate(0, 0);
}
}
}
}
&:not(.tab-block) {
.badge {
padding-right: 2px;
}
}
}

View File

@ -1,38 +0,0 @@
// Tiles
.tile {
align-content: space-between;
align-items: flex-start;
display: flex;
.tile-icon,
.tile-action {
flex: 0 0 auto;
}
.tile-content {
flex: 1 1 auto;
&:not(:first-child) {
padding-left: @unit-2;
}
&:not(:last-child) {
padding-right: @unit-2;
}
}
.tile-title,
.tile-subtitle {
line-height: @line-height;
}
&.tile-centered {
align-items: center;
.tile-content {
overflow: hidden;
}
.tile-title,
.tile-subtitle {
margin-bottom: 0;
.text-ellipsis;
}
}
}

View File

@ -1,55 +0,0 @@
// Timelines
.timeline {
.timeline-item {
display: flex;
margin-bottom: @unit-6;
position: relative;
&::before {
background: @border-color;
content: "";
height: 100%;
left: 11px;
position: absolute;
top: @unit-6;
width: 2px;
}
.timeline-left {
flex: 0 0 auto;
}
.timeline-content {
flex: 1 1 auto;
padding: 2px 0 2px @layout-spacing-lg;
}
.timeline-icon {
border-radius: 50%;
color: @light-color;
display: block;
height: @unit-6;
text-align: center;
width: @unit-6;
&::before {
border: @border-width-lg solid @primary-color;
border-radius: 50%;
content: "";
display: block;
height: @unit-2;
left: @unit-2;
position: absolute;
top: @unit-2;
width: @unit-2;
}
&.icon-lg {
background: @primary-color;
font-size: @font-size-lg;
line-height: @line-height;
&::before {
content: none;
}
}
}
}
}

View File

@ -1,41 +0,0 @@
// Toasts
.toast {
border: @border-width solid @dark-color;
border-radius: @border-radius;
color: @light-color;
display: block;
padding: @layout-spacing;
.toast-variant(@dark-color);
width: 100%;
&.toast-primary {
.toast-variant(@primary-color);
}
&.toast-success {
.toast-variant(@success-color);
}
&.toast-warning {
.toast-variant(@warning-color);
}
&.toast-error {
.toast-variant(@error-color);
}
a {
color: @light-color;
text-decoration: underline;
&:focus,
&:hover,
&:active,
&.active {
opacity: .75;
}
}
.btn-clear {
margin: 2px -2px 2px 4px;
}
}

View File

@ -1,77 +0,0 @@
// Tooltips
.tooltip {
position: relative;
&::after {
background: fade(@dark-color, 90%);
border-radius: @border-radius;
bottom: 100%;
color: @light-color;
content: attr(data-tooltip);
display: block;
font-size: @font-size-sm;
left: 50%;
max-width: @control-max-width;
opacity: 0;
overflow: hidden;
padding: @unit-1 @unit-2;
pointer-events: none;
position: absolute;
text-overflow: ellipsis;
transform: translate(-50%, @unit-2);
transition: all .2s ease;
white-space: nowrap;
z-index: @zindex-3;
}
&:focus,
&:hover {
&::after {
opacity: 1;
transform: translate(-50%, -@unit-1);
}
}
&[disabled],
&.disabled {
pointer-events: auto;
}
&.tooltip-right {
&::after {
bottom: 50%;
left: 100%;
transform: translate(-@unit-1, 50%);
}
&:focus,
&:hover {
&::after {
transform: translate(@unit-1, 50%);
}
}
}
&.tooltip-bottom {
&::after {
bottom: auto;
top: 100%;
transform: translate(-50%, -@unit-2);
}
&:focus,
&:hover {
&::after {
transform: translate(-50%, @unit-1);
}
}
}
&.tooltip-left {
&::after {
bottom: 50%;
left: auto;
right: 100%;
transform: translate(@unit-2, 50%);
}
&:focus,
&:hover {
&::after {
transform: translate(-@unit-1, 50%);
}
}
}
}

View File

@ -1,127 +0,0 @@
// Typography
// Headings
h1,
h2,
h3,
h4,
h5,
h6 {
color: inherit;
font-weight: 500;
line-height: 1.2;
margin-bottom: .25em;
margin-top: 0;
}
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-weight: 500;
}
h1,
.h1 {
font-size: 2rem;
}
h2,
.h2 {
font-size: 1.6rem;
}
h3,
.h3 {
font-size: 1.4rem;
}
h4,
.h4 {
font-size: 1.2rem;
}
h5,
.h5 {
font-size: 1rem;
}
h6,
.h6 {
font-size: .8rem;
}
// Paragraphs
p {
line-height: 1.2 * @line-height;
margin: 0 0 @unit-4;
}
// Semantic text elements
a,
ins,
u {
text-decoration-skip: ink edges;
}
abbr[title] {
border-bottom: @border-width dotted;
cursor: help;
text-decoration: none;
}
kbd {
.label-base();
.label-variant(@light-color, @dark-color);
}
mark {
.label-base();
.label-variant(@body-font-color, @highlight-color);
}
// Blockquote
blockquote {
border-left: @border-width-lg solid @border-color;
margin-left: 0;
padding: @unit-2 @unit-4;
p:last-child {
margin-bottom: 0;
}
}
// Lists
ul,
ol {
margin: @unit-4 0 @unit-4 @unit-4;
padding: 0;
ul,
ol {
margin: @unit-4 0 @unit-4 @unit-4;
}
li {
margin-top: @unit-2;
}
}
ul {
list-style: disc inside;
ul {
list-style-type: circle;
}
}
ol {
list-style: decimal inside;
ol {
list-style-type: lower-alpha;
}
}
dl {
dt {
font-weight: bold;
}
dd {
margin: @unit-2 0 @unit-4 0;
}
}

View File

@ -1,7 +0,0 @@
@import 'utilities/colors.less';
@import 'utilities/display.less';
@import 'utilities/divider.less';
@import 'utilities/loading.less';
@import 'utilities/position.less';
@import 'utilities/shapes.less';
@import 'utilities/text.less';

View File

@ -1,45 +0,0 @@
// Text colors
.text-primary {
.text-color-variant(@primary-color);
}
.text-secondary {
.text-color-variant(@secondary-color-dark);
}
.text-gray {
.text-color-variant(@gray-color);
}
.text-light {
.text-color-variant(@light-color);
}
.text-success {
.text-color-variant(@success-color);
}
.text-warning {
.text-color-variant(@warning-color);
}
.text-error {
.text-color-variant(@error-color);
}
// Background colors
.bg-primary {
.bg-color-variant(@primary-color);
}
.bg-secondary {
.bg-color-variant(@secondary-color);
}
.bg-dark {
.bg-color-variant(@dark-color);
}
.bg-gray {
.bg-color-variant(@bg-color);
}
.bg-success {
.bg-color-variant(@success-color);
}
.bg-warning {
.bg-color-variant(@warning-color);
}
.bg-error {
.bg-color-variant(@error-color);
}

View File

@ -1,47 +0,0 @@
// Display
.d-block {
display: block;
}
.d-inline {
display: inline;
}
.d-inline-block {
display: inline-block;
}
.d-flex {
display: flex;
}
.d-inline-flex {
display: inline-flex;
}
.d-none,
.hide {
display: none !important;
}
.d-visible {
visibility: visible;
}
.d-invisible {
visibility: hidden;
}
.text-hide {
background: transparent;
border: 0;
color: transparent;
font-size: 0;
line-height: 0;
text-shadow: none;
}
.text-assistive {
border: 0;
clip: rect(0,0,0,0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.hand {
cursor: pointer;
}

View File

@ -1,50 +0,0 @@
// Divider
.divider,
.divider-vert {
display: block;
position: relative;
&[data-content]::after {
background: @bg-color-light;
color: @gray-color;
content: attr(data-content);
display: inline-block;
font-size: @font-size-sm;
padding: 0 @unit-2;
transform: translateY(-@font-size-sm + @border-width);
}
}
.divider {
border-top: @border-width solid @border-color;
height: @border-width;
margin: @unit-2 0;
&[data-content] {
margin: @unit-4 0;
}
}
.divider-vert {
display: block;
padding: @unit-4;
&::before {
border-left: @border-width solid @border-color;
bottom: @unit-2;
content: "";
display: block;
left: 50%;
position: absolute;
top: @unit-2;
transform: translateX(-50%);
}
&[data-content]::after {
left: 50%;
padding: @unit-1 0;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
}
}

View File

@ -1,34 +0,0 @@
// Loading
.loading {
color: transparent !important;
min-height: @unit-4;
pointer-events: none;
position: relative;
&::after {
animation: loading 500ms infinite linear;
border: @border-width-lg solid @primary-color;
border-radius: 50%;
border-right-color: transparent;
border-top-color: transparent;
content: "";
display: block;
height: @unit-4;
left: 50%;
margin-left: -@unit-2;
margin-top: -@unit-2;
position: absolute;
top: 50%;
width: @unit-4;
z-index: @zindex-0;
}
&.loading-lg {
min-height: @unit-10;
&::after {
height: @unit-8;
width: @unit-8;
margin-left: -@unit-4;
margin-top: -@unit-4;
}
}
}

View File

@ -1,35 +0,0 @@
// Position
.clearfix {
.clearfix();
}
.float-left {
float: left !important;
}
.float-right {
float: right !important;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.fixed {
position: fixed;
}
.centered {
display: block;
float: none;
margin-left: auto;
margin-right: auto;
}
// Spacing
.margin-variant(0, 0);
.margin-variant(1, @unit-1);
.margin-variant(2, @unit-2);
.padding-variant(0, 0);
.padding-variant(1, @unit-1);
.padding-variant(2, @unit-2);

View File

@ -1,7 +0,0 @@
// Shapes
.rounded {
border-radius: @border-radius;
}
.circle {
border-radius: 50%;
}

View File

@ -1,52 +0,0 @@
// Text
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.text-justify {
text-align: justify;
}
.text-lowercase {
text-transform: lowercase;
}
.text-uppercase {
text-transform: uppercase;
}
.text-capitalize {
text-transform: capitalize;
}
.text-normal {
font-weight: normal;
}
.text-bold {
font-weight: bold;
}
.text-italic {
font-style: italic;
}
.text-large {
font-size: 1.2em;
}
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.text-clip {
overflow: hidden;
text-overflow: clip;
white-space: nowrap;
}
.text-break {
hyphens: auto;
word-break: break-word;
word-wrap: break-word;
}

View File

@ -1,104 +0,0 @@
// Core variables
// Global
@html-font-size: 20px;
@html-line-height: 1.428571429;
@body-bg: @bg-color-light;
@body-font-color: lighten(@dark-color, 5%);
@font-size: .7rem;
@font-size-sm: .6rem;
@font-size-lg: .8rem;
@line-height: 1rem;
// Fonts
// Credit: https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/
@base-font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto;
@mono-font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier, monospace;
@fallback-font-family: "Helvetica Neue", sans-serif;
@cjk-zh-font-family: @base-font-family, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", @fallback-font-family;
@cjk-jp-font-family: @base-font-family, "Hiragino Sans", "Hiragino Kaku Gothic Pro", "Yu Gothic", YuGothic, Meiryo, @fallback-font-family;
@cjk-ko-font-family: @base-font-family, "Malgun Gothic", @fallback-font-family;
@body-font-family: @base-font-family, @fallback-font-family;
// Unit sizes
@unit-o: .05rem;
@unit-h: .1rem;
@unit-1: .2rem;
@unit-2: .4rem;
@unit-3: .6rem;
@unit-4: .8rem;
@unit-5: 1rem;
@unit-6: 1.2rem;
@unit-7: 1.4rem;
@unit-8: 1.6rem;
@unit-9: 1.8rem;
@unit-10: 2rem;
@unit-12: 2.4rem;
@unit-16: 3.2rem;
// Sizes
@layout-spacing: @unit-2;
@layout-spacing-sm: @unit-1;
@layout-spacing-lg: @unit-4;
@control-size: @unit-8;
@control-size-sm: @unit-6;
@control-size-lg: @unit-10;
@control-padding-h: @unit-2;
@control-padding-v: (@control-size - @line-height) / 2 - @border-width;
@control-padding-v-sm: (@control-size-sm - @line-height) / 2 - @border-width;
@control-padding-v-lg: (@control-size-lg - @line-height) / 2 - @border-width;
@control-icon-size: .7rem;
@control-min-width: 180px;
@control-max-width: 320px;
@border-radius: @unit-h;
@border-width: @unit-o;
@border-width-lg: @unit-h;
// Colors
// Core colors
@primary-color: #5764c6;
@primary-color-dark: darken(@primary-color, 3%);
@primary-color-light: lighten(@primary-color, 3%);
@secondary-color: lighten(@primary-color, 40%);
@secondary-color-dark: darken(@secondary-color, 3%);
@secondary-color-light: lighten(@secondary-color, 3%);
@link-color: @primary-color;
@link-color-dark: darken(@link-color, 5%);
// Gray colors
@dark-color: #454d5d;
@light-color: #fff;
@gray-color: lighten(@dark-color, 40%);
@gray-color-dark: darken(@gray-color, 20%);
@gray-color-light: lighten(@gray-color, 20%);
@border-color: lighten(@dark-color, 60%);
@border-color-dark: darken(@border-color, 10%);
@bg-color: lighten(@dark-color, 66%);
@bg-color-dark: darken(@bg-color, 3%);
@bg-color-light: @light-color;
// Control colors
@success-color: #32b643;
@warning-color: #ffb700;
@error-color: #e85600;
// Other colors
@code-color: #e06870;
@highlight-color: #ffe9b3;
// Responsive breakpoints
@size-xs: 480px;
@size-sm: 600px;
@size-md: 840px;
@size-lg: 960px;
@size-xl: 1280px;
@size-2x: 1440px;
// Z-index
@zindex-0: 1;
@zindex-1: 100;
@zindex-2: 200;
@zindex-3: 300;
@zindex-4: 400;

View File

@ -1,7 +1,3 @@
// 配置代码提示插件 CSS Var Complete
// 重写主题色
@primary-color: #121212;
// 重写bootstrap5 css variable
:root {
}

View File

@ -1,48 +0,0 @@
import axios from 'axios';
const PREFIX = ''
const CancelToken = axios.CancelToken;
export const sourceCommon = CancelToken.source();
const axiosCommon = axios.create({
timeout: 6000 * 1000,
cancelToken: sourceCommon.token,
baseURL: PREFIX.startsWith('/') ? PREFIX : '/' + PREFIX,
});
// 请求拦截
axiosCommon.interceptors.request.use(
(config) => {
//TODO 一些拦截操作 here
return config;
},
(error) => {
//TODO 一些提示...here
return Promise.reject(error);
},
);
// 响应拦截
axiosCommon.interceptors.response.use(
(response) => {
const { code } = response.data;
switch (code) {
case 1000:
if (window.location.pathname != '/login') {
window.location.href = `/login`;
}
// message.warn('即将回到登录页');
// setTimeout(() => {
// }, 3000);
break;
default:
break;
}
return response.data;
},
(err) => Promise.reject(err),
);
export { axiosCommon };

View File

@ -1,9 +1,3 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/svg+xml" href="/assets/img/annotation.svg" />
<link rel="stylesheet" href="<%= locals.assets %><%= name %>.css?v=<%= locals.version %>" />
<script
type="text/javascript"
src="<%= locals.assets %><%= name %>.js?v=<%= locals.version %>"
></script>

View File

@ -0,0 +1,7 @@
<script src="public/chunk-vendors.js" crossorigin="anonymous"></script>
<script src="public/chunk-lib.js" crossorigin="anonymous"></script>
<script
type="text/javascript"
src="<%= locals.assets %><%= name %>.js?v=<%= locals.version %>"
></script>

View File

@ -0,0 +1,7 @@
<link rel="icon" type="image/svg+xml" href="/assets/img/annotation.svg" />
<!-- <link rel="stylesheet" type="text/css" href="public/assets/css/ui.min.css" /> -->
<link
rel="stylesheet"
href="<%= locals.assets %><%= name %>.css?v=<%= locals.version %>"
/>

View File

@ -2,12 +2,34 @@
<html lang="en">
<head>
<%- include('../_layout/base') -%>
<%- include('../_layout/styles') -%>
<title>home页面</title>
</head>
<body>
<p>home</p>
<a href="/signup">去 注册 页面</a>
<p class="muted">
Placeholder text to demonstrate some
<a href="#" data-bs-toggle="tooltip" data-bs-title="Default tooltip"
>inline links</a
>
with tooltips. This is now just filler, no killer. Content placed here
just to mimic the presence of
<a href="#" data-bs-toggle="tooltip" data-bs-title="Another tooltip"
>real text</a
>. And all that just to give you an idea of how tooltips would look when
used in real-world situations. So hopefully you've now seen how
<a href="#" data-bs-toggle="tooltip" data-bs-title="Another one here too"
>these tooltips on links</a
>
can work in practice, once you use them on
<a href="#" data-bs-toggle="tooltip" data-bs-title="The last tip!"
>your own</a
>
site or project.
</p>
<span>当前assets: <%= assets %></span>
<editable-list
@ -21,6 +43,6 @@
add-item-text="Add new list item:"
></editable-list>
<%- include('../_layout/footer') -%>
<%- include('../_layout/footer') -%> <%- include('../_layout/scripts') -%>
</body>
</html>

View File

@ -0,0 +1 @@
@import '~bootstrap/scss/bootstrap';

View File

@ -1,3 +1,24 @@
import './index.less';
import './index.scss';
console.log('use ts wepack');
// import { createPopper } from '@popperjs/core';
// const popcorn = document.querySelector('#popcorn');
// const tooltip = document.querySelector('#tooltip');
// createPopper(popcorn, tooltip, {
// placement: 'top',
// });
import {
Tooltip as Tooltip,
// Toast as Toast,
// Popover as Popover,
} from 'bootstrap';
const tooltipTriggerList = document.querySelectorAll(
'[data-bs-toggle="tooltip"]'
);
[...tooltipTriggerList].map(
tooltipTriggerEl => new Tooltip(tooltipTriggerEl, { delay: 100 })
);

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<%- include('../_layout/base') -%>
<%- include('../_layout/base') -%> <%- include('../_layout/styles') -%>
<title>new page: <%= name %></title>
</head>
<body>
@ -101,6 +101,6 @@
</div>
</div>
</main>
<%- include('../_layout/footer') -%>
<%- include('../_layout/footer') -%> <%- include('../_layout/scripts') -%>
</body>
</html>

View File

@ -1,5 +1,4 @@
import './index.less';
import $ from 'cash-dom';
import { getVerifyCode, userLogin } from '../../api';
import { RegUtil } from '@backset/util';

View File

@ -2,6 +2,7 @@
<html lang="en">
<head>
<%- include('../_layout/base') -%>
<%- include('../_layout/styles') -%>
<title>new page: <%= name %></title>
</head>
<body>
@ -64,6 +65,6 @@
</div>
</div>
</div>
<%- include('../_layout/footer') -%>
<%- include('../_layout/footer') -%> <%- include('../_layout/scripts') -%>
</body>
</html>

View File

@ -1,7 +1,6 @@
import { createUser } from '../../api';
import './index.less';
import $ from 'cash-dom';
const { RegUtil, ValidateUtil } = require('@backset/util');
import { RegUtil, ValidateUtil } from '@backset/util';
import $ from 'jquery';
$(function () {
$('#signup-module').on('click', '#btn-signup', handleCreateUser);
@ -19,7 +18,7 @@ $(function () {
// return message.error({ text: '请补全表单' });
if (!RegUtil.PHONE.test(params.user_phone)) return;
// return message.error({ text: '手机号格式错误' });
createUser(params).then(res => {
$.post('/user/create', params, res => {
console.log(res);
});
}

Some files were not shown because too many files have changed in this diff Show More