-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
134 lines (125 loc) · 7.06 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
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chat - iCodeThis.com</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;1,100;1,200&display=swap" rel="stylesheet">
<link href="styles.css" rel="stylesheet" media="all" type="text/css">
</head>
<body>
<br><br><br><br>
<div id="container">
<div class="wrapper">
<h1 id="h1">Take a quick tour
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24" stroke-width="1.5" stroke="#7d74e8" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<polyline points="6 9 12 15 18 9" />
</svg>
</h1>
Here are a few steps to help you hit the ground.<br>
<br>
<div class="progressWrapper">
<span class="number" id="progressValue">40%</span>
<span class="progress" id="progress">
<span id="number"> </span>
</span>
</div>
</div>
<hr>
<div class="wrapper">
<div class="checkbox-wrapper-31">
<input checked="checked" type="checkbox" id="input1" onclick="updateWidth()">
<svg viewBox="0 0 35.6 35.6">
<circle class="background" cx="17.8" cy="17.8" r="17.8"></circle>
<circle class="stroke" cx="17.8" cy="17.8" r="14.37"></circle>
<polyline class="check" points="11.78 18.12 15.55 22.23 25.17 12.87"></polyline>
</svg>
</div>
<label for="input1">Experience contextual conversations</label>
<br><br>
<div aria-checked="" class="checkbox-wrapper-31">
<input checked="checked" type="checkbox" id="input2" onclick="updateWidth()">
<svg viewBox="0 0 35.6 35.6">
<circle class="background" cx="17.8" cy="17.8" r="17.8"></circle>
<circle class="stroke" cx="17.8" cy="17.8" r="14.37"></circle>
<polyline class="check" points="11.78 18.12 15.55 22.23 25.17 12.87"></polyline>
</svg>
</div>
<label for="input2">Brand your customer experience</label>
<br><br>
<div aria-checked="" class="checkbox-wrapper-31">
<input type="checkbox" id="input3" onclick="updateWidth()">
<svg viewBox="0 0 35.6 35.6">
<circle class="background" cx="17.8" cy="17.8" r="17.8"></circle>
<circle class="stroke" cx="17.8" cy="17.8" r="14.37"></circle>
<polyline class="check" points="11.78 18.12 15.55 22.23 25.17 12.87"></polyline>
</svg>
</div>
<label for="input3">Offer support beyond your website</label>
<br><br>
<div aria-checked="" class="checkbox-wrapper-31">
<input type="checkbox" id="input4" onclick="updateWidth()">
<svg viewBox="0 0 35.6 35.6">
<circle class="background" cx="17.8" cy="17.8" r="17.8"></circle>
<circle class="stroke" cx="17.8" cy="17.8" r="14.37"></circle>
<polyline class="check" points="11.78 18.12 15.55 22.23 25.17 12.87"></polyline>
</svg>
</div>
<label for="input4">Top customer support with bots</label>
<br><br>
<div aria-checked="" class="checkbox-wrapper-31">
<input type="checkbox" id="input5" onclick="updateWidth()">
<svg viewBox="0 0 35.6 35.6">
<circle class="background" cx="17.8" cy="17.8" r="17.8"></circle>
<circle class="stroke" cx="17.8" cy="17.8" r="14.37"></circle>
<polyline class="check" points="11.78 18.12 15.55 22.23 25.17 12.87"></polyline>
</svg>
</div>
<label for="input5">Build your team</label>
<br><br><br>
<a href="#">Skip this</a>
<script>
function updateWidth() {
var totalCheckBoxes = document.querySelectorAll('input[type="checkbox"]').length;
var newWidth = document.querySelectorAll('input[type="checkbox"]:checked').length * (100 / totalCheckBoxes);
let currentWidth = parseFloat(document.getElementById("progressValue").innerHTML.slice(0,-1));
document.getElementById("number").style.width = newWidth + '%';
animateValue("progressValue", currentWidth, newWidth, 900);
document.getElementById("progressValue").innerText = newWidth + '%';
document.getElementById("services").innerText = document.querySelectorAll('input[type="checkbox"]:checked').length;
}
function animateValue(target, start, end, duration) {
let range = end - start;
let current = start;
let increment = end > start? 1 : -1;
let stepTime = Math.abs(Math.floor(duration / range));
let obj = document.getElementById(target);
let timer = setInterval(function() {
current += increment;
obj.innerHTML = current + '%';
if (current == end) clearInterval(timer);
}, stepTime);
if(end > 90) {
document.getElementById('number').style.background = '#7d74e8';
document.getElementById('progressValue').style.color = '#7d74e8';
document.getElementById('h1').style.color = '#7d74e8';
}
else if (end < 90) {
document.getElementById('number').style.background = 'black';
document.getElementById('progressValue').style.color = 'black';
document.getElementById('h1').style.color = 'black';
}
}
</script>
</div>
</div>
</div>
<div id="button">
<button>Get started <span id="services">2</span></button>
</div>
</body>
</html>