Skip to content

Commit a32fd4d

Browse files
committed
feat(index.html): add custom color picker
closes #67
1 parent 99c895e commit a32fd4d

File tree

1 file changed

+16
-37
lines changed

1 file changed

+16
-37
lines changed

index.html

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<link rel="stylesheet" href="./src/style.css" />
4646

4747
<!-- favicon -->
48-
<link rel="shortcut icon" href="./assets/Favicon.png" type="image/x-icon">
48+
<link rel="shortcut icon" href="./assets/Favicon.png" type="image/x-icon" />
4949

5050
<!-- Font -->
5151
<link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -55,7 +55,16 @@
5555
rel="stylesheet"
5656
/>
5757

58+
<!-- Color Picker CSS -->
59+
<link
60+
rel="stylesheet"
61+
href="https://cdn.jsdelivr.net/gh/mdbassit/Coloris@latest/dist/coloris.min.css"
62+
/>
63+
5864
<!-- Scripts -->
65+
<!-- Color Picker JS -->
66+
<script src="https://cdn.jsdelivr.net/gh/mdbassit/Coloris@latest/dist/coloris.min.js"></script>
67+
<!-- Icon Js -->
5968
<script src="https://code.iconify.design/iconify-icon/1.0.0/iconify-icon.min.js"></script>
6069
<script type="module" src="./src/main.ts" defer></script>
6170

@@ -157,24 +166,14 @@ <h1 id="head">Code Magic</h1>
157166

158167
<div class="colors">
159168
<label for="color" class="color">
160-
<input
161-
type="color"
162-
value="#000"
163-
id="gradient-text-color1"
164-
class="gradient-text-inputs"
165-
/>
169+
<input type="text" data-coloris id="gradient-text-color1" />
166170
<span>First Color</span>
167171
</label>
168172

169173
<div class="preview" id="gradient-text-color-preview"></div>
170174

171175
<label for="color" class="color">
172-
<input
173-
type="color"
174-
value="#000"
175-
id="gradient-text-color2"
176-
class="gradient-text-inputs"
177-
/>
176+
<input type="text" data-coloris id="gradient-text-color2" />
178177
<span>Second Color</span>
179178
</label>
180179
</div>
@@ -199,24 +198,14 @@ <h1 id="head">Code Magic</h1>
199198
<div data-content="gradient-border">
200199
<div class="colors">
201200
<label for="color" class="color">
202-
<input
203-
type="color"
204-
value="#000"
205-
id="gradient-border-color1"
206-
class="gradient-border-inputs"
207-
/>
201+
<input type="text" data-coloris id="gradient-border-color1" />
208202
<span>First Color</span>
209203
</label>
210204

211205
<div class="preview" id="gradient-border-color-preview"></div>
212206

213207
<label for="color" class="color">
214-
<input
215-
type="color"
216-
value="#000"
217-
id="gradient-border-color2"
218-
class="gradient-border-inputs"
219-
/>
208+
<input type="text" data-coloris id="gradient-border-color2" />
220209
<span>Second Color</span>
221210
</label>
222211
</div>
@@ -257,24 +246,14 @@ <h1 id="head">Code Magic</h1>
257246
<div data-content="gradient-background">
258247
<div class="colors">
259248
<label for="color" class="color">
260-
<input
261-
type="color"
262-
value="#000"
263-
id="gradient-background-color1"
264-
class="gradient-background-inputs"
265-
/>
249+
<input type="text" data-coloris id="gradient-background-color1" />
266250
<span>First Color</span>
267251
</label>
268252

269253
<div class="preview" id="gradient-background-color-preview"></div>
270254

271255
<label for="color" class="color">
272-
<input
273-
type="color"
274-
value="#000"
275-
id="gradient-background-color2"
276-
class="gradient-background-inputs"
277-
/>
256+
<input type="text" data-coloris id="gradient-background-color2" />
278257
<span>Second Color</span>
279258
</label>
280259
</div>

0 commit comments

Comments
 (0)