forked from Pranesh1221/Masai-MyNetDiary-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup1.html
265 lines (242 loc) · 10.1 KB
/
signup1.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!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">
<link rel="shortcut icon" href="https://www.mynetdiary.com/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<title>Sign Up - MyNetDiary</title>
<style>
body {
background: #F4F0ED;
background-size: 100% 100%;
}
#su-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
height: 100vh;
background: #069D42;
background-image: url("https://www.mynetdiary.com/images/bg-start-signup@1x.png");
background-repeat: no-repeat;
border-bottom-left-radius: 50% 20px;
border-bottom-right-radius: 50% 20px;
}
.second-heading{
color: #268FD0;
}
#second {
display: flex;
flex-direction: column;
align-items: center;
background: white;
height: 80%;
width: 70%;
height: 100%;
border-radius: 30px;
gap: 10px;
}
#third {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: nowrap;
width: 100%;
height: 100px;
background: #F4F0ED;
}
#third>p {
display: flex;
gap: 10px;
}
#TellUs {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
}
#TellUs>h4 {
font-size: 2rem;
}
#info {
width: 40%;
text-align: left;
display: flex;
flex-direction: column;
gap: 50px;
}
.input-field {
display: flex;
flex-direction: column;
}
.w-input {
border: none;
border-bottom: 1px solid gray;
background-color: transparent;
resize: none;
outline: none;
width: 90%;
}
#w-input-outer {
display: inline;
}
#next-button {
width: 15%;
}
#lose-banner{
display: none;
gap: 10px;
margin: 10px;
width: 40%;
align-items: center;
justify-content: center;
height: 40px;
padding: auto;
border: 1px dashed green;
border-radius: 10px;
}
@media only screen and (max-width: 1366px) {
.w-input {
width: 90%;
}
}
@media only screen and (max-width: 900px) {
.w-input {
width: 80%;
}
}
@media only screen and (max-width: 767px) {
.w-input {
width: 70%;
}
}
</style>
</head>
<body>
<div id="su-container">
<div id="first">
<img data-src="https://s3.amazonaws.com/img.mynetdiary.com/images/logo-dark.svg" alt="MyNetDiary"
width="300" class="img-fluid w-100 ls-is-cached lazyloaded"
src="https://s3.amazonaws.com/img.mynetdiary.com/images/logo-dark.svg">
</div>
<div id="second">
<div id="TellUs">
<h4 class="second-heading">Sign Up: Your Weight plan</h4>
</div>
<div id="info">
<div class="input-field" id="weight-current">
<label style="font-size: small;" for="">How much do you weigh?</label>
<div id="w-input-outer">
<input class="w-input" id="cur" type="number" placeholder="">
<label id="weight1">lb</label>
</div>
</div>
<div class="input-field" id="weight-target">
<label style="font-size: small;" for="">What is your target weight?</label>
<div id="w-input-outer">
<input class="w-input" id="tar" type="number" placeholder="">
<label id="weight2" for="">lb</label>
</div>
</div>
<a href="#" onclick="changeUnit()">Switch to metric units (kg, cm)</a>
<div class="input-field" id="weight-target">
<label style="font-size: small;" for="">Your desired progress</label>
<div id="onelb">
<input class="jss550" name="radioDiallog" type="radio" value="0" checked="">
<label for="onelb">Lose 1 lb/week</label>
</div>
<div id="oneandhalflb">
<input class="jss550" name="radioDiallog" type="radio" value="0" checked="">
<label for="oneandhalflb">Lose 1½ lb/week</label>
</div>
<div id="twolb">
<input class="jss550" name="radioDiallog" type="radio" value="0" checked="">
<label for="twolb">Lose 2 lbs/week</label>
</div>
</div>
</div>
<div id="lose-banner" style="color: rgb(70, 97, 138);"><svg width="33px" height="26px"
viewBox="0 0 33 26">
<path fill-rule="evenodd" fill="#0bb850"
d="M32.348,3.680 L14.068,24.215 C13.712,24.558 13.265,24.754 12.803,24.818 C11.969,25.170 10.962,25.022 10.279,24.364 L1.636,16.769 C0.747,15.912 0.747,14.523 1.636,13.666 C2.526,12.810 3.968,12.810 4.857,13.666 L11.993,19.937 L29.181,0.628 C30.055,-0.214 31.473,-0.214 32.348,0.628 C33.222,1.471 33.222,2.837 32.348,3.680 Z">
</path>
</svg>Losing 10 lb by Nov 19!</div>
<button type="button" id="next-button" class="btn btn-info" onclick="showlogin()">Next</button>
</div>
</div>
<div id="third">
<p class="_terms">By signing up, you are agreeing to the <br class="d-block d-sm-none"><a href="/terms.html"
target="_blank" class="text-underline">Terms of Service</a></p>
</div>
<script>
var res = document.querySelectorAll(".jss550")
res.forEach(ele=>{
ele.addEventListener("change", ()=>{
fun()
})
})
document.querySelector("#tar").addEventListener("keyup", ()=>{
fun()
})
function fun(){
var cur = document.getElementById("weight1").innerText
var tar = document.getElementById("weight2").innerText
var curVal = document.querySelector("#cur").value
var tarVal = document.querySelector("#tar").value
document.getElementById("lose-banner").style.display = "none"
document.getElementById("lose-banner").style.display = "flex"
var onelb = document.querySelector("#onelb > input").checked
var twolb = document.querySelector("#oneandhalflb > input").checked
var threelb = document.querySelector("#twolb > input").checked
var measure = 0;
if(onelb)
{
measure = 1;
}
else if(twolb)
{
measure = 1.5;
}
else if(threelb)
{
measure = 2;
}
totalWeeks = (Number(curVal)-Number(tarVal))/measure
document.getElementById("lose-banner").innerHTML = `<svg width="33px" height="26px"
viewBox="0 0 33 26">
<path fill-rule="evenodd" fill="#0bb850"
d="M32.348,3.680 L14.068,24.215 C13.712,24.558 13.265,24.754 12.803,24.818 C11.969,25.170 10.962,25.022 10.279,24.364 L1.636,16.769 C0.747,15.912 0.747,14.523 1.636,13.666 C2.526,12.810 3.968,12.810 4.857,13.666 L11.993,19.937 L29.181,0.628 C30.055,-0.214 31.473,-0.214 32.348,0.628 C33.222,1.471 33.222,2.837 32.348,3.680 Z">
</path>
</svg>Losing ${Number(curVal)-Number(tarVal)} ${cur} in ${Math.round(totalWeeks)} Weeks`
}
function showlogin(){
location = "signup.html"
}
function changeUnit() {
var unit = document.getElementById("weight1").innerText
if (unit == "lb") {
document.getElementById("weight1").innerText = "kg"
document.getElementById("weight2").innerText = "kg"
document.querySelector("#onelb > label").innerText = "Lose 1 kg/week"
document.querySelector("#oneandhalflb > label").innerText = "Lose 1½ kg/week"
document.querySelector("#twolb > label").innerText = "Lose 2 kg/week"
fun()
}
else {
document.getElementById("weight1").innerText = "lb"
document.getElementById("weight2").innerText = "lb"
document.querySelector("#onelb > label").innerText = "Lose 1 lb/week"
document.querySelector("#oneandhalflb > label").innerText = "Lose 1½ lb/week"
document.querySelector("#twolb > label").innerText = "Lose 2 lbs/week"
fun();
}
}
</script>
</body>
</html>