File size: 9,344 Bytes
365562b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f598023
 
 
 
 
 
 
 
 
 
 
 
 
365562b
 
 
 
f598023
 
 
 
 
 
 
 
 
 
 
 
365562b
f598023
 
 
 
 
 
 
365562b
f598023
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365562b
f598023
 
 
365562b
f598023
 
 
 
 
365562b
f598023
 
365562b
f598023
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365562b
f598023
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365562b
f598023
365562b
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en" class="toggleMenu">

<head>
    <meta charSet="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link rel="preload" href="/_next/static/media/25e11f223a13018e-s.p.woff2" as="font" crossorigin="" type="font/woff2" />
    <link rel="preload" href="/_next/static/media/6905431624c34d00-s.p.woff2" as="font" crossorigin="" type="font/woff2" />
    <link rel="stylesheet" href="/_next/static/css/e4887d32fecac951.css" crossorigin="" data-precedence="next" />
    <link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-a5591398fe5534e2.js" crossorigin="" />
    <script src="/_next/static/chunks/fd9d1056-d7dd7ab1b204318c.js" async="" crossorigin=""></script>
    <script src="/_next/static/chunks/472-323e97dcd87f02be.js" async="" crossorigin=""></script>
    <script src="/_next/static/chunks/main-app-892c3dff08e9cd4c.js" async="" crossorigin=""></script>
    <script src="/_next/static/chunks/326-1870c15fd85c544e.js?dpl=dpl_J1tbkvrtzchrmWyLBiAfJW1Wv2FE" async=""></script>
    <script src="/_next/static/chunks/app/(user)/sign-up/page-30aefdb3500631cb.js?dpl=dpl_J1tbkvrtzchrmWyLBiAfJW1Wv2FE" async=""></script>
    <title>Techwave NextJs | Sign Out</title>
    <meta property="og:title" content="Sign Out" />
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:title" content="Sign Out" />
    <link rel="icon" href="/favicon.ico" type="image/x-icon" sizes="16x16" />
    <meta name="next-size-adjust" />
    <script src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js" crossorigin="" noModule=""></script>
</head>
<style>
    .input-div {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #7c5fe3;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 0px 0px 100px #7c5fe3 , inset 0px 0px 10px #7c5fe3,0px 0px 5px rgb(255, 255, 255);
  animation: flicker 2s linear infinite;
}

.icon {
  color: #7c5fe3;
  font-size: 2rem;
  cursor: pointer;
  animation: iconflicker 2s linear infinite;
}

.input2 {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer !important;
}

@keyframes flicker {
  0% {
    border: 2px solid #7c5fe3;
    box-shadow: 0px 0px 100px #7c5fe3 , inset 0px 0px 10px #7c5fe3,0px 0px 5px rgb(255, 255, 255);
  }

  5% {
    border: none;
    box-shadow: none;
  }

  10% {
    border: 2px solid #7c5fe3;
    box-shadow: 0px 0px 100px #7c5fe3 , inset 0px 0px 10px #7c5fe3,0px 0px 5px rgb(255, 255, 255);
  }

  25% {
    border: none;
    box-shadow: none;
  }

  30% {
    border: 2px solid #7c5fe3;
    box-shadow: 0px 0px 100px #7c5fe3 , inset 0px 0px 10px #7c5fe3,0px 0px 5px rgb(255, 255, 255);
  }

  100% {
    border: 2px solid #7c5fe3;
    box-shadow: 0px 0px 100px #7c5fe3 , inset 0px 0px 10px #7c5fe3,0px 0px 5px rgb(255, 255, 255);
  }
}

@keyframes iconflicker {
  0% {
    opacity: 1;
  }

  5% {
    opacity: 0.2;
  }

  10% {
    opacity: 1;
  }

  25% {
    opacity: 0.2;
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 1;
  }
}
</style>
<style>
  .error-message {
    color: red;
    border: 1px solid red;
    padding: 10px;
    list-style: none;
  }

  .success-message {
    color: green;
    border: 1px solid green;
    padding: 10px;
    list-style: none;
  }
