Skip to content

Commit 21df5d5

Browse files
author
Vic Shóstak
committed
Fix getRandomInt, update example
1 parent 59ddd46 commit 21df5d5

File tree

17 files changed

+17802
-3676
lines changed

17 files changed

+17802
-3676
lines changed

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ typings/
9090
# dotenv environment variables file
9191
.env
9292

93-
###GitBook
93+
# GitBook
9494
# Generated book
9595
src/docs/_book/
96-
97-
###Example dir
98-
examples/
99-
examples/.babelrc

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.idea/
2+
.github/
3+
.editorconfig
4+
.gitignore
5+
.prettierignore
6+
package-lock.json
7+
node_modules/
8+
**/*.html
9+
*.md

LICENSE renamed to LICENSE.md

File renamed without changes.

examples/.babelrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"presets": [
3-
"es2015",
4-
"es2016"
5-
]
2+
"presets": ["@babel/preset-env"]
63
}

examples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ $ cd vue-goodshare/examples
2929
$ npm install
3030
$ npm run build # or npm run watch
3131
```
32+
33+
#### Note
34+
35+
For this example, we do not use Webpack `-p` directive (UglifyJs). Yep, `./build/script.js` is too heavy for production, but still better to understand on localhost.

examples/build/script.js

Lines changed: 13296 additions & 0 deletions
Large diffs are not rendered by default.

examples/build/style.css

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
* {
2+
box-sizing: border-box;
3+
}
4+
5+
body {
6+
font-size: 14px;
7+
margin: 0;
8+
padding: 0;
9+
}
10+
11+
body,
12+
h1,
13+
h2,
14+
h3,
15+
h4 {
16+
font-family: "Open Sans", Arial, sans-serif;
17+
font-weight: normal;
18+
}
19+
20+
h1,
21+
h2,
22+
h3,
23+
h4 {
24+
margin: 1.5rem 0 1rem;
25+
}
26+
27+
h1 {
28+
font-size: 2.4rem;
29+
}
30+
31+
h2 {
32+
font-size: 2rem;
33+
}
34+
35+
h3 {
36+
font-size: 1.6rem;
37+
}
38+
39+
h4 {
40+
font-size: 1.2rem;
41+
}
42+
43+
pre,
44+
code {
45+
width: auto;
46+
overflow-x: auto;
47+
color: red;
48+
}
49+
50+
pre {
51+
background: #f4f4f4;
52+
border-left: 10px solid #cccccc;
53+
padding: 1rem;
54+
}
55+
56+
pre span {
57+
color: purple;
58+
}
59+
60+
.slider {
61+
padding: 3rem 1rem;
62+
text-align: center;
63+
}
64+
65+
.slider img {
66+
width: 640px;
67+
}
68+
69+
@supports (display: grid) {
70+
.wrapper {
71+
width: 100%;
72+
display: grid;
73+
grid-gap: 3rem;
74+
grid-template-columns: 0.15fr 0.7fr 0.15fr;
75+
background-color: #fefefe;
76+
padding: 1rem 2.5rem 2.5rem;
77+
}
78+
.items {
79+
width: 100%;
80+
display: grid;
81+
grid-gap: 15px;
82+
grid-template-columns: 1fr;
83+
align-items: center;
84+
}
85+
@media (max-width: 768px) {
86+
.slider img {
87+
width: 100%;
88+
}
89+
.wrapper {
90+
grid-template-columns: 100%;
91+
padding: 0.5rem;
92+
}
93+
.items {
94+
grid-template-columns: 100%;
95+
}
96+
}
97+
}
98+
99+
@supports not (display: grid) {
100+
.wrapper,
101+
.items {
102+
display: flex;
103+
display: -webkit-flex;
104+
flex-flow: row wrap;
105+
-webkit-flex-flow: row wrap;
106+
}
107+
.wrapper {
108+
background-color: #fefefe;
109+
padding: 1rem 2.5rem 2.5rem;
110+
}
111+
.wrapper .box-1 {
112+
width: 100%;
113+
}
114+
.items {
115+
align-items: center;
116+
-webkit-align-items: center;
117+
justify-content: space-between;
118+
-webkit-justify-content: space-between;
119+
}
120+
.items > .item {
121+
flex: 1 1 auto;
122+
margin: 0 1rem;
123+
}
124+
@media (max-width: 768px) {
125+
.slider img {
126+
width: 100%;
127+
}
128+
.wrapper {
129+
padding: 0.5rem;
130+
}
131+
}
132+
}

examples/dist/script.min.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/dist/style.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)