Sure! Below is the code for a simple dessert and ice cream shop website using the specified colors, with cyan (#6DC6DC) as the main color. The website includes HTML, CSS, and JavaScript files.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Delightful Desserts & Ice Cream Shop</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Delightful Desserts</h1>
<nav>
<ul>
<li><a href="#home" class="active">Home</a></li>
<li><a href="#menu">Menu</a></li>
<li><a href="#locations">Locations</a></li>
<li><a href="#contact">Contact Us</a></li>
</ul>
</nav>
</header>
<main>
<section id="home">
<h2>Welcome to Delightful Desserts!</h2>
<p>Your one-stop shop for the most delicious desserts and ice cream in town.</p>
<button onclick="orderNow()">Order Now</button>
</section>
<section id="menu">
<h2>Our Menu</h2>
<!-- Add menu items here -->
<div class="menu-item">
<h3>Chocolate Fudge Sundae</h3>
<p>A classic sundae with rich chocolate fudge.</p>
</div>
<div class="menu-item">
<h3>Strawberry Shortcake</h3>
<p>Fresh strawberries with vanilla ice cream and shortcake.</p>
</div>
<!-- More items can be added similarly -->
</section>
<section id="locations">
<h2>Find Us</h2>
<p>123 Sweet Street, Candyland</p>
<!-- Include map or additional location details -->
</section>
<section id="contact">
<h2>Get in Touch</h2>
<form action="#" method="post" id="contact-form">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="message">Message:</label>
<textarea id="message" name="message" rows="5" required></textarea>
<button type="submit">Send Message</button>
</form>
</section>
</main>
<footer>
<p>© 2023 Delightful Desserts. All rights reserved.</p>
</footer>
<script src="script.js"></script>
</body>
</html>
style.css
/* General Styles */
body {
margin: 0;
font-family: Arial, sans-serif;
background-color: #FFFFFF;
color: #333333;
}
a {
text-decoration: none;
color: inherit;
}
ul {
list-style-type: none;
padding: 0;
}
/* Header Styles */
header {
background-color: #6DC6DC; /* Main cyan color */
padding: 20px;
color: #FFFFFF;
}
header h1 {
margin: 0;
}
nav {
margin-top: 15px;
}
nav ul {
display: flex;
gap: 15px;
}
nav a {
font-weight: bold;
}
nav a.active,
nav a:hover {
color: #FDADC0; /* Pink accent color */
}
/* Main Content Styles */
main {
padding: 40px 20px;
}
section {
margin-bottom: 60px;
}
section h2 {
color: #6DC6DC;
margin-bottom: 20px;
}
.menu-item {
background-color: #FDADC0; /* Pink background for menu items */
padding: 20px;
margin-bottom: 20px;
border-radius: 8px;
color: #FFFFFF;
}
.menu-item h3 {
margin-top: 0;
}
/* Contact Form Styles */
#contact-form {
max-width: 600px;
}
#contact-form label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
#contact-form input,
#contact-form textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #CCCCCC;
border-radius: 4px;
}
#contact-form button {
background-color: #FFA362; /* Orange accent color */
color: #FFFFFF;
border: none;
padding: 10px 20px;
cursor: pointer;
font-size: 16px;
}
#contact-form button:hover {
background-color: #6DC6DC; /* Cyan color on hover */
}
/* Button Styles */
button {
background-color: #FFA362; /* Orange accent color */
color: #FFFFFF;
border: none;
padding: 10px 20px;
cursor: pointer;
font-size: 16px;
border-radius: 4px;
}
button:hover {
background-color: #FDADC0; /* Pink accent color */
}
/* Footer Styles */
footer {
background-color: #6DC6DC;
color: #FFFFFF;
text-align: center;
padding: 15px 0;
}
script.js
function orderNow() {
alert("Thanks for choosing Delightful Desserts! Online ordering is coming soon.");
}
// Contact form submission handling (placeholder)
document.getElementById('contact-form').addEventListener('submit', function(event) {
event.preventDefault();
alert('Your message has been sent! We will get back to you soon.');
// Here you can add AJAX requests to send form data to the server
});
Notes:
- Colors: The main color cyan (
#6DC6DC) is used for the header, section headings, and footer. The orange (#FFA362) is used for buttons, and the pink (#FDADC0) is used as an accent color in navigation links and menu item backgrounds.
- Structure: The website includes a header with navigation, a main content area with four sections (Home, Menu, Locations, Contact), and a footer.
- Navigation: The navigation menu links to the different sections within the page.
- JavaScript: The
orderNow() function triggers an alert when the "Order Now" button is clicked. The contact form has an event listener for form submission with a placeholder function.
- Responsive Design: For a fully responsive design, consider adding media queries in the CSS or using a CSS framework like Bootstrap.
Feel free to customize the content, add images, and expand on the menu items as needed. Let me know if you need any additional features or assistance!