cbvirtua 1.0.115 → 1.0.122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/package.json +1 -1
  2. package/sss.txt +2 -0
  3. package/v-track-master/v-track-master/.browserslistrc +3 -0
  4. package/v-track-master/v-track-master/.eslintignore +3 -0
  5. package/v-track-master/v-track-master/.eslintrc.js +15 -0
  6. package/v-track-master/v-track-master/.gitattributes +1 -0
  7. package/v-track-master/v-track-master/.github/FUNDING.yml +12 -0
  8. package/v-track-master/v-track-master/.github/workflows/node.js.yml +29 -0
  9. package/v-track-master/v-track-master/.travis.yml +22 -0
  10. package/v-track-master/v-track-master/.yarnrc +1 -0
  11. package/v-track-master/v-track-master/LICENSE +21 -0
  12. package/v-track-master/v-track-master/README.md +131 -0
  13. package/v-track-master/v-track-master/babel.config.js +25 -0
  14. package/v-track-master/v-track-master/build/rollup.config.base.js +14 -0
  15. package/v-track-master/v-track-master/build/rollup.config.browser.js +21 -0
  16. package/v-track-master/v-track-master/build/rollup.config.es.js +11 -0
  17. package/v-track-master/v-track-master/docs/.babelrc +5 -0
  18. package/v-track-master/v-track-master/docs/App.vue +61 -0
  19. package/v-track-master/v-track-master/docs/assets/app.scss +197 -0
  20. package/v-track-master/v-track-master/docs/assets/index.scss +10 -0
  21. package/v-track-master/v-track-master/docs/assets/mixins.scss +64 -0
  22. package/v-track-master/v-track-master/docs/assets/normalize.scss +349 -0
  23. package/v-track-master/v-track-master/docs/components/button.vue +15 -0
  24. package/v-track-master/v-track-master/docs/components/code-snippet.vue +72 -0
  25. package/v-track-master/v-track-master/docs/dist/css/app.2e14d2d6.css +4 -0
  26. package/v-track-master/v-track-master/docs/dist/css/chunk-vendors.c687a9b2.css +1 -0
  27. package/v-track-master/v-track-master/docs/dist/favicon.ico +0 -0
  28. package/v-track-master/v-track-master/docs/dist/fonts/element-icons.535877f5.woff +0 -0
  29. package/v-track-master/v-track-master/docs/dist/fonts/element-icons.732389de.ttf +0 -0
  30. package/v-track-master/v-track-master/docs/dist/js/app.efe84ade.js +2 -0
  31. package/v-track-master/v-track-master/docs/dist/js/app.efe84ade.js.map +1 -0
  32. package/v-track-master/v-track-master/docs/dist/js/chunk-vendors.c94e27ba.js +13 -0
  33. package/v-track-master/v-track-master/docs/dist/js/chunk-vendors.c94e27ba.js.map +1 -0
  34. package/v-track-master/v-track-master/docs/index.html +1 -0
  35. package/v-track-master/v-track-master/docs/main.js +78 -0
  36. package/v-track-master/v-track-master/docs/pages/block-show.vue +177 -0
  37. package/v-track-master/v-track-master/docs/pages/custom-events.vue +291 -0
  38. package/v-track-master/v-track-master/docs/pages/home.vue +269 -0
  39. package/v-track-master/v-track-master/docs/pages/started.vue +151 -0
  40. package/v-track-master/v-track-master/docs/pages/track-view.vue +234 -0
  41. package/v-track-master/v-track-master/docs/tracks/action.js +37 -0
  42. package/v-track-master/v-track-master/docs/tracks/events.js +140 -0
  43. package/v-track-master/v-track-master/docs/tracks/index.js +13 -0
  44. package/v-track-master/v-track-master/docs/utils/date.js +219 -0
  45. package/v-track-master/v-track-master/docs/utils/dom.js +26 -0
  46. package/v-track-master/v-track-master/jest.config.js +18 -0
  47. package/v-track-master/v-track-master/package.json +67 -0
  48. package/v-track-master/v-track-master/postcss.config.js +5 -0
  49. package/v-track-master/v-track-master/public/favicon.ico +0 -0
  50. package/v-track-master/v-track-master/public/index.html +18 -0
  51. package/v-track-master/v-track-master/src/hooks/index.js +217 -0
  52. package/v-track-master/v-track-master/src/index.js +79 -0
  53. package/v-track-master/v-track-master/src/utils/debug.js +13 -0
  54. package/v-track-master/v-track-master/src/utils/dom.js +73 -0
  55. package/v-track-master/v-track-master/src/utils/helper.js +122 -0
  56. package/v-track-master/v-track-master/src/utils/vis-monitor.js +183 -0
  57. package/v-track-master/v-track-master/tests/helper.js +37 -0
  58. package/v-track-master/v-track-master/tests/unit/.eslintrc.js +5 -0
  59. package/v-track-master/v-track-master/tests/unit/track-click-async.spec.js +52 -0
  60. package/v-track-master/v-track-master/tests/unit/track-click-delay.spec.js +46 -0
  61. package/v-track-master/v-track-master/tests/unit/track-click-native.spec.js +84 -0
  62. package/v-track-master/v-track-master/tests/unit/track-click-param.spec.js +55 -0
  63. package/v-track-master/v-track-master/tests/unit/track-click.spec.js +47 -0
  64. package/v-track-master/v-track-master/tests/unit/track-custom-event-async.spec.js +61 -0
  65. package/v-track-master/v-track-master/tests/unit/track-custom-event-delay.spec.js +59 -0
  66. package/v-track-master/v-track-master/tests/unit/track-custom-event-param.spec.js +68 -0
  67. package/v-track-master/v-track-master/tests/unit/track-custom-event.spec.js +55 -0
  68. package/v-track-master/v-track-master/tests/unit/track-show-custom-scroll-once.spec.js +62 -0
  69. package/v-track-master/v-track-master/tests/unit/track-show-custom-scroll.spec.js +62 -0
  70. package/v-track-master/v-track-master/tests/unit/track-show-once.spec.js +55 -0
  71. package/v-track-master/v-track-master/tests/unit/track-show-param.spec.js +51 -0
  72. package/v-track-master/v-track-master/tests/unit/track-show.spec.js +55 -0
  73. package/v-track-master/v-track-master/tests/unit/track-view-vif.spec.js +54 -0
  74. package/v-track-master/v-track-master/tests/unit/track-view-watch-delay.spec.js +63 -0
  75. package/v-track-master/v-track-master/tests/unit/track-view-watch.spec.js +61 -0
  76. package/v-track-master/v-track-master/tests/unit/track-view.spec.js +32 -0
  77. package/v-track-master/v-track-master/vue.config.js +45 -0
  78. package/v-track-master/v-track-master/yarn.lock +10186 -0
  79. package/vv.txt +10442 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cbvirtua",
