Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/chock-white-cake.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/chocolate-pie.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/corn-cake.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cupcake-removebg-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cupcake.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mafin-strawberry.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mafin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/tiramisu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/violet-cake.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 116 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,121 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Responsive Cake webpage</title>
<!-- Add a link to your css file here -->
</head>
<link rel="stylesheet" href="style.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=Lora&display=swap"
rel="stylesheet"
/>
</head>

<body>
<section class="intro">
<div class="intro-img">
<img
class="intro-img-src"
src="./images/cupcake-removebg-preview.png"
alt="chocolate cupcake"
/>
</div>
<div class="intro-text">
<p>The best cakes in town delivered to your door</p>
</div>
</section>
<div class="body">
<header class="header">
<nav class="navbar">

@Hamisakim Hamisakim Nov 14, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider how you've built the navbar here -- it's a lot of nesting, making it harder to debug and style.
something like the below

            <nav class="navbar">
<div class=nav-items>
                <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2FCodeYourFuture%2FHTML-CSS-Coursework-Week3%2Fpull%2F451%2Ffiles%23" class="nav-link">Home</a>
                <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2FCodeYourFuture%2FHTML-CSS-Coursework-Week3%2Fpull%2F451%2Ffiles%23" class="nav-link">Cakes</a>
                <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2FCodeYourFuture%2FHTML-CSS-Coursework-Week3%2Fpull%2F451%2Ffiles%23" class="nav-link">Orderin</a>
                <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2FCodeYourFuture%2FHTML-CSS-Coursework-Week3%2Fpull%2F451%2Ffiles%23" class="nav-link">Lessons</a>
                <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2FCodeYourFuture%2FHTML-CSS-Coursework-Week3%2Fpull%2F451%2Ffiles%23" class="nav-link">About</a>
</div>
                <div class="hamburger">
                    <span class="bar"></span>
                    <span class="bar"></span>
                    <span class="bar"></span>
                </div>
            </nav>

<ul class="nav-menu">
<li class="nav-item">
<a href="#" class="nav-link">Home</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Cakes</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Orderin</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Lessons</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">About</a>
</li>
</ul>
<div class="hamburger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</nav>
</header>

<section class="hero">
<div class="welcome">
<h1>Welcome</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Pariatur,
inventore cupiditate perferendis cumque illo nam molestiae labore
eaque, illum doloremque facilis, accusamus quis placeat! Fuga sed
animi expedita porro deserunt. Lorem ipsum dolor sit amet
consectetur, adipisicing elit. Doloremque, sint atque magnam, illum
inventore totam non ducimus amet maxime molestias id vero veritatis
voluptatum. Nostrum expedita quas ullam rem libero?
</p>
</div>
<div class="main-img">
<img src="./images/chock-white-cake.jpg" alt="" />
</div>
<div class="cross">
<div class="cross-div">
<img class="cross-imgs" src="./images/violet-cake.jpg" alt="" />
</div>
<div class="cross-div">
<img class="cross-imgs" src="./images/corn-cake.jpg" alt="" />
</div>
<div class="cross-div">
<img class="cross-imgs" src="./images/tiramisu.jpg" alt="" />
</div>
<div class="cross-div">
<img class="cross-imgs" src="./images/cupcake.jpg" alt="" />
</div>
</div>
</section>
</div>
<footer>
<div class="cnt-list">
<ul class="contacts">
<li class="contact"><b>Email: </b> <em>cakeltd@gmail.com</em></li>
<li class="contact"><b>Phone: </b> <em>XXX-XXX-XXX</em></li>
<li class="contact"><b>Address: </b> <em>London, UK</em></li>
</ul>
</div>
<p>The website is designed and created by Natalie Zablotska</p>
</footer>
</body>
<script>
const hamburger = document.querySelector(".hamburger");
const navMenu = document.querySelector(".nav-menu");

hamburger.addEventListener("click", mobileMenu);

function mobileMenu() {
hamburger.classList.toggle("active");
navMenu.classList.toggle("active");
}

const navLink = document.querySelectorAll(".nav-link");

<body>
<!-- Add your markup here -->
</body>
navLink.forEach((n) => n.addEventListener("click", closeMenu));

</html>
function closeMenu() {
hamburger.classList.remove("active");
navMenu.classList.remove("active");
}
</script>
</html>
Loading