-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add task solution #5825
base: master
Are you sure you want to change the base?
add task solution #5825
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,19 @@ | |
name="viewport" | ||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
crossorigin="anonymous" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<meta | ||
http-equiv="X-UA-Compatible" | ||
content="ie=edge" | ||
|
@@ -18,5 +31,82 @@ | |
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header> | ||
<a href="logo" class="images"> | ||
<img | ||
src="images/logo.png" alt="Moyo" | ||
class="images" | ||
/> | ||
</a> | ||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li> | ||
<a | ||
href="Apple" | ||
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. The 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. The |
||
class="nav__link is-active" | ||
> | ||
APPLE | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="Samsung" | ||
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. The 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. The |
||
class="nav__link" | ||
> | ||
SAMSUNG | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="Smartphones" | ||
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. The 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. The |
||
class="nav__link" | ||
> | ||
SMARTPHONES | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="Laptops&computers" | ||
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. The 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. The |
||
class="nav__link" | ||
data-qa="hover" | ||
> | ||
LAPTOPS & COMPUTERS | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="Gadgets" | ||
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. The 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. The |
||
class="nav__link" | ||
> | ||
GADGETS | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="Tablets" | ||
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. The 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. The |
||
class="nav__link" | ||
> | ||
TABLETS | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="Photo" | ||
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. The 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. The |
||
class="nav__link" | ||
> | ||
PHOTO | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="Video" | ||
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. The 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. The |
||
class="nav__link" | ||
> | ||
VIDEO | ||
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. Text transformation should be handled using CSS. Consider using CSS to transform text to uppercase instead of directly using uppercase letters in HTML. |
||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,76 @@ | ||
body { | ||
font-family: Roboto, sans-serif; | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 14px; | ||
margin: 0; | ||
|
||
--text-color-second: #00acdc; | ||
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. Good job using a CSS variable for the blue color. This aligns with the task requirement to use CSS variables. |
||
} | ||
|
||
header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
box-sizing: border-box; | ||
width: 100%; | ||
text-transform: uppercase; | ||
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. Text transformation is correctly handled using CSS with |
||
height: 60px; | ||
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. The header height is set explicitly, which meets the task requirement to ensure the header height is set in one place. |
||
} | ||
|
||
.nav__list { | ||
list-style-type: none; | ||
display: flex; | ||
padding: 0; | ||
margin: 0; | ||
margin-left: 20px; | ||
justify-content: space-between; | ||
} | ||
|
||
.nav__link { | ||
display: flex; | ||
color: black; | ||
font-style: normal; | ||
text-decoration: none; | ||
margin-right: 20px; | ||
line-height: 60px; | ||
text-align: center; | ||
position: relative; | ||
align-items: center; | ||
} | ||
|
||
.nav { | ||
margin-right: 30px; | ||
} | ||
|
||
.nav__link:hover { | ||
color: var(--text-color-second); | ||
text-decoration: none; | ||
} | ||
|
||
.is-active { | ||
color: var(--text-color-second); | ||
position: relative; | ||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
position: absolute; | ||
display: block; | ||
background-color: var(--text-color-second); | ||
text-align: center; | ||
height: 4px; | ||
width: 100%; | ||
border-radius: 8px; | ||
bottom: 0; | ||
right: 0; | ||
left: 0; | ||
} | ||
|
||
.images { | ||
margin: 10px 50px; | ||
} | ||
|
||
li:last-child { | ||
margin-right: 0; | ||
} |
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
href
attribute for the logo link should be a valid URL or path. Consider using a relative path like./index.html
if this is meant to link back to the homepage.