Skip to content
This repository was archived by the owner on Apr 18, 2025. 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 removed Cakes-Co/design/cakes wireframe - mobile.png
Binary file not shown.
Binary file added Cakes-Co/images/1.webp
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 Cakes-Co/images/cakes-autumn-FF-626-23.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 Cakes-Co/images/cakes-celebrations-569-23.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 Cakes-Co/images/cakes-fruit-cakes-569-23.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Cakes-Co/images/images (1).jpeg
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 Cakes-Co/images/images (2).jpeg
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 Cakes-Co/images/images (3).jpeg
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 Cakes-Co/images/images (4).jpeg
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 Cakes-Co/images/images.jpeg
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 Cakes-Co/images/logo.webp
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 Cakes-Co/images/welcomecake.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 82 additions & 10 deletions Cakes-Co/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,88 @@


<!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" />
<title>Cakes co</title>
<link rel="stylesheet" href="./style.css" />
<link
href="https://fonts.googleapis.com/css?family=Roboto:400,500,300"
rel="stylesheet"
type="text/css"
/>
</head>

<body>
<header>
<img class="logo-img" src="./images/logo.webp" alt="" />


<div class="header-area">
<label class="menu-lbl" for="menu-inpt"
><img class="menu-img" src="./img/menu.svg" alt=""
/></label>

<h4>The best cakes in town delivered to your door</h4>

</div>
</header>

<input type="checkbox" id="menu-inpt" />
<nav class="nav-nav">
<label for="hamburger">&#9776;</label>
<inoput type="checkbox" id="hamburger"/>
<div id="hamitems">
<ul class="nav-ul">
<li><a class="nav-a" href="#">HOME</a></li>
<li><a class="nav-a" href="#">CAKES</a></li>
<li><a class="nav-a" href="#">ORDERING</a></li>
<li><a class="nav-a" href="#">LESSONS</a></li>
<li><a class="nav-a" href="#">ABOUT</a></li>
</ul>
</nav>
</div>

<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>
<main>
<div>

<h1>Welcome</h1>
<p>
Indulge in the art of celebration with our exquisite cakes.
Each slice is a symphony of flavors and a masterpiece of craftsmanship,
meticulously crafted to transform any moment into a memorable occasion.
Whether you're savoring the classic elegance of a velvety chocolate cake,
the playful sweetness of a rainbow-colored delight,
or the timeless charm of a buttercream-frosted masterpiece,
our cakes are more than desserts;
they're a canvas for your sweetest moments.
Welcome to a world where every bite is a celebration,
and every occasion is made unforgettable by the magic of our delectable creations.
</p>
</div>

</section>

<body>
<!-- Add your markup here -->
</body>
<section id="hero-sctn">
<img src="./images/cakes-fruit-cakes-569-23.jpg" alt="wedding cake" />
</section>

<section id="images-sctn">
<img src="./images/cakes-autumn-FF-626-23.jpg" alt="birthday cake" />
<img src="./images/cakes-celebrations-569-23.jpg" alt="tart" />
<img src="./images/cat-landing-autumn-loafs-569-23.jpg" alt="cupcake" />
<img src="./images/happy-birthday-cake-in-a-tin-850.jpg" alt="donut" />
</section>
</main>
<footer>
<div id="nav-footer">
<a href="">Contact us</a>
<a href="">Privacy Policy</a>
<a href="">Terms & Conditions</a>
</div>
<h6>© Cakes Co Ltd. 2023 Nazanin</h6>
</footer>
</body>
</html>
252 changes: 251 additions & 1 deletion Cakes-Co/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,251 @@
/* Add your styling here */
* {
margin: 0;
padding: 0;
}
body {
font-family: "Roboto", sans-serif;
font-size: 4vw;
background-image: linear-gradient(rgb(243, 207, 232), rgb(168, 247, 200), rgb(255, 126, 203));

}
h1 {
font-size: 2.4em;
font-weight: 500;
}
h4 {
font-size: 1.2em;
font-weight: 400;
font-style: italic;
}

h6 {
font-size: 0.7em;
font-weight: 200;
}
p {
font-size: 1em;
font-weight: 300;
line-height: 1.4em;
}
img {
width: 100%;
border-radius: 10%;
}

:root {

Choose a reason for hiding this comment

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

please move this to the root/top of the CSS file


--backgroundColor: linear-gradient(rgb(249, 170, 217), rgb(246, 239, 115), rgb(243, 129, 207));
--generalPadding: 1em;
--sectionGap: 2em;
--white: rgb(75, 6, 52);
}

