This repository was archived by the owner on Jan 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 596
London10 - Khalil Alhaydr -HTML-CSS-Week3-Cake Co #497
Open
Khlil1313
wants to merge
9
commits into
CodeYourFuture:master
Choose a base branch
from
Khlil1313:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f504a30
creating a navbar
Khlil1313 c1b5a4b
adding html
Khlil1313 f93c397
creating the navbar
Khlil1313 864826f
add the css for the upper and lower part
Khlil1313 7a22bfb
footer and footer_navbar
Khlil1313 31d7bef
finishing the mobile version
Khlil1313 0f0aeb8
finish the desktop version
Khlil1313 1098c64
change the image text position
Khlil1313 1d94855
changing the break point
Khlil1313 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,10 +7,68 @@ | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <title>Responsive Cake webpage</title> | ||
| <!-- Add a link to your css file here --> | ||
| <link rel="stylesheet" type="text/css" href="style.css" /> | ||
| <script type="text/javascript"> | ||
| function classToggle() { | ||
| const navs = document.querySelectorAll('.navbar_items') | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would indent these two lines to the right to make it look like they are separate |
||
| navs.forEach(nav => nav.classList.toggle('navbar_toggleShow')); | ||
| } | ||
| document.querySelector('.navbar_links_toggle') | ||
| .addEventListener('click', classToggle); | ||
| </script> | ||
|
|
||
| </head> | ||
|
|
||
| <body> | ||
|
|
||
| <!-- Add your markup here --> | ||
| <div class="navbar"> | ||
| <div class="navbar_links navbar_title">CakeCo</div> | ||
| <div class="navbar_links navbar_links_toggle">Menu</div> | ||
| <nav class="navbar_items"> | ||
| <div class="navbar_links"><a href="#">Home</a></div> | ||
| <div class="navbar_links"><a href="#">Cakes</a></div> | ||
| </nav> | ||
| <nav class="navbar_items navbar_items_right"> | ||
| <div class="navbar_links"><a href="#">Order in</a></div> | ||
| <div class="navbar_links"><a href="#">Lessons</a></div> | ||
| <div class="navbar_links"><a href="#">About</a></div> | ||
| </nav> | ||
|
|
||
|
|
||
|
|
||
| </div> | ||
|
|
||
| <div class="upper_part"> | ||
| <div class="upper_part_text"> | ||
| <h2>Welcome to CakeCo bakery</h2> | ||
| <p>We are proud to deliver cakes and pasteries for over 50 years</p> | ||
| </div> | ||
| <img src="./images/birthday_cake.jpg" width="100%"> | ||
| </div> | ||
| <div class="lower_part"> | ||
| <div class="lower_part_section1"> | ||
| <div><img class="birthday_cake" src="./images/birthday_cake1.jpg"><a href="#">Birthday Cake</a></div> | ||
| <div><img class="croissants" src="./images/croissants.jpg"><a href="#">croissants</a></div> | ||
| </div> | ||
| <div class="lower_part_section2"> | ||
| <div><img class="cupcake" src="./images/cupcake.jpg"><a href="#">Cupcake</a></div> | ||
| </div> | ||
| </div> | ||
| <div class="navbar_footer"> | ||
| <div class="lower_navbar"> | ||
|
|
||
| <div class="lower_navbar_links"><a href="#">Our policy</a></div> | ||
| <div class="lower_navbar_links"><a href="#">Recipes</a></div> | ||
| <div class="lower_navbar_links"><a href="#">Find us on social media</a></div> | ||
|
|
||
|
|
||
|
|
||
| </div> | ||
| <footer> | ||
| <p>Thanks for visiting our website, we hope to see you again soon.</p> | ||
| </footer> | ||
| </div> | ||
| </body> | ||
|
|
||
| </html> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,192 @@ | ||
| /* Add your styling here */ | ||
| .navbar { | ||
| display: flex; | ||
| background-color: black; | ||
| font-family: sans-serif; | ||
| font-size: 14px; | ||
| color: beige; | ||
| padding: 10px; | ||
| font-weight: bold; | ||
|
|
||
| } | ||
| .navbar a:hover { | ||
| color: coral; | ||
| } | ||
| .navbar_items, .navbar_items_right { | ||
| display: flex; | ||
|
|
||
| } | ||
| .navbar_links { | ||
| padding-right: 30px; | ||
| font-size: 20px; | ||
|
|
||
|
|
||
| } | ||
| .navbar_items_right { | ||
| margin-left: auto; | ||
|
|
||
| } | ||
| .navbar_links_toggle { | ||
| display: none; | ||
| } | ||
|
|
||
| @media only screen and (max-width: 540px){ | ||
| .navbar_items, .navbar { | ||
| flex-direction: column; | ||
| } | ||
| .navbar_items { | ||
| display: none; | ||
| } | ||
| .navbar_items_right { | ||
| margin-left: 0; | ||
| } | ||
| .navbar_links_toggle { | ||
| display: initial; | ||
| align-self: flex-end; | ||
| position: absolute; | ||
| cursor: pointer; | ||
| } | ||
| .navbar_toggleShow { | ||
| display: flex; | ||
| } | ||
| .upper_part { | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: center; | ||
|
|
||
| } | ||
| .upper_part > img { | ||
| margin-bottom: 80px; | ||
| } | ||
| .lower_part { | ||
| margin-left: 80px; | ||
| display: grid; | ||
| grid-template-areas: | ||
| "b cr" | ||
| "cu ."; | ||
| } | ||
| .birthday_cake { | ||
| grid-area: b; | ||
| width: 150px; | ||
| height: 150px; | ||
| } | ||
| .croissants { | ||
| grid-area: cr; | ||
| width: 150px; | ||
| height: 150px; | ||
| } | ||
| .cupcake { | ||
| grid-area: cu; | ||
| width: 150px; | ||
| height: 150px; | ||
| } | ||
| .lower_part_section1 { | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content:space-between; | ||
|
|
||
|
|
||
| } | ||
|
|
||
| .lower_part a { | ||
| display: flex; | ||
| align-items: center; | ||
| text-decoration: none; | ||
| margin-bottom: 40px; | ||
| color: brown; | ||
|
|
||
| } | ||
| .lower_navbar { | ||
| display: flex; | ||
| flex-direction: column; | ||
| margin-left: 15px; | ||
|
|
||
| } | ||
| .lower_navbar a { | ||
| margin-left: 10px; | ||
| text-decoration: none; | ||
| text-align: center; | ||
| display:inline-flex; | ||
| color: beige; | ||
| } | ||
|
|
||
| footer p { | ||
| margin-left: 20px; | ||
| color: beige; | ||
| } | ||
| .navbar_footer { | ||
| background-color: black; | ||
| } | ||
|
|
||
|
|
||
|
|
||
| } | ||
| @media screen and (min-width: 540px) { | ||
| .upper_part { | ||
| display: flex; | ||
| flex-direction: row-reverse; | ||
| justify-content:center; | ||
|
|
||
|
|
||
|
|
||
| } | ||
| .upper_part_text { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| justify-content: flex-end; | ||
| } | ||
| .upper_part img { | ||
| height: 300px; | ||
| width: 600px; | ||
| margin-top: 40px; | ||
| margin-right: 50px; | ||
| } | ||
| .navbar_items a { | ||
| text-decoration: none; | ||
| color:beige | ||
| } | ||
| .navbar_title { | ||
| color:cadetblue | ||
| } | ||
| .lower_part, .lower_part_section1, .lower_part_section2 { | ||
| display:flex; | ||
| } | ||
|
|
||
| .lower_part img { | ||
| height: 150px; | ||
| width: 250px; | ||
| margin-top: 300px; | ||
| margin-left: 30px; | ||
|
|
||
| } | ||
| .lower_part_section1 a, .lower_part_section2 a { | ||
| margin-left: 10px; | ||
| text-decoration: none; | ||
| display:block; | ||
| text-align: center; | ||
| color:coral; | ||
| margin-bottom: 150px; | ||
| } | ||
| .lower_part { | ||
| display: flex; | ||
| justify-content:center; | ||
| } | ||
| .navbar_footer { | ||
| background-color: coral; | ||
|
|
||
| } | ||
| .lower_navbar a { | ||
| text-decoration: none; | ||
| margin-left: 20px; | ||
| font-size: 20px; | ||
| font-weight: bold; | ||
| color: beige; | ||
|
|
||
| } | ||
| footer p { | ||
| margin-left: 20px; | ||
| } | ||
|
|
||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good attempt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script is getting called too early, which is why it cannot find the
.navbar_links_toggleThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like code