generated from github/codespaces-blank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.html
165 lines (137 loc) · 3.45 KB
/
examples.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Coloris examples</title>
<link rel="stylesheet" type="text/css" href="coloris.min.css">
<style type="text/css">
@import url(https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap);
body {
height: 120vh;
margin: 30px;
color: #444;
background-color: #fff;
font-family: 'Lato', sans-serif;
}
h1 {
margin-bottom: 1.5em;
}
input {
width: 150px;
height: 32px;
padding: 0 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-family: inherit;
font-size: inherit;
font-weight: inherit;
box-sizing: border-box;
}
.examples {
display: flex;
flex-wrap: wrap;
}
.example {
flex-shrink: 0;
width: 300px;
margin-bottom: 30px;
}
.square .clr-field button,
.circle .clr-field button {
width: 22px;
height: 22px;
left: 5px;
right: auto;
border-radius: 5px;
}
.square .clr-field input,
.circle .clr-field input {
padding-left: 36px;
}
.circle .clr-field button {
border-radius: 5px;
}
.full .clr-field button {
width: 10%;
height: 100%;
border-radius: 5px;
}
</style>
</head>
<body>
<a href="https://github.com/mdbassit/Coloris">View <b>Coloris</b> on GitHub</a>
<h1>Coloris examples</h1>
<div class="examples">
<div class="example">
<p>Default color thumbnail</p>
<input type="text" value="green" data-coloris>
</div>
<div class="example square">
<p>Rounded square thumbnail</p>
<input type="text" class="coloris instance1" value="rgb(255, 0, 0)">
</div>
<div class="example circle">
<p>Circular thumbnail</p>
<input type="text" class="coloris instance2" value="blue">
</div>
<div class="example full">
<p>Full size thumbnail</p>
<input type="text" class="coloris instance3" value="#ffcc00">
</div>
<div class="example square" style="position: relative; top: 300px; padding-bottom: 30px;">
<p>The dialog will appear on top of this field for lack of space under it.</p>
<input type="text" class="coloris" value="#00a5cc">
</div>
</div>
<script type="text/javascript" src="coloris.min.js"></script>
<script type="text/javascript">
/** Default configuration **/
Coloris({
el: '.coloris',
swatches: [
'#264653',
'#2a9d8f',
'#e9c46a',
'#f4a261',
'#e76f51',
'#d62828',
]
});
/** Instances **/
Coloris.setInstance('.instance1', {
theme: 'pill',
themeMode: 'dark',
formatToggle: true,
closeButton: true,
clearButton: true,
swatches: [
'#067bc2',
'#84bcda',
'#80e377',
'#ecc30b',
'#f37748',
'#d56062'
]
});
Coloris.setInstance('.instance2', { theme: 'polaroid',
themeMode: 'dark',
alpha: false,
margin: 100,
swatches: [
'#067bc2',
'#84bcda',
'#80e377',
'#ecc30b',
'#f37748',
'#d56062',
],
formatToggle: true,
});
Coloris.setInstance('.instance3', {
theme: 'polaroid',
swatchesOnly: true
});
</script>
</body>
</html>