header {
height: 40vw;
padding: var(--generalPadding);
background-color: var(--backgroundColor);
display: flex;
flex-direction: row;
justify-content: space-between;
color: var(--white);
}





.logo-img {
margin-top: var(--generalPadding);
height: 70%;
width: auto;
border-radius: 50%;

}
.header-area {

Choose a reason for hiding this comment

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

please consider using html5 semantic element header then css3 class name here

display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
text-align: end;
}
#menu-inpt {

Choose a reason for hiding this comment

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

please consider using a name which everyone can understand such as #menu-input then the one you are using also if this is to hide a hamburger menu icon on desktop devices then please consider using more meaningful name

display: none;
}
.menu-lbl {
height: 30%;
width: auto;
position: relative;
cursor: pointer;
}

.menu-img {
height: 100%;
}

.header-area p {

Choose a reason for hiding this comment

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

please consider using html5 semantic element header then using CSS3 class name here such as header p to target the element

width: 19ch;
}

.nav-nav {

Choose a reason for hiding this comment

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

please consider using html5 semantic element nav here

display: none;
width: min-content;
border-radius: var(--generalPadding);
padding: var(--generalPadding);
background-color: rgb(231, 119, 162);
position: absolute;
top: 70px;
right: 100%;
transition: 0s;
}

#menu-inpt:checked + .nav-nav {
display: block;
right: var(--generalPadding);
}

.nav-ul {

Choose a reason for hiding this comment

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

please consider using html5 semantic element nav and then the unordered list ul such as

Suggested change
.nav-ul {
nav ul {

width: min-content;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 1em;
}
.nav-a {

Choose a reason for hiding this comment

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

same as above

Suggested change
.nav-a {
nav a {

border: solid 1px;
text-decoration: none;
border-radius: 0.5em;
background-color: var(--backgroundColor);
padding: 0.25em 1em 0.2em;
color: var(--white);
}

main {
margin: var(--sectionGap) 0;
padding: var(--generalPadding);
display: flex;
flex-direction: column;
gap: var(--sectionGap);
}

#intro-sctn {
display: flex;
flex-direction: column;
gap: var(--sectionGap);
}

#images-sctn {
display: grid;
gap: var(--generalPadding);
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, auto);
}

footer {
height: 40vw;
padding: var(--generalPadding);
background-color: var(--backgroundColor);
display: flex;
flex-direction: column;
justify-content: space-between;
}

#nav-footer {

Choose a reason for hiding this comment

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

consider using html5 semantic element footer to target then IDs or css3 class

display: flex;
flex-direction: column;
gap: calc(var(--generalPadding) / 2);
}
#nav-footer a {
text-decoration: none;
color: var(--white);
font-size: 1em;
font-weight: 400;
}

footer h6 {
align-self: center;
color: var(--white);
}

@media screen and (min-width: 540px) {
body {
font-size: 2vw;
}
header {
height: 10vw;
}
.header-area {
justify-content: flex-end;
}

.nav-nav {
margin: var(--generalPadding) var(--generalPadding) 0;
display: flex;
width: auto;
border-radius: 0;
position: static;
justify-content: flex-end;
}

Choose a reason for hiding this comment

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

consider using something like this

Suggested change
nav ul

.nav-ul {
font-size: 0.75em;
display: flex;
flex-direction: row;
gap: 1em;
}

.menu-lbl {
display: none;
}

main {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, auto);
padding: 0 var(--generalPadding);
}
.nav-area {
justify-content: flex-end;
}
.nav-area img {
display: none;
}
.nav-area p {
width: auto;
}
#intro-sctn {
grid-column: 2/-1;
text-align: right;
}
#hero-sctn {
grid-column: 1/2;
grid-row: 1/2;
}

#images-sctn {
grid-column: 1/-1;
display: grid;
gap: var(--generalPadding);
grid-template-columns: repeat(4, 1fr);
grid-template-rows: auto;
display: grid;
grid-template-columns: auto auto auto auto;

}

footer {
height: 10vw;
gap: var(--sectionGap);
justify-content: center;
align-items: center;
}

#nav-footer {
display: flex;
flex-direction: row;
gap: calc(var(--generalPadding) * 2);
}
#hamburger {
display: none;
}
}

Loading