-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 #6121
base: master
Are you sure you want to change the base?
add task solution #6121
Changes from 1 commit
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 |
---|---|---|
@@ -1,6 +1,18 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" | ||
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 Google Fonts link includes a range of weights (100..900), but the task requires only the medium (500) weight. Please adjust 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 |
||
rel="stylesheet" | ||
/> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
name="viewport" | ||
|
@@ -17,6 +29,42 @@ | |
/> | ||
</head> | ||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
href="#index" | ||
class="logo" | ||
> | ||
<img | ||
src="/src/images/logo.png" | ||
alt="Moyo Logo" | ||
/> | ||
</a> | ||
<nav class="nav"> | ||
<ul class="nav-list"> | ||
<li> | ||
<a | ||
class="is-active" | ||
href="#apple" | ||
> | ||
Apple | ||
</a> | ||
</li> | ||
<li><a href="#samsung">Samsung</a></li> | ||
<li><a href="#smartphones">Smartphones</a></li> | ||
<li> | ||
<a | ||
data-qa="hover" | ||
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 |
||
> | ||
Laptops & Computers | ||
</a> | ||
</li> | ||
<li><a href="#gadgets">Gadgets</a></li> | ||
<li><a href="#tablets">Tablets</a></li> | ||
<li><a href="#photo">Photo</a></li> | ||
<li><a href="#video">Video</a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,83 @@ | ||
html { | ||
--link-color: #00acdc; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
font-family: Roboto, sans-serif; | ||
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. Ensure that the 'Roboto' font is correctly linked in the HTML file. If the font is not loading properly, check the link in the HTML file to ensure it's correct. |
||
font-size: 12px; | ||
font-weight: 500; | ||
font-style: normal; | ||
box-sizing: border-box; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 0 50px; | ||
} | ||
|
||
.logo { | ||
/* display: block; | ||
padding: 10px 0; */ | ||
Comment on lines
+22
to
+23
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. These commented-out styles for |
||
height: 40px; | ||
} | ||
|
||
.nav-list { | ||
display: flex; | ||
align-items: center; | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
li { | ||
/* display: flex; | ||
text-align: center; | ||
height: 60px; | ||
line-height: 60px; */ | ||
Comment on lines
+36
to
+39
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. These commented-out styles for |
||
margin-left: 20px; | ||
} | ||
|
||
a { | ||
display: flex; | ||
height: 100%; | ||
text-decoration: none; | ||
} | ||
|
||
nav a { | ||
display: block; | ||
height: 60px; | ||
line-height: 60px; | ||
text-align: center; | ||
text-decoration: none; | ||
text-transform: uppercase; | ||
color: #000; | ||
font-weight: 500; | ||
width: 100%; | ||
} | ||
|
||
li:first-child { | ||
margin-left: 0; | ||
} | ||
|
||
nav a:hover { | ||
color: var(--link-color); | ||
} | ||
|
||
nav a.is-active { | ||
position: relative; | ||
color: var(--link-color); | ||
} | ||
|
||
nav a.is-active::after { | ||
position: absolute; | ||
content: ''; | ||
border-radius: 8px; | ||
background-color: var(--link-color); | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 4px; | ||
} |
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 font weight values in the Google Fonts URL are incorrect. The range should be specified with a comma for different styles, not with '..'. For example, use '0,100;1,100' instead of '0,100..900;1,100..900'.