-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.html
122 lines (97 loc) · 2.56 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Easy Number Separator</title>
<link href="https://fonts.googleapis.com/css?family=Cairo&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Fredoka+One&display=swap" rel="stylesheet" />
<style>
body {
background: #eee;
font-family: 'Cairo', sans-serif;
}
#main {
margin: 0 auto;
display: block;
padding: 0 20px;
text-align: center;
}
h1 {
font-family: 'Fredoka One', cursive;
font-weight: 100;
}
input[type='text'] {
margin: 0 auto;
padding: 15px;
border-radius: 5px;
border: 1px solid #bbb;
font-size: 36px;
display: block;
text-align: center;
font-family: 'Cairo', sans-serif;
}
input[type='text']::placeholder {
color: #ccc;
}
span {
background: darkorange;
color: #fff;
border-radius: 3px;
padding: 0 5px;
}
a {
text-decoration: none;
background: #ccc;
border-radius: 3px;
padding: 0 5px;
color: #333;
opacity: 0.8;
}
a:hover {
opacity: 1;
}
#result_input {
font-size: 14px;
padding: .5rem;
}
code {
background: lightblue;
border-radius: 3px;
padding: .2rem .5rem;
}
</style>
</head>
<body>
<div id="main">
<h1>Easy Number Separator</h1>
<input type="text" class="number-separator" placeholder="Enter Your Number..." />
<p>
It helps you to separate numbers when entered in a input text.
<br />
Just call <code>easyNumberSeparator()</code> function and pass your class input to this.
:)
</p>
<p>
If you want to send data to the server, you can set a result input by <code>resultInput</code> property and hold
the original value.
</p>
<input type="text" id="result_input" name="">
<br />
<br />
<a href="https://github.com/amiryxe/easy-number-separator/" target="_blank">View Guide and download</a>
<a href="https://github.com/amiryxe/" target="_blank">amiryxe Github</a>
</div>
<script src="easy-number-separator.js"></script>
<script>
easyNumberSeparator({
selector: '.number-separator',
separator: ',',
decimalSeparator: '.',
resultInput: '#result_input',
})
</script>
</body>
</html>