added contact form

This commit is contained in:
JSriwongsa 2023-06-12 19:57:06 -05:00
parent 50e5e08046
commit 314286f151
2 changed files with 220 additions and 0 deletions

View file

@ -0,0 +1,155 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
text-decoration: none;
scroll-behavior: smooth;
}
:root{
--bg-color:snow;
--main-color:rgb(177, 126, 5);
--minor-color:rgb(49, 48, 48);
--other-color:dimgray;
--text-color:black;
--box-shadow:10px 10px 5px rgba(0, 0, 0, 0.5);
}
body{
width: 100%;
height: 100vh;
background: url(images/contact.jpg) no-repeat;
}
.contact-container{
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
padding: 20px 100px;
}
.contact-box{
max-width: 850px;
margin-top: 10%;
display: grid;
grid-template-columns: repeat(2,1fr);
justify-content: center;
align-items: center;
text-align: center;
background-color: var(--bg-color);
box-shadow: 0px 0px 15px 5px rgba(0,0,0,0.2);
}
.left{
height: 100%;
background: url(images/contact-1.jpg) no-repeat center;
background-size: cover;
}.right{
padding: 25px 40px;
}
h2{
padding-bottom: 10px;
margin-top: 8%;
margin-bottom: 5%;
position: relative;
font-family: 'Vujahday Script';
font-size: 2.5rem;
}
h2:after{
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
height: 4px;
width: 50px;
border-radius: 2px;
background-color: var(--main-color);
}
.field{
width: 100%;
padding: 0.6rem 1rem;
outline: none;
border: none;
background-color: rgba(230, 230, 230, 0.5);
font-size: 1rem;
margin-bottom: 20px;
transition: 0.3s;
text-align: left;
}
.area{
min-height: 150px;
}
.button-btn{
margin-top: 5%;
margin-bottom: 8%;
width: 30%;
padding: 8px 10px;
outline: none;
border: none;
font-size: 1rem;
background-color: var(--main-color);
color: white;
font-weight: 600;
border-radius: 4rem;
cursor: pointer;
}
.button-btn:hover{
background-color: var(--other-color);
color: var(--bg-color);
}
@media(max-width: 880px){
.contact-box{
grid-template-columns: 1fr;
}
.left{
height: 200px;
}
}
@media(max-width: 500px){
.contact-box{
max-width: 800px;
}
h2{
font-size: 3rem;
}
.field{
padding: 0.4rem 0.8rem;
font-size: 1.5rem;
}
.area{
min-height: 90px;
}
}
@media(max-width: 450px){
.field{
padding: 0.2rem 0.4rem;
font-size: 1.5rem;
}
.area{
min-height: 80px;
}
.button-btn{
width: 60%;
padding: 5px 8px;
outline: none;
border: none;
font-size: 1rem;
}
}
@media(max-width: 380px){
h2{
font-size: 1rem;
}
.field{
padding: 0.4rem 0.4rem;
font-size: 0.5rem;
}
.button-btn{
width: 50%;
}
}

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FUJISAN</title>
<link rel="shortcut icon" href="images/logo.png">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="contact.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
<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=Klee+One:wght@400;600&family=Montserrat:wght@300;400;500;600;700;800;900&family=Norican&family=Poppins:ital,wght@0,100;0,300;1,100;1,300&display=swap" rel="stylesheet">
<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=Klee+One:wght@400;600&family=Montserrat:wght@300;400;500;600;700;800;900&family=Norican&family=Permanent+Marker&family=Vujahday+Script&display=swap" rel="stylesheet">
</head>
<body>
<header>
<div class="container">
<div class="navbar">
<div class="logo">
<a href=""><img src="images/logo.png"></a>
<span>FUJISAN</span>
</div>
<nav>
<div class="heading-btn">
<i class="close-btn fas fa-times-circle"></i>
</div>
<li><a href="index.html">HOME</a></li>
<li><a href="menu.html">MENU</a></li>
<li><a href="order.html">ORDER</a></li>
<li><a href="index.html">RESERVATION</a></li>
<li><a href="">ABOUT</a></li>
<li><a href="">CONTACT</a></li>
</nav>
<div class="heading-btn">
<i class="menu-btn fas fa-bars"></i>
</div>
</div>
</div>
</header>
<div class="contact-container">
<div class="contact-box">
<div class="left"></div>
<div class="right">
<h2>Contact Us</h2>
<input type="text" class="field" placeholder="Your Name">
<input type="text" class="field" placeholder="Your Last name">
<input type="email" class="field" placeholder="Your Email">
<textarea class="field area" placeholder="Message"></textarea>
<button class="button-btn">Send</button>
</div>
</div>
</div>
<script src="main.js"></script>
</body>
</html>