TenderRadar website with CSS fixes
- Fixed footer logo contrast (dark → white on dark background) - Fixed avatar sizing and gradient contrasts - Fixed testimonial layout with flexbox - Fixed signup form contrast and LastPass icon overlap - Added responsive company logos section - Fixed FAQ accordion CSS - All CSS improvements for WCAG compliance
This commit is contained in:
478
login.html
Normal file
478
login.html
Normal file
@@ -0,0 +1,478 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Sign in to TenderRadar - AI-powered UK public sector tender intelligence">
|
||||
<title>Sign In | TenderRadar</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=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<link rel="stylesheet" href="tenderradar-fixes.css">
|
||||
<style>
|
||||
.auth-page {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.auth-container {
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.auth-card {
|
||||
background: white;
|
||||
border-radius: 0.75rem;
|
||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid var(--border);
|
||||
padding: 2.5rem;
|
||||
max-width: 420px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.auth-header {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.auth-header .logo-icon {
|
||||
height: 50px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.auth-header h1 {
|
||||
font-size: 1.875rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.auth-header p {
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-primary);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.form-group input {
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5rem;
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-size: 0.9375rem;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.form-group input:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
|
||||
}
|
||||
|
||||
.password-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.password-group input {
|
||||
padding-right: 2.75rem;
|
||||
}
|
||||
|
||||
.password-toggle {
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
margin-top: 0.5rem;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
color: var(--text-secondary);
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
|
||||
.password-toggle:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.form-header-with-link {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.form-header-with-link label {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.forgot-password {
|
||||
font-size: 0.8125rem;
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.forgot-password:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #dc2626;
|
||||
font-size: 0.875rem;
|
||||
margin-top: 0.25rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.error.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.form-group.error-state input {
|
||||
border-color: #dc2626;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.auth-footer {
|
||||
text-align: center;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.auth-footer p {
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.auth-footer a {
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.auth-footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.success-message {
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
padding: 0.875rem;
|
||||
border-radius: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
min-height: 2.5rem;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
||||
}
|
||||
|
||||
.success-message.show {
|
||||
background: #ecfdf5;
|
||||
color: #065f46;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
padding: 0.875rem;
|
||||
border-radius: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
min-height: 2.5rem;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
||||
}
|
||||
|
||||
.error-message.show {
|
||||
background: #fef2f2;
|
||||
color: #7f1d1d;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.remember-me {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.625rem;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.remember-me input[type="checkbox"] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
cursor: pointer;
|
||||
accent-color: var(--primary);
|
||||
border: 2px solid var(--border);
|
||||
border-radius: 0.375rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.remember-me label {
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
font-size: 0.875rem;
|
||||
color: var(--text-secondary);
|
||||
user-select: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header/Navigation -->
|
||||
<header class="header">
|
||||
<nav class="nav container">
|
||||
<a href="/" class="nav-brand">
|
||||
<img src="/logo.png" alt="TenderRadar" class="logo-icon">
|
||||
</a>
|
||||
<ul class="nav-menu">
|
||||
<li><a href="/#features">Features</a></li>
|
||||
<li><a href="/#pricing">Pricing</a></li>
|
||||
<li><a href="signup.html" class="btn btn-outline btn-sm">Sign Up</a></li>
|
||||
</ul>
|
||||
<button class="mobile-toggle" aria-label="Toggle menu">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- Login Form -->
|
||||
<section class="auth-page">
|
||||
<div class="auth-container">
|
||||
<div class="auth-card">
|
||||
<div class="auth-header">
|
||||
<h1>Welcome Back</h1>
|
||||
<p>Sign in to your TenderRadar account</p>
|
||||
</div>
|
||||
|
||||
<div class="success-message" id="successMessage">
|
||||
Signing you in... Redirecting to dashboard...
|
||||
</div>
|
||||
|
||||
<div class="error-message" id="errorMessage"></div>
|
||||
|
||||
<form id="loginForm" class="login-form">
|
||||
<div class="form-group">
|
||||
<label for="email">Email Address *</label>
|
||||
<input type="email" id="email" name="email" placeholder="you@company.com" required>
|
||||
<div class="error" id="emailError"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group password-group">
|
||||
<div class="form-header-with-link">
|
||||
<label for="password">Password *</label>
|
||||
<a href="#" class="forgot-password" id="forgotPasswordLink">Forgot password?</a>
|
||||
</div>
|
||||
<input type="password" id="password" name="password" placeholder="Enter your password" required>
|
||||
<button type="button" class="password-toggle" id="togglePassword">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>
|
||||
<circle cx="12" cy="12" r="3"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="error" id="passwordError"></div>
|
||||
</div>
|
||||
|
||||
<div class="remember-me">
|
||||
<input type="checkbox" id="rememberMe" name="rememberMe">
|
||||
<label for="rememberMe">Remember me</label>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary submit-btn" id="submitBtn">Sign In</button>
|
||||
</form>
|
||||
|
||||
<div class="auth-footer">
|
||||
<p>Don't have an account? <a href="signup.html">Sign up here</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="footer-grid">
|
||||
<div class="footer-col">
|
||||
<div class="footer-brand">
|
||||
<img src="/logo.png" alt="TenderRadar" class="logo-icon">
|
||||
</div>
|
||||
<p class="footer-desc">AI-powered UK public sector tender intelligence platform</p>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>Product</h4>
|
||||
<ul>
|
||||
<li><a href="/#features">Features</a></li>
|
||||
<li><a href="/#pricing">Pricing</a></li>
|
||||
<li><a href="/#how-it-works">How It Works</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>Company</h4>
|
||||
<ul>
|
||||
<li><a href="/#about">About</a></li>
|
||||
<li><a href="/#contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-col">
|
||||
<h4>Legal</h4>
|
||||
<ul>
|
||||
<li><a href="/#privacy">Privacy Policy</a></li>
|
||||
<li><a href="/#terms">Terms of Service</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-bottom">
|
||||
<p>© 2025 TenderRadar. All rights reserved.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
const form = document.getElementById('loginForm');
|
||||
const submitBtn = document.getElementById('submitBtn');
|
||||
const errorMessage = document.getElementById('errorMessage');
|
||||
const successMessage = document.getElementById('successMessage');
|
||||
const forgotPasswordLink = document.getElementById('forgotPasswordLink');
|
||||
|
||||
// Password visibility toggle
|
||||
document.getElementById('togglePassword').addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
const input = document.getElementById('password');
|
||||
input.type = input.type === 'password' ? 'text' : 'password';
|
||||
});
|
||||
|
||||
// Forgot password placeholder
|
||||
forgotPasswordLink.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
alert('Password reset functionality coming soon. Please contact support at support@tenderradar.com');
|
||||
});
|
||||
|
||||
// Form validation
|
||||
function validateForm() {
|
||||
const errors = {};
|
||||
const email = document.getElementById('email').value.trim();
|
||||
const password = document.getElementById('password').value;
|
||||
|
||||
// Clear previous errors
|
||||
document.querySelectorAll('.form-group.error-state').forEach(el => {
|
||||
el.classList.remove('error-state');
|
||||
});
|
||||
document.querySelectorAll('.error').forEach(el => {
|
||||
el.classList.remove('show');
|
||||
el.textContent = '';
|
||||
});
|
||||
|
||||
if (!email) {
|
||||
errors.email = 'Email is required';
|
||||
} else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
|
||||
errors.email = 'Please enter a valid email address';
|
||||
}
|
||||
|
||||
if (!password) {
|
||||
errors.password = 'Password is required';
|
||||
}
|
||||
|
||||
// Display errors
|
||||
Object.keys(errors).forEach(field => {
|
||||
const errorEl = document.getElementById(field + 'Error');
|
||||
const formGroup = errorEl.closest('.form-group');
|
||||
formGroup.classList.add('error-state');
|
||||
errorEl.textContent = errors[field];
|
||||
errorEl.classList.add('show');
|
||||
});
|
||||
|
||||
return Object.keys(errors).length === 0;
|
||||
}
|
||||
|
||||
form.addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (!validateForm()) {
|
||||
return;
|
||||
}
|
||||
|
||||
errorMessage.classList.remove('show');
|
||||
errorMessage.textContent = '';
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.textContent = 'Signing in...';
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/auth/login', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
email: document.getElementById('email').value.trim(),
|
||||
password: document.getElementById('password').value
|
||||
})
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || 'Login failed');
|
||||
}
|
||||
|
||||
// Store token and user data
|
||||
localStorage.setItem('token', data.token);
|
||||
localStorage.setItem('user', JSON.stringify(data.user));
|
||||
|
||||
// Store remember me preference
|
||||
if (document.getElementById('rememberMe').checked) {
|
||||
localStorage.setItem('rememberMe', 'true');
|
||||
}
|
||||
|
||||
successMessage.classList.add('show');
|
||||
|
||||
setTimeout(() => {
|
||||
window.location.href = '/dashboard.html';
|
||||
}, 1500);
|
||||
|
||||
} catch (error) {
|
||||
errorMessage.textContent = error.message;
|
||||
errorMessage.classList.add('show');
|
||||
submitBtn.disabled = false;
|
||||
submitBtn.textContent = 'Sign In';
|
||||
}
|
||||
});
|
||||
|
||||
// Check if user was previously remembered
|
||||
window.addEventListener('load', function() {
|
||||
if (localStorage.getItem('rememberMe') === 'true') {
|
||||
const user = JSON.parse(localStorage.getItem('user'));
|
||||
if (user && user.email) {
|
||||
document.getElementById('email').value = user.email;
|
||||
document.getElementById('rememberMe').checked = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user