3
- "version": "1.0.115",
3
+ "version": "1.0.122",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/sss.txt ADDED
@@ -0,0 +1,2 @@
1
+ <svg t="1768312682109" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1681" width="200" height="200"><path d="M957.6 872l-432-736c-3.2-5.6-8.8-8-13.6-8s-10.4 2.4-13.6 8l-432 736c-6.4 10.4 1.6 24 13.6 24h864c12 0 20-13.6 13.6-24z m-793.6-40L512 239.2l348 592.8h-696zM480 704h64v64h-64v-64z m0-320h64v256h-64V384z" p-id="1682"></path></svg>
2
+ <svg t="1768312713099" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1846" width="200" height="200"><path d="M957.6 872l-432-736c-6.4-10.4-21.6-10.4-27.2 0l-432 736c-6.4 10.4 1.6 24 13.6 24h864c12 0 20-13.6 13.6-24z m-416-104h-64v-64h64v64z m-63.2-128V384h64v256h-64z" p-id="1847"></path></svg>
@@ -0,0 +1,3 @@
1
+ > 1%
2
+ last 2 versions
3
+ not ie <= 8
@@ -0,0 +1,3 @@
1
+ node_modules/
2
+ dist/
3
+ output.js
@@ -0,0 +1,15 @@
1
+ module.exports = {
2
+ root: true,
3
+ env: {
4
+ node: true
5
+ },
6
+ extends: ["plugin:vue/essential", "@vue/prettier"],
7
+ rules: {
8
+ "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9
+ "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
10
+ "exclude": /(dist)/
11
+ },
12
+ parserOptions: {
13
+ parser: "babel-eslint"
14
+ }
15
+ };
@@ -0,0 +1 @@
1
+ docs/* linguist-documentation=false
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: ['https://raw.githubusercontent.com/l-hammer/You-need-to-know-css/master/static/reward-code.png']
@@ -0,0 +1,29 @@
1
+ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
+
4
+ name: Node.js CI
5
+
6
+ on:
7
+ push:
8
+ branches: [ master ]
9
+ pull_request:
10
+ branches: [ master ]
11
+
12
+ jobs:
13
+ build:
14
+
15
+ runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ node-version: [10.x, 12.x, 14.x]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Use Node.js ${{ matrix.node-version }}
24
+ uses: actions/setup-node@v1
25
+ with:
26
+ node-version: ${{ matrix.node-version }}
27
+ - run: yarn
28
+ - run: npm run build --if-present
29
+ - run: npm test
@@ -0,0 +1,22 @@
1
+ language: node_js
2
+
3
+ cache:
4
+ yarn: true
5
+
6
+ node_js:
7
+ - '10'
8
+ - '8'
9
+
10
+ branches:
11
+ only:
12
+ - master
13
+
14
+ install:
15
+ - yarn
16
+
17
+ script:
18
+ - yarn lint
19
+ - yarn test:unit
20
+
21
+ after_success:
22
+ - yarn build
@@ -0,0 +1 @@
1
+ registry "https://registry.yarnpkg.com"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 LHammer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,131 @@
1
+ # v-track
2
+
3
+ <a href="https://travis-ci.org/l-hammer/v-track"><img alt="Travis (.org) branch" src="https://img.shields.io/travis/l-hammer/v-track/master.svg?logoColor=%23666666&style=flat-square"></a>
4
+ <a href="https://unpkg.com/v-track/dist/v-track.min.js"><img src="https://img.badgesize.io/https://unpkg.com/v-track/dist/v-track.min.js?compression=gzip&style=flat-square" alt="Gzip Size" /></a>
5
+ <a href="https://www.npmjs.com/package/v-track"><img src="https://img.shields.io/npm/v/v-track.svg?colorB=brightgreen&style=flat-square"></a>
6
+ <a href="https://github.com/l-hammer/v-track/tree/master/tests/unit"><img src="https://img.shields.io/badge/tested_with-jest-99424f.svg?style=flat-square"></a>
7
+ <a href="http://hits.dwyl.io/l-hammer/v-track" alt="hit count"><img src="http://hits.dwyl.io/l-hammer/v-track.svg" /></a>
8
+ <a href="http://hits.dwyl.io/l-hammer/v-track" alt="downloads"><img src="https://img.shields.io/npm/dt/v-track.svg?style=flat-square" /></a>
9
+
10
+ v-track通过 Vue [自定义指令](https://cn.vuejs.org/v2/guide/custom-directive.html)的方式将埋点代码与业务代码完全解耦~
11
+
12
+ ## 安装
13
+
14
+ ### YARN
15
+
16
+ ```shell
17
+ $ yarn add v-track
18
+ ```
19
+
20
+ ### NPM
21
+
22
+ ```shell
23
+ $ npm install v-track --save
24
+ ```
25
+
26
+ ### CDN
27
+
28
+ 目前可以通过[unpkg.com/v-track](https://unpkg.com/v-track/)获取到最新版本的资源,在页面上使用 script 标签直接引入文件即可开始使用
29
+
30
+ ```html
31
+ <script src="https://unpkg.com/v-track/dist/v-track.min.js"></script>
32
+ ```
33
+
34
+ 或者
35
+
36
+ ```html
37
+ <script src="https://cdn.jsdelivr.net/npm/v-track/dist/v-track.min.js"></script>
38
+ ```
39
+
40
+ > 建议使用 CDN 引入 v-track 的用户在链接地址上锁定版本,以免将来 v-track 升级时受到非兼容性更新的影响。锁定版本的方法请查看 [unpkg.com](https://unpkg.com/) or [jsdelivr.com](https://www.jsdelivr.com/)。
41
+
42
+ ## 用法
43
+
44
+ ```js
45
+ import Vue from "vue"
46
+ import VTrack from "v-track"
47
+ import trackEvents from "./track-events"
48
+
49
+ Vue.use(VTrack, {
50
+ trackEvents, // 埋点事件对象
51
+ trackEnable: {
52
+ UVPV: true, // 是否开启UVPV统计,v0.8.3新增routeUpdate,即在当前路由参数发生改变时埋点,默认为false
53
+ TONP: true // 是否开启页面停留时长统计,默认为false
54
+ }
55
+ })
56
+ ```
57
+
58
+ ```js
59
+ /* track-events.js */
60
+ export default {
61
+ /**
62
+ * @name UVPV 固定名称不支持修改
63
+ * @desc UV、PV埋点
64
+ * @param {Object} context 当前上下文
65
+ */
66
+ UVPV(context) {
67
+ ...
68
+ },
69
+ /**
70
+ * @name TONP 固定名称不支持修改
71
+ * @desc 页面停留时间埋点(Time on Page)
72
+ * @param {Object} context 当前上下文
73
+ * @param {Timestamp} et 进入页面时间
74
+ * @param {Timestamp} dt 离开页面时间
75
+ */
76
+ TONP(context, { et, dt }) {
77
+ ...
78
+ },
79
+ /**
80
+ * @name 18015 埋点唯一标识ID(自定义)
81
+ * @param {Object} context 当前上下文
82
+ * @param {Object} args 剩余参数
83
+ */
84
+ 18015(context, args) {
85
+ ...
86
+ }
87
+ ...
88
+ }
89
+ ```
90
+
91
+ ```HTML
92
+ <!-- 页面行为埋点(track-view为v-track全局注册的组件) -->
93
+ <track-view v-track:18015></track-view>
94
+ <track-view v-track:18015.watch="{ rest }"></track-view>
95
+ <track-view v-track:18015.watch.delay="{ rest }"></track-view>
96
+ <track-view v-if="rest" v-track:18015></track-view>
97
+
98
+ <!-- 事件行为埋点(DOM) -->
99
+ <div v-track:18015.click="handleClick"></div>
100
+ <div v-track:18015.click="{ handleClick, item, index }"></div>
101
+ <div v-track:18015.click.async="{ handleSearch, rest }"></div>
102
+ <div v-track:18015.click.delay="handleClick"></div>
103
+
104
+ <!-- 事件行为埋点(组件) -->
105
+ <cmp v-track:18015.click="handleClick"></cmp>
106
+ <cmp v-track:18015.[自定义事件名]="handleSearch"></cmp>
107
+ <cmp v-track:18015.[自定义事件名].delay="handleSearch"></cmp>
108
+ <cmp v-track:18015.[自定义事件名].async="{ handleSearch, rest }"></cmp>
109
+
110
+ <!-- 区域展现埋点(block 可以是 DOM 或者组件) -->
111
+ <block v-track:18015.show></block>
112
+ <block v-track:18015.show.once></block>
113
+ <block v-track:18015.show.custom="{ ref: 'scroll' }"></block>
114
+ <block v-track:18015.show.custom.once="{ ref: 'scroll' }"></block>
115
+ ```
116
+
117
+ ## 指令修饰符
118
+
119
+ - `.click` 表示事件行为的埋点
120
+ - `.[custom-event]` 表示自定义事件行为的埋点
121
+ - `.native` 表示监听组件原生click事件行为的埋点
122
+ - `.watch` 表示页面异步行为的埋点
123
+ - `.async` 配合`.click`指令,表示异步事件行为的埋点
124
+ - `.delay` 表示埋点是否延迟执行,默认先执行埋点再执行回调
125
+ - `.show` 表示区域曝光埋点
126
+ - `.once` 配合`.show`指令,只执行一次埋点
127
+ - `.custom` 配合`.show`指令,表示使用自定义scroll事件
128
+
129
+ ## LICENSE
130
+
131
+ [MIT](https://github.com/l-hammer/v-track/blob/master/LICENSE) © 2019-present, LHammer
@@ -0,0 +1,25 @@
1
+ module.exports = {
2
+ presets: [
3
+ [
4
+ "@babel/preset-env",
5
+ {
6
+ modules: false
7
+ }
8
+ ]
9
+ ],
10
+ plugins: [
11
+ "@babel/plugin-proposal-class-properties",
12
+ [
13
+ "component",
14
+ {
15
+ libraryName: "element-ui",
16
+ styleLibraryName: "theme-chalk"
17
+ }
18
+ ]
19
+ ],
20
+ env: {
21
+ test: {
22
+ presets: ["@babel/preset-env"]
23
+ }
24
+ }
25
+ };
@@ -0,0 +1,14 @@
1
+ import babel from "rollup-plugin-babel";
2
+ import resolve from "rollup-plugin-node-resolve";
3
+ import commonjs from "rollup-plugin-commonjs";
4
+
5
+ export default {
6
+ input: "src/index.js",
7
+ plugins: [
8
+ babel({
9
+ exclude: "node_modules/**"
10
+ }),
11
+ resolve(),
12
+ commonjs()
13
+ ]
14
+ };
@@ -0,0 +1,21 @@
1
+ import base from "./rollup.config.base";
2
+ import { uglify } from "rollup-plugin-uglify";
3
+ import replace from "rollup-plugin-replace";
4
+
5
+ const config = Object.assign({}, base, {
6
+ output: {
7
+ name: "VTrack",
8
+ file: "dist/v-track.min.js",
9
+ format: "umd"
10
+ }
11
+ });
12
+
13
+ config.plugins = [
14
+ ...config.plugins,
15
+ uglify({}),
16
+ replace({
17
+ "process.env.NODE_ENV": JSON.stringify("production")
18
+ })
19
+ ];
20
+
21
+ export default config;
@@ -0,0 +1,11 @@
1
+ import base from "./rollup.config.base";
2
+
3
+ const config = Object.assign({}, base, {
4
+ output: {
5
+ name: "v-track",
6
+ file: "dist/v-track.esm.js",
7
+ format: "es"
8
+ }
9
+ });
10
+
11
+ export default config;
@@ -0,0 +1,5 @@
1
+ {
2
+ "presets": [
3
+ "@vue/app"
4
+ ]
5
+ }
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <div id="app">
3
+ <header>
4
+ <h1>v-track</h1>
5
+ <div class="command">yarn add v-track or npm add v-track --save</div>
6
+ <nav>
7
+ <a href="https://travis-ci.org/l-hammer/v-track"
8
+ ><img
9
+ alt="Travis (.org) branch"
10
+ src="https://img.shields.io/travis/l-hammer/v-track/master.svg?logoColor=%23666666&style=flat-square"
11
+ /></a>
12
+ <a href="https://unpkg.com/v-track/dist/v-track.min.js"
13
+ ><img
14
+ src="http://img.badgesize.io/https://unpkg.com/v-track/dist/v-track.min.js?compression=gzip&style=flat-square"
15
+ alt="Gzip Size"
16
+ /></a>
17
+ <a href="https://www.npmjs.com/package/v-track"
18
+ ><img
19
+ src="https://img.shields.io/npm/v/v-track.svg?colorB=brightgreen&style=flat-square"
20
+ /></a>
21
+ <a href="https://github.com/l-hammer/v-track/tree/master/tests/unit"
22
+ ><img
23
+ src="https://img.shields.io/badge/tested_with-jest-99424f.svg?style=flat-square"
24
+ /></a>
25
+ <a href="javascript:void(0);" alt="hit count"
26
+ ><img src="http://hits.dwyl.io/l-hammer/v-track.svg"
27
+ /></a>
28
+ <a href="javascript:void(0);" alt="downloads"
29
+ ><img
30
+ src="https://img.shields.io/npm/dt/v-track.svg?style=flat-square"
31
+ /></a>
32
+ <a href="https://github.com/l-hammer/v-track"
33
+ ><img
34
+ src="https://img.shields.io/github/stars/l-hammer/v-track.svg?style=social&label=Star"
35
+ /></a>
36
+ </nav>
37
+ <div class="description">
38
+ 🕹一个基于Vue指令实现的埋点插件~
39
+ </div>
40
+ </header>
41
+
42
+ <keep-alive>
43
+ <router-view v-if="$route.meta.keepAlive"></router-view>
44
+ </keep-alive>
45
+ <router-view v-if="!$route.meta.keepAlive"></router-view>
46
+
47
+ <section class="footer">
48
+ <div class="section-content mini">
49
+ Copyright © 2019-present LHammer
50
+ </div>
51
+ </section>
52
+ </div>
53
+ </template>
54
+
55
+ <script>
56
+ export default {};
57
+ </script>
58
+
59
+ <style lang="scss">
60
+ @import "./assets/index.scss";
61
+ </style>
@@ -0,0 +1,197 @@
1
+ body {
2
+ background: white;
3
+ margin: 0;
4
+ font-family: "Avenir", Helvetica, Arial, sans-serif;
5
+ -webkit-font-smoothing: antialiased;
6
+ -moz-osx-font-smoothing: grayscale;
7
+ }
8
+ header {
9
+ background: $primary-color;
10
+ padding: 32px;
11
+ padding-bottom: 8px;
12
+ nav,
13
+ .description {
14
+ text-align: center;
15
+ }
16
+ .description {
17
+ color: white;
18
+ margin-top: 15px;
19
+ }
20
+ }
21
+ section {
22
+ .section-content {
23
+ margin: 0 42px;
24
+ padding: 64px 0;
25
+ box-sizing: border-box;
26
+ &.small {
27
+ padding: 32px 0;
28
+ }
29
+ &.mini {
30
+ padding: 16px 0;
31
+ }
32
+ &.large {
33
+ padding: 152px 0;
34
+ }
35
+ }
36
+ &.nav {
37
+ text-align: center;
38
+ background: $primary-color;
39
+ padding: 24px;
40
+ padding-bottom: 35px;
41
+ @include h-box;
42
+ @include box-center;
43
+ a {
44
+ display: inline-block;
45
+ padding: 8px 16px;
46
+ color: white;
47
+ background: lighten($primary-color, 10%);
48
+ border-radius: 3px;
49
+ &:hover {
50
+ background: lighten($primary-color, 20%);
51
+ }
52
+ &:not(:last-child) {
53
+ margin-right: 8px;
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ .collapse {
60
+ .section-content {
61
+ padding: 12px 0 64px 0;
62
+ }
63
+ }
64
+
65
+ h1 {
66
+ color: white;
67
+ text-align: center;
68
+ margin: 0 0 32px;
69
+ }
70
+
71
+ a {
72
+ color: $primary-color;
73
+ text-decoration: none;
74
+ cursor: pointer;
75
+ &:hover {
76
+ color: lighten($primary-color, 10%);
77
+ }
78
+ }
79
+
80
+ .command {
81
+ background: darken($primary-color, 10%);
82
+ color: white;
83
+ font-family: monospace;
84
+ max-width: 500px;
85
+ margin: 20px auto;
86
+ border-radius: 2px;
87
+ padding: 12px 24px;
88
+ box-sizing: border-box;
89
+ text-align: center;
90
+ }
91
+ .plus {
92
+ text-align: center;
93
+ color: $primary-color;
94
+ font-size: 32px;
95
+ margin: 12px;
96
+ }
97
+
98
+ .demo,
99
+ .snippets {
100
+ max-width: 1200px;
101
+ margin: auto;
102
+ }
103
+
104
+ .snippet + .snippet {
105
+ margin-top: 20px;
106
+ }
107
+
108
+ .snippet:last-child {
109
+ margin-bottom: 39px;
110
+ }
111
+
112
+ .snippets {
113
+ background: #f9f9f9;
114
+ border-radius: 0 0 3px 3px;
115
+ }
116
+
117
+ .demo {
118
+ background: #f9f9f9;
119
+ margin-top: 42px;
120
+ border-radius: 3px 3px 0 0;
121
+ overflow: hidden;
122
+ .section-content {
123
+ text-align: center;
124
+ max-width: 560px;
125
+ margin: auto;
126
+ }
127
+ }
128
+
129
+ .demo.viewport {
130
+ height: 364px;
131
+ overflow: auto;
132
+
133
+ .section-content.large {
134
+ padding: 375px 0;
135
+ }
136
+ }
137
+
138
+ .footer {
139
+ font-size: 14px;
140
+ text-align: center;
141
+ background: lighten($primary-color, 45%);
142
+ }
143
+
144
+ .track-button {
145
+ width: 229px;
146
+ height: 39px;
147
+ background: $primary-color;
148
+ border-radius: 5px;
149
+ color: white;
150
+ line-height: 39px;
151
+ margin: auto;
152
+ cursor: pointer;
153
+ user-select: none;
154
+ &:hover {
155
+ background: lighten($primary-color, 5%);
156
+ }
157
+ &:active {
158
+ background: darken($primary-color, 5%);
159
+ }
160
+ }
161
+
162
+ .v-track-table {
163
+ .header,
164
+ .row {
165
+ display: flex;
166
+ strong,
167
+ span {
168
+ flex: 1;
169
+ line-height: 29px;
170
+ border-bottom: 1px solid #ebeef5;
171
+ }
172
+ }
173
+ .row:hover {
174
+ background: #fafafa;
175
+ cursor: pointer;
176
+ }
177
+ }
178
+
179
+ .notification__large {
180
+ width: 399px;
181
+ .el-notification__group {
182
+ width: 100%;
183
+ }
184
+ }
185
+
186
+ .message-offset {
187
+ top: 88px;
188
+ }
189
+
190
+ .section-content.collapse-wrapper {
191
+ padding: 20px;
192
+ margin: 20px auto;
193
+ background: white;
194
+ max-width: 690px;
195
+ text-align: left;
196
+ box-shadow: 0 2px 4px rgba(232, 237, 250, 0.9);
197
+ }
@@ -0,0 +1,10 @@
1
+ $primary-color: #40b883;
2
+ $md-grey: #9e9e9e;
3
+ $md-grey-100: #f5f5f5;
4
+ $md-grey-200: #eeeeee;
5
+ $md-grey-300: #e0e0e0;
6
+ $md-grey-400: #bdbdbd;
7
+
8
+ @import './normalize.scss';
9
+ @import './mixins.scss';
10
+ @import './app.scss';
@@ -0,0 +1,64 @@
1
+ @mixin ellipsis {
2
+ overflow: hidden;
3
+ -ms-text-overflow: ellipsis;
4
+ text-overflow: ellipsis;
5
+ white-space: nowrap;
6
+ }
7
+
8
+ @mixin bounds($distance) {
9
+ top: $distance;
10
+ bottom: $distance;
11
+ right: $distance;
12
+ left: $distance;
13
+ }
14
+
15
+ @mixin overlay {
16
+ position: absolute;
17
+ @include bounds(0);
18
+ }
19
+
20
+ @mixin flex-box {
21
+ display: flex;
22
+
23
+ & > * {
24
+ flex: auto 0 0;
25
+ }
26
+ }
27
+
28
+ @mixin h-box {
29
+ @include flex-box;
30
+ flex-direction: row;
31
+ }
32
+
33
+ @mixin v-box {
34
+ @include flex-box;
35
+ flex-direction: column;
36
+ }
37
+
38
+ @mixin box-center {
39
+ align-items: center;
40
+ justify-content: center;
41
+ }
42
+
43
+ @mixin space-between-x($margin) {
44
+ margin-right: $margin;
45
+
46
+ &:last-child {
47
+ margin-right: 0;
48
+ }
49
+ }
50
+
51
+ @mixin space-between-y($margin) {
52
+ margin-bottom: $margin;
53
+
54
+ &:last-child {
55
+ margin-bottom: 0;
56
+ }
57
+ }
58
+
59
+ @mixin unselectable {
60
+ -moz-user-select: none;
61
+ -webkit-user-select: none;
62
+ -ms-user-select: none;
63
+ user-select: none;
64
+ }