</style>
<body>
    <!--$-->
    <div class="techwave_fn_sign">
      <div class="sign__content">
        <img src="desine/img/logo-desktop-full.png">
        <br>
        <h1 class="logo">Designed by Frenify</h1>
        <form class="signup" method="POST" action="/sign-up" onsubmit="return validateForm()" enctype="multipart/form-data">
            <div class="form__content">
              <h1 class="logo">Designed by Frenify</h1>
              <br>

              {% with messages = get_flashed_messages() %}
              {% if messages %}
                <ul>
                  {% for message in messages %}
                    {% if message == "Username is already taken. Please choose a different username." %}
                      <li class="error-message">{{ message }}</li>
                    {% elif message == "Failed to upload image to DataBase." %}
                      <li class="error-message">{{ message }}</li>
                    {% else %}
                      
                    {% endif %}
                  {% endfor %}
                </ul>
              {% endif %}
            {% endwith %}   
            <div class="form__username">
                <label for="first_name">First Name</label>
                <input type="text" class="input" id="first_name" name="first_name" placeholder="First Name" required />
            </div>
            <div class="form__username">
                <label for="last_name">Last Name</label>
                <input type="text" class="input" id="last_name" name="last_name" placeholder="Last Name" required />
            </div>
            <div class="form__username">
                <label for="username">Username</label>
                <input type="text" class="input" id="username" name="username" placeholder="Username" required />
            </div>
            <div class="form__pass">
                <label for="password">Password</label>
                <input type="password" id="password" name="password" autoComplete="current-password" spellCheck="false" placeholder="password" required />
            </div>
            <div class="form__confirm-pass">
                <label for="confirm_password">Confirm Password</label>
                <input type="password" id="confirm_password" name="confirm_password" autoComplete="current-password" spellCheck="false" placeholder="Confirm password" required />
            </div>
            <br>
            <div class="input-div">
                <input class="input2" type="file" id="profile_image" name="profile_image" required onchange="displayImageName()">
                <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" stroke-linejoin="round" stroke-linecap="round" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke="currentColor" class="icon"><polyline points="16 16 12 12 8 16"></polyline><line y2="21" x2="12" y1="12" x1="12"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>
              </div>
              <br>
              <p class="file-message" id="file-message">Please upload an image for your profile</p>
            <br>
            <div class="form__submit">
                <label class="fn__submit">
                    <input type="submit" name="submit" value="Create Account" />
                </label>
            </div>
            <div class="form__alternative ">
                <div class="fn__lined_text">
                </div>
            </div>
            
            <script>
function validateForm() {
var password = document.getElementById("password").value;
var confirm_password = document.getElementById("confirm_password").value;
var username = document.getElementById("username").value;
var passwordErrorMessage = document.createElement("p");
var usernameErrorMessage = document.createElement("p");

passwordErrorMessage.className = "error-message";
usernameErrorMessage.className = "error-message";

// Clear previous error messages
var errorMessages = document.querySelectorAll(".error-message");
errorMessages.forEach(function(message) {
    message.remove();
});

// Password validation
if (password.length < 8 || !/[A-Z]/.test(password)) {
    passwordErrorMessage.innerHTML = "Password must be at least 8 characters long and contain at least one capital letter.";
    var passwordField = document.getElementById("password");
    passwordField.insertAdjacentElement("afterend", passwordErrorMessage);
    return false;
}

if (password !== confirm_password) {
    var confirmPassField = document.getElementById("confirm_password");
    var confirmErrorMessage = document.createElement("p");
    confirmErrorMessage.className = "error-message";
    confirmErrorMessage.innerHTML = "Passwords do not match.";
    confirmPassField.insertAdjacentElement("afterend", confirmErrorMessage);
    return false;
}

// Username validation
if (username.length < 6 || /[A-Z]/.test(username) || /[^a-z0-9]/.test(username)) {
    usernameErrorMessage.innerHTML = "Username must be at least 6 characters long, contain no capital letters, and contain no special symbols.";
    var usernameField = document.getElementById("username");
    usernameField.insertAdjacentElement("afterend", usernameErrorMessage);
    return false;
}

return true;
}

function displayImageName() {
var input = document.getElementById('profile_image');
var fileMessage = document.getElementById('file-message');

if (input.files && input.files[0]) {
    fileMessage.innerText = "Uploaded file: " + input.files[0].name;
} else {
    fileMessage.innerText = "Please upload an image for your profile";
}
}
            </script>              <div class="sign__desc">

                <p>Already have an account? <a href="/login">Sign In</a></p>
            </div>
        </div>
    </div>
    <!--/$-->
    <script src="/_next/static/chunks/webpack-a5591398fe5534e2.js" crossorigin="" async=""></script>
</body>

</html>