Initial commit
This commit is contained in:
BIN
public/images/hoodie1.png
Normal file
BIN
public/images/hoodie1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 199 KiB |
BIN
public/images/hoodie2.png
Normal file
BIN
public/images/hoodie2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 406 KiB |
20
public/index.html
Normal file
20
public/index.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Wraffle - Premium hoodies for every style and occasion"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<title>Wraffle Ecommerce</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
25
public/manifest.json
Normal file
25
public/manifest.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"short_name": "Wraffle",
|
||||
"name": "Wraffle Ecommerce",
|
||||
"icons": [
|
||||
{
|
||||
"src": "wraffle_logo.png",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "wraffle_logo.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "wraffle_logo.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#FFB400",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
181
public/verify-email.css
Normal file
181
public/verify-email.css
Normal file
@@ -0,0 +1,181 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Arial', sans-serif;
|
||||
background: linear-gradient(135deg, #000000 0%, #333333 100%);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.verify-container {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.verify-card {
|
||||
background: #000000;
|
||||
border: 2px solid #FFB400;
|
||||
border-radius: 15px;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
|
||||
}
|
||||
|
||||
/* Hidden class */
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Verifying state */
|
||||
.verifying {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.verifying h2 {
|
||||
color: #FFD700;
|
||||
margin-bottom: 20px;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Spinner */
|
||||
.spinner {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 4px solid #333333;
|
||||
border-top: 4px solid #FFD700;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Success state */
|
||||
.success h2 {
|
||||
color: #FFD700;
|
||||
margin-bottom: 20px;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.success p {
|
||||
color: #ffffff;
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.redirect-message {
|
||||
color: #FFD700 !important;
|
||||
font-weight: bold;
|
||||
margin-bottom: 30px !important;
|
||||
}
|
||||
|
||||
/* Success icon */
|
||||
.success-icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background: #FFD700;
|
||||
color: #000000;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 2.5rem;
|
||||
font-weight: bold;
|
||||
margin: 0 auto 20px;
|
||||
box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
|
||||
}
|
||||
|
||||
/* Error state */
|
||||
.error h2 {
|
||||
color: #ff4444;
|
||||
margin-bottom: 20px;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.error p {
|
||||
color: #ffffff;
|
||||
margin-bottom: 20px;
|
||||
font-size: 1.1rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Error icon */
|
||||
.error-icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background: #ff4444;
|
||||
color: #ffffff;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 2.5rem;
|
||||
font-weight: bold;
|
||||
margin: 0 auto 20px;
|
||||
box-shadow: 0 5px 15px rgba(255, 68, 68, 0.4);
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.home-btn, .retry-btn {
|
||||
background: #FFD700;
|
||||
color: #000000;
|
||||
border: none;
|
||||
padding: 12px 30px;
|
||||
border-radius: 8px;
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.home-btn:hover, .retry-btn:hover {
|
||||
background: #ffed4e;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
|
||||
}
|
||||
|
||||
.retry-btn {
|
||||
background: #ff4444;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.retry-btn:hover {
|
||||
background: #ff6666;
|
||||
box-shadow: 0 5px 15px rgba(255, 102, 102, 0.4);
|
||||
}
|
||||
|
||||
/* Responsive design */
|
||||
@media (max-width: 768px) {
|
||||
.verify-card {
|
||||
padding: 30px 20px;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.verifying h2, .success h2, .error h2 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.success p, .error p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.home-btn, .retry-btn {
|
||||
padding: 10px 25px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
103
public/verify-email.html
Normal file
103
public/verify-email.html
Normal file
@@ -0,0 +1,103 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Email Verification - Wraffle</title>
|
||||
<link rel="stylesheet" href="verify-email.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="verify-container">
|
||||
<div class="verify-card">
|
||||
<div id="verifying" class="verifying">
|
||||
<div class="spinner"></div>
|
||||
<h2>Verifying your email...</h2>
|
||||
</div>
|
||||
|
||||
<div id="success" class="success hidden">
|
||||
<div class="success-icon">✓</div>
|
||||
<h2>Email Verified Successfully!</h2>
|
||||
<p>Your email has been verified. You can now access all features of your account.</p>
|
||||
<p class="redirect-message">Redirecting to home page in <span id="countdown">10</span> seconds...</p>
|
||||
<button class="home-btn" onclick="goHome()">Go to Home Now</button>
|
||||
</div>
|
||||
|
||||
<div id="error" class="error hidden">
|
||||
<div class="error-icon">✕</div>
|
||||
<h2>Verification Failed</h2>
|
||||
<p id="error-message">Verification failed</p>
|
||||
<p class="redirect-message">Redirecting to login page in <span id="countdown-error">10</span> seconds...</p>
|
||||
<button class="retry-btn" onclick="goLogin()">Back to Login</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const token = urlParams.get('token');
|
||||
let countdownInterval;
|
||||
|
||||
async function verifyEmail() {
|
||||
if (!token) {
|
||||
showError('No verification token provided');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`http://172.232.124.96:5370/api/auth/verify-email?token=${token}`);
|
||||
const data = await response.json();
|
||||
|
||||
if (response.ok) {
|
||||
showSuccess();
|
||||
} else {
|
||||
showError(data.message || 'Verification failed');
|
||||
}
|
||||
} catch (error) {
|
||||
showError('Network error occurred');
|
||||
}
|
||||
}
|
||||
|
||||
function showSuccess() {
|
||||
document.getElementById('verifying').classList.add('hidden');
|
||||
document.getElementById('success').classList.remove('hidden');
|
||||
startCountdown('countdown', () => window.location.href = '/');
|
||||
}
|
||||
|
||||
function showError(message) {
|
||||
document.getElementById('verifying').classList.add('hidden');
|
||||
document.getElementById('error').classList.remove('hidden');
|
||||
document.getElementById('error-message').textContent = message;
|
||||
startCountdown('countdown-error', () => window.location.href = '/login');
|
||||
}
|
||||
|
||||
function startCountdown(elementId, callback) {
|
||||
let timeLeft = 10;
|
||||
const countdownElement = document.getElementById(elementId);
|
||||
countdownElement.textContent = timeLeft;
|
||||
|
||||
countdownInterval = setInterval(() => {
|
||||
timeLeft--;
|
||||
countdownElement.textContent = timeLeft;
|
||||
|
||||
if (timeLeft <= 0) {
|
||||
clearInterval(countdownInterval);
|
||||
callback();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function goHome() {
|
||||
clearInterval(countdownInterval);
|
||||
window.location.href = '/';
|
||||
}
|
||||
|
||||
function goLogin() {
|
||||
clearInterval(countdownInterval);
|
||||
window.location.href = '/login';
|
||||
}
|
||||
|
||||
// Start verification on page load
|
||||
verifyEmail();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
public/wraffle_logo.png
Normal file
BIN
public/wraffle_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 495 KiB |
Reference in New Issue
Block a user