Html
Html
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://fonts.googleapis.com/css2?
family=Roboto:wght@300;500;700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<a href="#">Home</a>
<a href="#">Gift</a>
<a href="#">Order</a>
<a href="#">Pay</a>
<a href="#">Store</a>
</nav>
</header>
<section class="hero">
<div class="hero-text">
<h1>HANDCRAFTED</h1>
<button>Order Now</button>
</div>
</section>
<section class="section">
<h2>Handcrafted Curations</h2>
<div class="curations">
<div class="card">Bestseller</div>
<div class="card">Drinks</div>
<div class="card">Food</div>
<div class="card">Merchandise</div>
</div>
</section>
<section class="section">
<h2>Barista Recommends</h2>
<div class="recommendations">
<div class="card">
<p>$15.20</p>
<button>Add Item</button>
</div>
<div class="card">
<img src="americano.jpg" alt="Caffe Americano" />
<h4>Caffe Americano</h4>
<p>$10.30</p>
<button>Add Item</button>
</div>
<div class="card">
<h4>Cold Coffee</h4>
<p>$11.20</p>
<button>Add Item</button>
</div>
<div class="card">
<p>$11.20</p>
<button>Add Item</button>
</div>
</div>
</section>
<section class="learn-more">
<button>Learn More</button>
</section>
<footer>
<div>
<h4>About Us</h4>
<a href="#">Coffeehouse</a>
</div>
<div>
<h4>Responsibility</h4>
<a href="#">Community</a>
<a href="#">Environment</a>
<a href="#">Diversity</a>
</div>
<div>
<h4>Quick Links</h4>
<a href="#">Careers</a>
<a href="#">FAQs</a>
<a href="#">Delivery</a>
</div>
<div class="social-icons">
<h4>Social Media</h4>
<a href="#">Twitter</a>
<a href="#">Instagram</a>
<a href="#">Facebook</a>
</div>
<div>
<h4>Downloads</h4>
</div>
<div class="bottom-bar">
</div>
</footer>
</body>
</html>
Css
*{
margin: 0;
padding: 0;
box-sizing: border-box;
body {
line-height: 1.6;
font-size: 16px;
/* HEADER */
.topbar {
color: white;
display: flex;
justify-content: space-between;
align-items: center;
.topbar .logo {
font-size: 1.8rem;
font-weight: bold;
.topbar nav a {
color: white;
margin-left: 2rem;
text-decoration: none;
font-size: 1rem;
font-weight: bold;
}
.topbar nav a:hover {
/* HERO */
.hero {
color: white;
text-align: center;
.hero h1 {
font-size: 4rem;
margin-bottom: 10px;
.hero p {
font-size: 1.5rem;
margin-bottom: 30px;
/* TOMBOL */
.btn {
color: white;
padding: 12px 30px;
border: none;
border-radius: 50px;
font-weight: bold;
cursor: pointer;
text-transform: uppercase;
.btn:hover {
transform: scale(1.1);
.about {
background-color: #fff;
text-align: center;
margin-top: 30px;
.about h2 {
font-size: 2.5rem;
margin-bottom: 20px;
color: #3e2c23;
}
.about-images {
display: flex;
justify-content: center;
gap: 20px;
.about-images img {
width: 300px;
height: 200px;
object-fit: cover;
border-radius: 10px;
/* MENU */
.menu {
background-color: #f4f1e1;
text-align: center;
.menu h2 {
font-size: 2.5rem;
margin-bottom: 30px;
.menu-items {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
.menu-items .item {
background: white;
border-radius: 10px;
width: 250px;
overflow: hidden;
text-align: center;
width: 100%;
height: 200px;
object-fit: cover;
.menu-items .item h3 {
margin: 20px 0;
font-size: 1.5rem;
.menu-items .item p {
font-size: 1.2rem;
margin-bottom: 15px;
/* FEEDBACK */
.feedback {
background-color: #fff;
text-align: center;
.feedback h2 {
font-size: 2.5rem;
margin-bottom: 30px;
.feedback-list {
margin-top: 30px;
.feedback-item {
margin-bottom: 25px;
font-style: italic;
font-size: 1.2rem;
color: #555;
.feedback-item h4 {
margin-top: 10px;
font-weight: bold;
font-size: 1rem;
color: #3e2c23;
/* KERANJANG BELANJA */
.cart-section {
background-color: #fff;
text-align: center;
.cart-section h2 {
font-size: 2.5rem;
margin-bottom: 30px;
#cart-items {
margin-bottom: 30px;
#total-price {
font-size: 1.5rem;
font-weight: bold;
}
/* Toko dan Kontak */
.store {
background-color: #f4f1e1;
text-align: center;
.store h2 {
font-size: 2.5rem;
margin-bottom: 30px;
.store-links {
margin-bottom: 30px;
.store-links button {
margin: 10px;
background-color: #3e2c23;
color: white;
border: none;
border-radius: 50px;
font-weight: bold;
cursor: pointer;
}
.store-links button:hover {
background-color: #d6a760;
transform: scale(1.1);
.store-details {
margin-top: 20px;
background-color: #fff;
padding: 20px;
border-radius: 10px;
/* FOOTER */
footer {
background-color: #3e2c23;
color: white;
text-align: center;
footer p {
margin-top: 20px;
font-size: 1rem;
/* RESPONSIVE */
flex-direction: column;
align-items: flex-start;
text-align: center;
.menu-items {
flex-direction: column;
.about-images {
flex-direction: column;
align-items: center;
Js
function masukWebsite() {
document.getElementById("welcome-screen").style.display = "none";
document.getElementById("main-content").style.display = "block";
if (existing) {
existing.jumlah += 1;
} else {
renderKeranjang();
function renderKeranjang() {
container.innerHTML = '';
let total = 0;
keranjang.forEach(item => {
container.appendChild(itemDiv);
});
function prosesPesanan() {
if (keranjang.length === 0) {
return;
}
const konfirmasi = confirm("Apakah Anda yakin ingin memesan?");
if (konfirmasi) {
keranjang = [];
renderKeranjang();