forked from MinhQuan/PresentCorpo
init
This commit is contained in:
@@ -0,0 +1,609 @@
|
||||
/* views\contactPage\contactMain.css */
|
||||
/* CONTACT PAGE SPECIFIC STYLES */
|
||||
/* General Styles */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Ensure visited links don't turn purple */
|
||||
a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Optional: Keep hover state consistent */
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Optional: Keep active state consistent */
|
||||
a:active {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Contact Section */
|
||||
.contact-section {
|
||||
padding: 60px 5%;
|
||||
background-color: #f9f9f9;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-intro {
|
||||
text-align: center;
|
||||
color: #30875f;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 40px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page-intro:after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 80px;
|
||||
height: 3px;
|
||||
background-color: #e84e0f;
|
||||
margin: 15px auto 0;
|
||||
}
|
||||
|
||||
.contact-container {
|
||||
display: flex;
|
||||
gap: 40px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
/* Enhanced Form Container */
|
||||
.contact-form {
|
||||
flex: 1;
|
||||
background-color: white;
|
||||
padding: 35px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.contact-form::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
background: linear-gradient(to bottom, #30875f, #e84e0f);
|
||||
}
|
||||
|
||||
.contact-form:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.contact-form h2 {
|
||||
color: #30875f;
|
||||
font-size: 1.6rem;
|
||||
margin-bottom: 30px;
|
||||
position: relative;
|
||||
padding-bottom: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.contact-form h2::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 60px;
|
||||
height: 3px;
|
||||
background: linear-gradient(to right, #30875f, #e84e0f);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Form Progress Bar */
|
||||
.form-progress {
|
||||
height: 4px;
|
||||
background: #eee;
|
||||
width: 100%;
|
||||
margin-bottom: 25px;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.form-progress-bar {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
background: linear-gradient(to right, #30875f, #e84e0f);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
/* Improved Form Groups */
|
||||
.form-group {
|
||||
margin-bottom: 25px;
|
||||
position: relative;
|
||||
animation: fadeIn 0.5s ease forwards;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.form-group:nth-child(1) {
|
||||
animation-delay: 0.1s;
|
||||
}
|
||||
|
||||
.form-group:nth-child(2) {
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.form-group:nth-child(3) {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
.form-group:nth-child(4) {
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
font-weight: 500;
|
||||
margin-bottom: 10px;
|
||||
color: #444;
|
||||
transition: color 0.3s;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
/* Required field indicator */
|
||||
.form-group label.required::after {
|
||||
content: " *";
|
||||
color: #e84e0f;
|
||||
}
|
||||
|
||||
.form-group input,
|
||||
.form-group textarea {
|
||||
width: 100%;
|
||||
padding: 14px 16px 14px 45px;
|
||||
border: 2px solid #eaeaea;
|
||||
border-radius: 8px;
|
||||
font-size: 1rem;
|
||||
transition: all 0.3s;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.form-group input:hover,
|
||||
.form-group textarea:hover {
|
||||
border-color: #d0d0d0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.form-group input:focus,
|
||||
.form-group textarea:focus {
|
||||
outline: none;
|
||||
border-color: #30875f;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 0 4px rgba(48, 135, 95, 0.1);
|
||||
}
|
||||
|
||||
.form-group.focused label {
|
||||
color: #30875f;
|
||||
}
|
||||
|
||||
.form-group textarea {
|
||||
resize: vertical;
|
||||
min-height: 140px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* Input Icons */
|
||||
.form-group::before {
|
||||
font-family: "Font Awesome 6 Free";
|
||||
font-weight: 900;
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
top: 46px;
|
||||
color: #999;
|
||||
z-index: 1;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.form-group:nth-child(1)::before {
|
||||
content: "\f007"; /* User icon */
|
||||
}
|
||||
|
||||
.form-group:nth-child(2)::before {
|
||||
content: "\f0e0"; /* Email icon */
|
||||
}
|
||||
|
||||
.form-group:nth-child(3)::before {
|
||||
content: "\f095"; /* Phone icon */
|
||||
}
|
||||
|
||||
.form-group:nth-child(4)::before {
|
||||
content: "\f075"; /* Message icon */
|
||||
}
|
||||
|
||||
.form-group input:focus + .form-group::before,
|
||||
.form-group textarea:focus + .form-group::before {
|
||||
color: #30875f;
|
||||
}
|
||||
|
||||
/* Validation styling */
|
||||
.form-group.success input,
|
||||
.form-group.success textarea {
|
||||
border-color: #2ecc71;
|
||||
}
|
||||
|
||||
.form-group.error input,
|
||||
.form-group.error textarea {
|
||||
border-color: #e74c3c;
|
||||
}
|
||||
|
||||
.form-group .error-message {
|
||||
color: #e74c3c;
|
||||
font-size: 0.85rem;
|
||||
margin-top: 5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form-group.error .error-message {
|
||||
display: block;
|
||||
animation: fadeIn 0.3s ease forwards;
|
||||
}
|
||||
|
||||
/* Enhanced Submit Button */
|
||||
.submit-button {
|
||||
background: linear-gradient(to right, #30875f, #2a7954);
|
||||
color: white;
|
||||
padding: 16px 40px;
|
||||
border: none;
|
||||
border-radius: 50px;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
display: inline-block;
|
||||
box-shadow: 0 4px 15px rgba(48, 135, 95, 0.3);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
animation: fadeIn 0.5s ease forwards;
|
||||
animation-delay: 0.5s;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.submit-button:hover {
|
||||
background: linear-gradient(to right, #e84e0f, #d24510);
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 6px 20px rgba(232, 78, 15, 0.4);
|
||||
}
|
||||
|
||||
.submit-button:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 10px rgba(232, 78, 15, 0.3);
|
||||
}
|
||||
|
||||
.submit-button::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 50%;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
transition: transform 0.6s, opacity 0.6s;
|
||||
}
|
||||
|
||||
.submit-button:hover::after {
|
||||
transform: scale(15);
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
/* Contact Details Section */
|
||||
.contact-details {
|
||||
flex: 1;
|
||||
background-color: white;
|
||||
padding: 35px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.contact-details::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
background: linear-gradient(to bottom, #e84e0f, #30875f);
|
||||
}
|
||||
|
||||
.contact-details:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.contact-details h2 {
|
||||
color: #30875f;
|
||||
font-size: 1.6rem;
|
||||
margin-bottom: 30px;
|
||||
position: relative;
|
||||
padding-bottom: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.contact-details h2::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 60px;
|
||||
height: 3px;
|
||||
background: linear-gradient(to right, #e84e0f, #30875f);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.contact-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.contact-item:hover {
|
||||
transform: translateX(5px);
|
||||
}
|
||||
|
||||
.contact-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.contact-item i {
|
||||
font-size: 20px;
|
||||
color: #30875f;
|
||||
margin-right: 15px;
|
||||
margin-top: 3px;
|
||||
transition: color 0.3s, transform 0.3s;
|
||||
}
|
||||
|
||||
.contact-item:hover i {
|
||||
color: #e84e0f;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.contact-item p {
|
||||
margin: 0;
|
||||
color: #444;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.contact-item a {
|
||||
color: #30875f;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.contact-item a::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
bottom: -2px;
|
||||
left: 0;
|
||||
background-color: #e84e0f;
|
||||
transform: scaleX(0);
|
||||
transform-origin: bottom right;
|
||||
transition: transform 0.3s ease-out;
|
||||
}
|
||||
|
||||
.contact-item a:hover {
|
||||
color: #e84e0f;
|
||||
}
|
||||
|
||||
.contact-item a:hover::after {
|
||||
transform: scaleX(1);
|
||||
transform-origin: bottom left;
|
||||
}
|
||||
|
||||
.map-container {
|
||||
margin-top: 25px;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.map-container:hover {
|
||||
transform: scale(1.01);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.map-container::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(48, 135, 95, 0.05);
|
||||
z-index: 1;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.map-container:hover::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.map-container iframe {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* Animation Keyframes */
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgba(48, 135, 95, 0.4);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 10px rgba(48, 135, 95, 0);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 rgba(48, 135, 95, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media (max-width: 1200px) {
|
||||
.contact-section {
|
||||
padding: 50px 4%;
|
||||
}
|
||||
|
||||
.contact-form,
|
||||
.contact-details {
|
||||
padding: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.page-intro {
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
.contact-container {
|
||||
gap: 30px;
|
||||
}
|
||||
|
||||
.contact-form h2,
|
||||
.contact-details h2 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.contact-container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.contact-form,
|
||||
.contact-details {
|
||||
width: 100%;
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
.page-intro {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.contact-form h2,
|
||||
.contact-details h2 {
|
||||
font-size: 1.4rem;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form-group input,
|
||||
.form-group textarea {
|
||||
padding: 12px 12px 12px 40px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.form-group::before {
|
||||
top: 43px;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
padding: 14px 30px;
|
||||
font-size: 1rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.contact-item i {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.contact-section {
|
||||
padding: 40px 15px;
|
||||
}
|
||||
|
||||
.page-intro {
|
||||
font-size: 1.4rem;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.contact-form,
|
||||
.contact-details {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.contact-form h2,
|
||||
.contact-details h2 {
|
||||
font-size: 1.3rem;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.form-group input,
|
||||
.form-group textarea {
|
||||
padding: 11px 11px 11px 38px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.form-group::before {
|
||||
top: 40px;
|
||||
left: 14px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
padding: 12px 25px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.contact-item {
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
<!-- views\contactPages\contactMain.html -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Liên Hệ - CÔNG TY TNHH ĐẦU TƯ THƯƠNG MẠI DỊCH VỤ KỲ LONG</title>
|
||||
<link
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css"
|
||||
/>
|
||||
<link href="/components/header/header.css?v=1.1" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="components/footer/footer.css" />
|
||||
<link rel="stylesheet" href="contactPages/contactMain.css" />
|
||||
</head>
|
||||
<link
|
||||
rel="preload"
|
||||
href="components/header/header.html"
|
||||
as="fetch"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<body>
|
||||
<!-- Header Component -->
|
||||
<div class="top-ribbon">
|
||||
<div class="container-fluid px-4">
|
||||
<div class="ribbon-content">
|
||||
<div class="ribbon-company-info">
|
||||
<img
|
||||
src="https://ik.imagekit.io/1e8470bv5/companyLogo.webp?updatedAt=1754143468028"
|
||||
alt="Ky Long Logo"
|
||||
class="ribbon-logo"
|
||||
/>
|
||||
<span class="ribbon-company-name">KỲ LONG</span>
|
||||
<span>Thắp sáng tương lai, vững bền thành quả</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header Section -->
|
||||
<header class="header py-3">
|
||||
<div class="container-fluid px-4">
|
||||
<div class="row align-items-center">
|
||||
<!-- Logo and Company Info -->
|
||||
<div class="col-lg-6 col-md-6 col-12">
|
||||
<div class="d-flex align-items-center">
|
||||
<button class="mobile-menu-btn me-3">
|
||||
<i class="bi bi-list"></i>
|
||||
</button>
|
||||
<img
|
||||
src="https://ik.imagekit.io/1e8470bv5/companyLogo.webp?updatedAt=1754143468028"
|
||||
alt="Ky Long Logo"
|
||||
class="logo me-3"
|
||||
/>
|
||||
<div class="company-info">
|
||||
<div>
|
||||
<a
|
||||
href="/"
|
||||
title="Công ty TNHH Đầu Tư Thương Mại Dịch Vụ Kỳ Long"
|
||||
class="company-name"
|
||||
>
|
||||
CÔNG TY TNHH ĐẦU TƯ THƯƠNG MẠI DỊCH VỤ KỲ LONG
|
||||
</a>
|
||||
</div>
|
||||
<div class="company-slogan">
|
||||
Thắp sáng tương lai, vững bền thành quả
|
||||
</div>
|
||||
<div class="company-year">SINCE 2010</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Contact Info - Horizontal Layout -->
|
||||
<div class="col-lg-6 col-md-6 col-12 contact-section">
|
||||
<div class="row g-3">
|
||||
<!-- Address -->
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="d-flex align-items-center">
|
||||
<div
|
||||
class="contact-icon2 d-flex align-items-center justify-content-center me-2"
|
||||
>
|
||||
<i class="bi bi-geo-alt-fill"></i>
|
||||
</div>
|
||||
<div class="contact-text">
|
||||
<div>Lầu 12, số 27 Đinh Bộ Lĩnh,</div>
|
||||
<div>P. Bình Thạnh, TP.Hồ Chí Minh</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email -->
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="d-flex align-items-center">
|
||||
<div
|
||||
class="contact-icon d-flex align-items-center justify-content-center me-2"
|
||||
>
|
||||
<i class="bi bi-envelope-open-fill"></i>
|
||||
</div>
|
||||
|
||||
<div class="contact-text">
|
||||
<div>Email:</div>
|
||||
<div class="contact-text">info@kylongtech.com</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Navigation Section -->
|
||||
<nav class="nav-container">
|
||||
<div class="container-fluid px-4">
|
||||
<div class="navbar-nav d-flex flex-row justify-content-around py-3">
|
||||
<a href="/" class="nav-link" id="home">TRANG CHỦ</a>
|
||||
<span class="separator"></span>
|
||||
<a href="/aboutMain" class="nav-link" id="about">GIỚI THIỆU</a>
|
||||
<span class="separator"></span>
|
||||
<a href="/productMain" class="nav-link" id="products">SẢN PHẨM</a>
|
||||
<span class="separator"></span>
|
||||
<a href="/serviceMain" class="nav-link" id="services">DỊCH VỤ</a>
|
||||
<span class="separator"></span>
|
||||
<a href="/newsMain" class="nav-link" id="news">TIN TỨC</a>
|
||||
<span class="separator"></span>
|
||||
<a href="/lien-he" class="nav-link" id="contact">LIÊN HỆ</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Floating Menu Button -->
|
||||
<button class="floating-menu-btn" id="floatingMenuBtn">
|
||||
<i class="bi bi-list"></i>
|
||||
</button>
|
||||
|
||||
<!-- Sidebar Overlay -->
|
||||
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar" id="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<img
|
||||
src="https://ik.imagekit.io/1e8470bv5/companyLogo.webp?updatedAt=1754143468028"
|
||||
alt="Ky Long Logo"
|
||||
class="sidebar-logo"
|
||||
/>
|
||||
<button class="close-sidebar">
|
||||
<i class="bi bi-x-lg"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<nav class="sidebar-nav">
|
||||
<a href="/" class="nav-link">TRANG CHỦ</a>
|
||||
<a href="/aboutMain" class="nav-link">GIỚI THIỆU</a>
|
||||
<a href="/productMain" class="nav-link">SẢN PHẨM</a>
|
||||
<a href="/serviceMain" class="nav-link">DỊCH VỤ</a>
|
||||
<a href="/newsMain" class="nav-link">TIN TỨC</a>
|
||||
<a href="/lien-he" class="nav-link">LIÊN HỆ</a>
|
||||
</nav>
|
||||
|
||||
<div class="sidebar-contact">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<div
|
||||
class="contact-icon2 d-flex align-items-center justify-content-center me-2"
|
||||
>
|
||||
<i class="bi bi-geo-alt-fill"></i>
|
||||
</div>
|
||||
<div>
|
||||
<div>Lầu 12, số 27 Đinh Bộ Lĩnh,</div>
|
||||
<div>P. Bình Thạnh, TP.Hồ Chí Minh</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<div
|
||||
class="contact-icon d-flex align-items-center justify-content-center me-2"
|
||||
>
|
||||
<i class="bi bi-envelope-open-fill"></i>
|
||||
</div>
|
||||
<div>
|
||||
<div>Email:</div>
|
||||
<div>info@kylongtech.com</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!----- CONTACT PAGE CONTENT ----->
|
||||
<section class="contact-section">
|
||||
<h1 class="page-intro">LIÊN HỆ VỚI KỲ LONG</h1>
|
||||
|
||||
<div class="contact-container">
|
||||
<div class="contact-form">
|
||||
<h2>Gửi tin nhắn cho chúng tôi</h2>
|
||||
|
||||
<!-- Optional: Progress bar to show form completion -->
|
||||
<div class="form-progress">
|
||||
<div class="form-progress-bar"></div>
|
||||
</div>
|
||||
|
||||
<form action="/submit" method="POST" id="contactForm">
|
||||
<div class="form-group">
|
||||
<label for="name" class="required">Họ và tên</label>
|
||||
<input
|
||||
type="text"
|
||||
id="name"
|
||||
name="name"
|
||||
placeholder="Nhập họ và tên của bạn"
|
||||
required
|
||||
/>
|
||||
<div class="error-message">Vui lòng nhập họ và tên của bạn</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email" class="required">Email</label>
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="Nhập địa chỉ email của bạn"
|
||||
required
|
||||
/>
|
||||
<div class="error-message">
|
||||
Vui lòng nhập một địa chỉ email hợp lệ
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="phone" class="required">Số điện thoại</label>
|
||||
<input
|
||||
type="tel"
|
||||
id="phone"
|
||||
name="phone"
|
||||
placeholder="Nhập số điện thoại của bạn"
|
||||
required
|
||||
/>
|
||||
<div class="error-message">
|
||||
Vui lòng nhập số điện thoại của bạn
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="message" class="required">Nội dung</label>
|
||||
<textarea
|
||||
id="message"
|
||||
name="message"
|
||||
placeholder="Nhập nội dung tin nhắn của bạn"
|
||||
rows="5"
|
||||
required
|
||||
></textarea>
|
||||
<div class="error-message">Vui lòng nhập nội dung tin nhắn</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="submit-button">Gửi tin nhắn</button>
|
||||
</form>
|
||||
|
||||
<!-- Container for success/error messages -->
|
||||
<div id="form-messages"></div>
|
||||
</div>
|
||||
|
||||
<div class="contact-details">
|
||||
<h2>Thông tin liên hệ</h2>
|
||||
<div class="contact-info">
|
||||
<div class="contact-item">
|
||||
<i class="fas fa-map-marker-alt"></i>
|
||||
<p>Lầu 12, số 27 Đinh Bộ Lĩnh, P. Bình Thạnh, TP.Hồ Chí Minh</p>
|
||||
</div>
|
||||
<div class="contact-item">
|
||||
<i class="fas fa-phone-alt"></i>
|
||||
<p>+84 96 227 7912</p>
|
||||
</div>
|
||||
<div class="contact-item">
|
||||
<i class="fas fa-envelope"></i>
|
||||
<p>info@kylongtech.com</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="map-container">
|
||||
<iframe
|
||||
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3919.0886950094214!2d106.70665347594756!3d10.804518689345947!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x317528bb7aef745f%3A0x9171c157a44f8c21!2zMjcgxJAuIMSQaW5oIELhu5kgTMSpbmgsIFBoxrDhu51uZyAxNCwgQsOsbmggVGjhuqFuaCwgSOG7kyBDaMOtIE1pbmgsIFZpZXRuYW0!5e0!3m2!1sen!2s!4v1757160111176!5m2!1sen!2s"
|
||||
width="100%"
|
||||
height="300"
|
||||
style="border: 0"
|
||||
allowfullscreen=""
|
||||
loading="lazy"
|
||||
></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer Component -->
|
||||
<div id="footer"></div>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="/components/header/header.js"></script>
|
||||
<script src="contactPages/contactMain.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,206 @@
|
||||
////views\contactPage\contactMain.js
|
||||
// Load footer
|
||||
fetch("components/footer/footer.html")
|
||||
.then((response) => response.text())
|
||||
.then((data) => {
|
||||
document.getElementById("footer").innerHTML = data;
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// Focus and blur effects for form elements
|
||||
const formGroups = document.querySelectorAll(".form-group");
|
||||
|
||||
formGroups.forEach((group) => {
|
||||
const input = group.querySelector("input, textarea");
|
||||
|
||||
if (input) {
|
||||
input.addEventListener("focus", () => {
|
||||
group.classList.add("focused");
|
||||
});
|
||||
|
||||
input.addEventListener("blur", () => {
|
||||
if (input.value.trim() === "") {
|
||||
group.classList.remove("focused");
|
||||
}
|
||||
});
|
||||
|
||||
// Check initial state (for browser autofill)
|
||||
if (input.value.trim() !== "") {
|
||||
group.classList.add("focused");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Form progress bar
|
||||
const progressBar = document.querySelector(".form-progress-bar");
|
||||
const formInputs = document.querySelectorAll(
|
||||
".contact-form input, .contact-form textarea"
|
||||
);
|
||||
const totalInputs = formInputs.length;
|
||||
|
||||
function updateProgress() {
|
||||
let filledInputs = 0;
|
||||
formInputs.forEach((input) => {
|
||||
if (input.value.trim() !== "") {
|
||||
filledInputs++;
|
||||
}
|
||||
});
|
||||
|
||||
const progressPercent = (filledInputs / totalInputs) * 100;
|
||||
progressBar.style.width = progressPercent + "%";
|
||||
}
|
||||
|
||||
formInputs.forEach((input) => {
|
||||
input.addEventListener("input", updateProgress);
|
||||
// Also update on change for autocomplete
|
||||
input.addEventListener("change", updateProgress);
|
||||
});
|
||||
|
||||
// Initial check for any pre-filled values
|
||||
updateProgress();
|
||||
|
||||
// Form message display functions
|
||||
function showMessage(type, message) {
|
||||
const messagesContainer = document.getElementById("form-messages");
|
||||
|
||||
// Clear previous messages
|
||||
messagesContainer.innerHTML = "";
|
||||
|
||||
// Create message element
|
||||
const messageElement = document.createElement("div");
|
||||
messageElement.className =
|
||||
type === "success" ? "success-message" : "form-error-message";
|
||||
messageElement.textContent = message;
|
||||
|
||||
// Add to container
|
||||
messagesContainer.appendChild(messageElement);
|
||||
|
||||
// Scroll to message
|
||||
messageElement.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
||||
|
||||
// Remove message after delay
|
||||
setTimeout(() => {
|
||||
messageElement.classList.add("fade-out");
|
||||
setTimeout(() => {
|
||||
if (messagesContainer.contains(messageElement)) {
|
||||
messagesContainer.removeChild(messageElement);
|
||||
}
|
||||
}, 500);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
// Form validation
|
||||
const contactForm = document.getElementById("contactForm");
|
||||
|
||||
if (contactForm) {
|
||||
contactForm.addEventListener("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
let isValid = true;
|
||||
|
||||
// Validate each field
|
||||
formGroups.forEach((group) => {
|
||||
const input = group.querySelector("input, textarea");
|
||||
const errorMessage = group.querySelector(".error-message");
|
||||
|
||||
if (input.required && input.value.trim() === "") {
|
||||
group.classList.add("error");
|
||||
isValid = false;
|
||||
} else {
|
||||
group.classList.remove("error");
|
||||
|
||||
// Additional validation for email
|
||||
if (input.type === "email" && input.value.trim() !== "") {
|
||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
if (!emailRegex.test(input.value.trim())) {
|
||||
group.classList.add("error");
|
||||
if (errorMessage) {
|
||||
errorMessage.textContent = "Vui lòng nhập địa chỉ email hợp lệ";
|
||||
}
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Additional validation for phone (optional)
|
||||
if (input.type === "tel" && input.value.trim() !== "") {
|
||||
// Basic phone validation - adjust according to Vietnamese phone number format
|
||||
const phoneRegex = /^[0-9+\s()-]{10,15}$/;
|
||||
if (!phoneRegex.test(input.value.trim())) {
|
||||
group.classList.add("error");
|
||||
if (errorMessage) {
|
||||
errorMessage.textContent = "Vui lòng nhập số điện thoại hợp lệ";
|
||||
}
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (isValid) {
|
||||
// Get form data
|
||||
const formData = new FormData(contactForm);
|
||||
const formDataObject = {};
|
||||
|
||||
// Convert FormData to a regular object
|
||||
formData.forEach((value, key) => {
|
||||
formDataObject[key] = value;
|
||||
});
|
||||
|
||||
// Show loading state
|
||||
const submitButton = contactForm.querySelector(".submit-button");
|
||||
const originalButtonText = submitButton.textContent;
|
||||
submitButton.textContent = "Đang gửi...";
|
||||
submitButton.disabled = true;
|
||||
|
||||
// Send AJAX request
|
||||
fetch("/submit", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(formDataObject),
|
||||
})
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
// If status is not 2xx, treat as error
|
||||
throw new Error(`HTTP error! Status: ${response.status}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
// Reset button state
|
||||
submitButton.textContent = originalButtonText;
|
||||
submitButton.disabled = false;
|
||||
|
||||
if (data.success) {
|
||||
// Show success message
|
||||
showMessage("success", data.message);
|
||||
|
||||
// Reset form and progress bar
|
||||
contactForm.reset();
|
||||
updateProgress();
|
||||
|
||||
// Reset focus states
|
||||
formGroups.forEach((group) => {
|
||||
group.classList.remove("focused");
|
||||
});
|
||||
} else {
|
||||
// Show error message
|
||||
showMessage("error", data.message);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
submitButton.textContent = originalButtonText;
|
||||
submitButton.disabled = false;
|
||||
|
||||
// Show error message
|
||||
showMessage(
|
||||
"error",
|
||||
"Đã xảy ra lỗi khi gửi tin nhắn. Vui lòng thử lại sau."
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user