undefined / index.html
MustafaBag's picture
create a mobile responsive website. theme and color palatte of website is provided as
7e94046 verified
Raw History Blame Contribute Delete
7.02 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login - Royal Car Curtains</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">========================
Global Reset & Variables
================================ */
:root {
--primary: #9A2A2A;
--secondary: #191970;
--accent: #32ca42;
--bg: #FAF9F6;
--text: #1F2937;
--error: #D2042D;
--g1: #d1ebd3;
--y1: #f2e88a;
--r1: #d97576;
--c1: #003366;
--c2: #174978;
--c3: #2f5f8a;
--c4: #46769b;
--c5: #5e8cad;
--c6: #75a2bf;
--c7: #f2fcff;
--b1: 65px;
--b2: 50px;
--b3: 40px;
--b4: 20px;
--b5: 105px;
}
=======
<style>
/* ===============================
Global Reset & Variables
================================ */
:root {
--primary: #9A2A2A;
--secondary: #191970;
--accent: #32ca42;
--bg: #FAF9F6;
--text: #1F2937;
--error: #D2042D;
--g1: #d1ebd3;
--y1: #f2e88a;
--r1: #d97576;
--c1: #003366;
--c2: #174978;
--c3: #2f5f8a;
--c4: #46769b;
--c5: #5e8cad;
--c6: #75a2bf;
--c7: #f2fcff;
--b1: 65px;
--b2: 50px;
--b3: 40px;
--b4: 20px;
--b5: 105px;
}
@media (max-width: 768px) {
.mobile-frame {
width: 100%;
min-width: unset;
border-radius: 0;
}
.dash-wrap {
width: 90%;
margin: 16px auto;
}
.card {
width: 100%;
box-sizing: border-box;
}
}
@media (max-width: 480px) {
.logo {
max-width: 120px;
}
.brand-title {
font-size: 1.2rem;
}
.card {
padding: 12px;
}
}
===============================
Global Reset & Variables
================================ */
:root {
--primary: #9A2A2A;
--secondary: #191970;
--accent: #32ca42;
--bg: #FAF9F6;
--text: #1F2937;
--error: #D2042D;
--g1: #d1ebd3;
--y1: #f2e88a;
--r1: #d97576;
--c1: #003366;
--c2: #174978;
--c3: #2f5f8a;
--c4: #46769b;
--c5: #5e8cad;
--c6: #75a2bf;
--c7: #f2fcff;
--b1: 65px;
--b2: 50px;
--b3: 40px;
--b4: 20px;
--b5: 105px;
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
background: #FFF !important;
color: var(--text);
font-family: 'Roboto', sans-serif;
display: flex;
/* make body a flex container */
justify-content: center;
/* center horizontally */
align-items: center;
/* center vertically */
overflow-x: hidden;
/* prevent horizontal scroll */
}
/* ===============================
Mobile Shell
================================ */
.mobile-frame {
width: 100%;
min-width: 360px;
height: 100%;
min-height: 640px;
background-color: var(--bg);
border-radius: 7px;
box-shadow: none;
display: flex;
flex-direction: column;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
/* ensures no horizontal scroll inside */
}
/* Main dash container (centered card-like) */
.dash-wrap {
width: 328px;
margin: 16px;
padding: 0px;
/*background: var(--bg); /* keep background of mobile-frame */
}
/* ===============================
Typography
================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Nunito', sans-serif;
font-weight: 700;
}
/* ===============================
Footer
================================ */
footer {
text-align: center;
font-size: 12px;
color: #6b7280;
margin-top: 12px;
}
/* PAGE-SPECIFIC STYLES */
.logo {
display: block;
margin: 8px auto;
max-width: 150px;
/* Increased ~20% */
height: auto;
}
.brand-title {
text-align: center;
margin-bottom: 16px;
font-weight: 700;
font-family: 'Nunito', sans-serif;
}
.card {
border: none;
border-radius: 21px;
background: #fff;
width: 328px;
height: fit-content;
padding: 15px;
align-self: center;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
/* soft shadow */
}
.btn-primary {
background: var(--primary);
border: none;
width: 100%;
padding: 12px;
border-radius: 8px;
font-weight: 600;
transition: all 0.3s ease;
}
.btn-primary:hover {
background-color: var(--secondary);
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.btn-primary:active {
transform: translateY(0);
}
footer {
text-align: center;
font-size: 12px;
color: #6b7280;
margin-top: 16px;
}
.contact-msg {
text-align: center;
font-size: 13px;
color: #374151;
margin-top: 16px;
}
</style>
</head>
<body>
<div class="mobile-frame">
<div class="spacer" style="height: 40px;"></div>
<!-- Header -->
<div class="header-container">
<img src="assets/Royal Logo.png" alt="Royal Logo" class="logo">
<h5 class="brand-title">Management System</h5>
</div>
<!-- Login Form -->
<div class="card">
<form method="POST" novalidate>
<div class="mb-3 text-start">
<label class="form-label">User ID</label>
<input type="text" name="user_id" class="form-control" placeholder="Enter..." required
value="<?php echo htmlspecialchars($_POST['user_id'] ?? ''); ?>">
</div>
<div class="mb-2 text-start">
<label class="form-label">Password</label>
<input type="password" name="password" id="password" class="form-control" placeholder="Enter..." required minlength="8">
</div>
<?php if (!empty($error_message)): ?>
<div class="text-danger text-center mb-3"><?php echo $error_message; ?></div>
<?php endif; ?>
<br>
<button type="submit" class="btn btn-primary mt-2">Login!</button>
</form>
</div>
<!-- Contact and Footer -->
<div class="contact-msg">
<i data-feather="phone"></i> Contact +965 65517212 for any feedback/query.
</div>
<footer>
<div class="footer-content">
<i data-feather="shield"></i> © 2025 Royal Velvet Rides
</div>
</footer>
</div>
<script src="https://unpkg.com/feather-icons"></script>
<script>
// Initialize feather icons
feather.replace();
// Password toggle functionality
let hideTimer = null;
function togglePassword() {
const field = document.getElementById('password');
field.type = 'text';
if (hideTimer) clearTimeout(hideTimer);
hideTimer = setTimeout(() => {
field.type = 'password';
}, 1000);
}
// Add responsive behavior
function handleResize() {
if (window.innerWidth < 768) {
document.querySelector('.mobile-frame').style.boxShadow = 'none';
} else {
document.querySelector('.mobile-frame').style.boxShadow = '0 10px 25px rgba(0,0,0,0.1)';
}
}
window.addEventListener('resize', handleResize);
handleResize(); // Initial call
</script>
</body>
</html>