Skip to content

Commit 71c23e2

Browse files
committed
Update
1 parent 6b62b86 commit 71c23e2

File tree

7 files changed

+47
-78
lines changed

7 files changed

+47
-78
lines changed

docs/assets/css/docs.css

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
::-webkit-scrollbar {
2-
width: 10px;
3-
height: 10px;
4-
}
5-
6-
::-webkit-scrollbar-track {
7-
background-color: rgba(113, 112, 107, 0.1);
8-
}
9-
10-
::-webkit-scrollbar-thumb {
11-
background-color: rgba(0, 0, 0, 0.2);
12-
}
13-
14-
::-webkit-scrollbar-thumb:hover {
15-
background-color: gray;
1+
.gap-2 {
2+
gap: 0.5rem;
163
}

docs/assets/css/old.css

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,10 @@ td {
175175
header {
176176
background-color: #171717;
177177
color: #FDFDFB;
178-
width:270px;
179-
float:left;
180-
position:fixed;
178+
width: 270px;
179+
float: left;
180+
position: fixed;
181181
border: 1px solid #000;
182-
-webkit-border-top-right-radius: 4px;
183-
-webkit-border-bottom-right-radius: 4px;
184-
-moz-border-radius-topright: 4px;
185-
-moz-border-radius-bottomright: 4px;
186182
border-top-right-radius: 4px;
187183
border-bottom-right-radius: 4px;
188184
padding: 34px 25px 22px 50px;
@@ -221,11 +217,6 @@ header li {
221217
padding: 6px 6px 6px 7px;
222218

223219
background: #AF0011;
224-
background: -moz-linear-gradient(top, #AF0011 0%, #820011 100%);
225-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
226-
background: -webkit-linear-gradient(top, #AF0011 0%,#820011 100%);
227-
background: -o-linear-gradient(top, #AF0011 0%,#820011 100%);
228-
background: -ms-linear-gradient(top, #AF0011 0%,#820011 100%);
229220
background: linear-gradient(top, #AF0011 0%,#820011 100%);
230221

231222
border-radius: 4px;
@@ -237,11 +228,6 @@ header li {
237228

238229
header li:hover {
239230
background: #C3001D;
240-
background: -moz-linear-gradient(top, #C3001D 0%, #950119 100%);
241-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
242-
background: -webkit-linear-gradient(top, #C3001D 0%,#950119 100%);
243-
background: -o-linear-gradient(top, #C3001D 0%,#950119 100%);
244-
background: -ms-linear-gradient(top, #C3001D 0%,#950119 100%);
245231
background: linear-gradient(top, #C3001D 0%,#950119 100%);
246232
}
247233

@@ -267,55 +253,51 @@ footer {
267253

268254
@media print, screen and (max-width: 960px) {
269255
div.wrapper {
270-
width:auto;
271-
margin:0;
256+
width: auto;
257+
margin: 0;
272258
}
273259

274260
header, section, footer {
275-
float:none;
276-
position:static;
277-
width:auto;
261+
float: none;
262+
position: static;
263+
width: auto;
278264
}
279265

280266
footer {
281267
border-top: 1px solid #ccc;
282-
margin:0 84px 0 50px;
283-
padding:0;
284-
}
285-
286-
header {
287-
padding-right:320px;
268+
margin: 0 84px 0 50px;
269+
padding: 0;
288270
}
289271

290272
section {
291-
padding:20px 84px 20px 50px;
292-
margin:0 0 20px;
273+
padding: 20px 84px 20px 50px;
274+
margin: 0 0 20px;
293275
}
294276

295277
header a small {
296-
display:inline;
278+
display: inline;
297279
}
298280

299281
header ul {
300-
position:absolute;
301-
right:130px;
302-
top:84px;
282+
position: absolute;
283+
right: 130px;
284+
top: 84px;
303285
}
304286
}
305287

306288
@media print, screen and (max-width: 720px) {
307289
body {
308-
word-wrap:break-word;
290+
word-wrap: break-word;
309291
}
310292

311293
header {
312-
padding:10px 20px 0;
294+
padding: 20px;
313295
margin-right: 0;
314296
}
315297

316298
section {
317-
padding:10px 0 10px 20px;
318-
margin:0 0 30px;
299+
padding: 10px 0 10px 20px;
300+
margin: 0 0 30px;
319301
}
320302

321303
footer {
@@ -329,7 +311,7 @@ footer {
329311

330312
@media print, screen and (max-width: 480px) {
331313
header ul li.download {
332-
display:none;
314+
display: none;
333315
}
334316

335317
footer {
@@ -343,8 +325,8 @@ footer {
343325

344326
@media print {
345327
body {
346-
padding:0.4in;
347-
font-size:12pt;
348-
color:#444;
328+
padding: 0.4in;
329+
font-size: 12pt;
330+
color: #444;
349331
}
350332
}

docs/dist/input-spinner.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
this.$el.on({
3232
'focus.spinner': (function(e) {
3333
e.preventDefault();
34-
$(document).trigger('mouseup.spinner');
34+
$(this.$el).trigger('mouseup.spinner');
3535
this.oldValue = this.value();
3636
}).bind(this),
3737
'change.spinner': (function(e) {
@@ -144,12 +144,8 @@
144144

145145
this.$el
146146
.on('click.spinner', '[data-spin="up"], [data-spin="down"]', this.spin.bind(this))
147-
.on('mousedown.spinner', '[data-spin="up"], [data-spin="down"]', this.spin.bind(this));
148-
149-
$(document).on('mouseup.spinner', (function() {
150-
clearTimeout(this.spinTimeout);
151-
clearInterval(this.spinInterval);
152-
}).bind(this));
147+
.on('mousedown.spinner', '[data-spin="up"], [data-spin="down"]', this.spin.bind(this))
148+
.on('mouseup.spinner', '[data-spin="up"], [data-spin="down"]', this.spin.bind(this));
153149

154150
if (options.delay) {
155151
this.delay(options.delay);
@@ -182,6 +178,10 @@
182178
this.spinTimeout = setTimeout(this.beginSpin.bind(this, dir), 300);
183179
}
184180
break;
181+
case 'mouseup':
182+
clearTimeout(this.spinTimeout);
183+
clearInterval(this.spinInterval);
184+
break;
185185
}
186186
},
187187

docs/dist/input-spinner.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/example.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<title>Input Spinner - Example</title>
77

8-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.css">
9-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css">
8+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.css">
9+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.1/css/all.css">
1010
<link rel="stylesheet" href="dist/input-spinner.css">
1111

1212
<script src="https://code.jquery.com/jquery-3.5.1.slim.js"></script>
13-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.js"></script>
13+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.js"></script>
1414
<script src="dist/input-spinner.js"></script>
1515
<script>
1616
document.addEventListener('DOMContentLoaded', function() {

docs/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<title>Input Spinner</title>
77

8-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.css">
9-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css">
8+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.css">
9+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.1/css/all.css">
1010
<link rel="stylesheet" href="dist/input-spinner.css">
1111
<link rel="stylesheet" href="assets/css/old.css">
1212
<link rel="stylesheet" href="assets/css/docs.css">
1313

1414
<script src="https://code.jquery.com/jquery-3.5.1.slim.js"></script>
15-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.js"></script>
16-
<script src="dist/input-spinner.min.js"></script>
15+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.js"></script>
16+
<script src="dist/input-spinner.js"></script>
1717
<script>
1818
document.addEventListener('DOMContentLoaded', function() {
1919
$('#customize-spinner').spinner('changed', function(event, newVal, oldVal) {
@@ -42,10 +42,10 @@
4242
<h1 class="header">Input Spinner</h1>
4343
<p class="header">A Number-Spinner, Support keyboard operations and continuous changing.</p>
4444

45-
<a class="btn btn-primary" href="https://github.com/vsn4ik/input-spinner/archive/master.zip"><i class="fas fa-download fa-lg"></i>&nbsp;Download</a>
46-
<br>
47-
<br>
48-
<a class="btn btn-secondary" href="https://github.com/vsn4ik/input-spinner/"><i class="fab fa-github fa-lg"></i>&nbsp;View On GitHub</a>
45+
<div class="d-flex flex-wrap gap-2">
46+
<a class="btn btn-primary" href="https://github.com/vsn4ik/input-spinner/archive/master.zip"><i class="fas fa-download fa-lg"></i>&nbsp;Download</a>
47+
<a class="btn btn-secondary" href="https://github.com/vsn4ik/input-spinner/"><i class="fab fa-github fa-lg"></i>&nbsp;View On GitHub</a>
48+
</div>
4949
</header>
5050

5151
<section>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"less": "^3.12.2",
4949
"puppeteer": "^5.2.1",
5050
"qunit": "^2.10.1",
51-
"terser": "^5.0.0",
52-
"serve": "^11.3.2"
51+
"serve": "^11.3.2",
52+
"terser": "^5.0.0"
5353
}
5454
}

0 commit comments

Comments
 (0)