-
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 #5864
base: master
Are you sure you want to change the base?
add task solution #5864
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 |
---|---|---|
|
@@ -13,10 +13,119 @@ | |
<title>Moyo header</title> | ||
<link | ||
rel="stylesheet" | ||
href="./style.css" | ||
href="reset.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="style.css" | ||
/> | ||
<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:wght@400;500;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</head> | ||
|
||
<body> | ||
<h1>Moyo header</h1> | ||
<header class="header"> | ||
<a | ||
href="index.html" | ||
class="main_logo" | ||
title="On main page" | ||
> | ||
<img | ||
class="logo" | ||
src="/src/images/logo.png" | ||
width="40" | ||
height="40" | ||
alt="Moyo.png" | ||
/> | ||
</a> | ||
|
||
<nav class="nav"> | ||
<ul class="nav__list"> | ||
<li class="nav__item"> | ||
<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 href attribute value 'apple' seems to be a relative path. Ensure that this path correctly points to the intended resource or page. Consider using a more descriptive path or filename if necessary. |
||
class="link is-active" | ||
> | ||
Apple | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<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 href attribute value 'samsung' should be checked to ensure it correctly points to the intended resource. Consider using a more descriptive path or filename if necessary. |
||
class="link" | ||
> | ||
Samsung | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<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 href attribute value 'smartphones' should be verified to ensure it correctly points to the intended resource. Consider using a more descriptive path or filename if necessary. |
||
class="link" | ||
> | ||
Smartphones | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<a | ||
class="link" | ||
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 href attribute value 'laptops&computers' contains an ampersand. Ensure that this URL is correctly formatted and points to the intended resource. Consider using URL encoding if necessary. |
||
data-qa="hover" | ||
> | ||
Laptops & Computers | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<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 href attribute value 'gadgets' should be verified to ensure it correctly points to the intended resource. Consider using a more descriptive path or filename if necessary. |
||
class="link" | ||
> | ||
Gadgets | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<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 href attribute value 'tablets' should be verified to ensure it correctly points to the intended resource. Consider using a more descriptive path or filename if necessary. |
||
class="link" | ||
> | ||
Tablets | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<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 href attribute value 'photo' should be verified to ensure it correctly points to the intended resource. Consider using a more descriptive path or filename if necessary. |
||
class="link" | ||
> | ||
Photo | ||
</a> | ||
</li> | ||
|
||
<li class="nav__item"> | ||
<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 href attribute value 'video' should be verified to ensure it correctly points to the intended resource. Consider using a more descriptive path or filename if necessary. |
||
class="link" | ||
> | ||
Video | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
/* http://meyerweb.com/eric/tools/css/reset/ | ||
v2.0 | 20110126 | ||
License: none (public domain) | ||
*/ | ||
|
||
html, | ||
body, | ||
div, | ||
span, | ||
applet, | ||
object, | ||
iframe, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
p, | ||
blockquote, | ||
pre, | ||
a, | ||
abbr, | ||
acronym, | ||
address, | ||
big, | ||
cite, | ||
code, | ||
del, | ||
dfn, | ||
em, | ||
img, | ||
ins, | ||
kbd, | ||
q, | ||
s, | ||
samp, | ||
small, | ||
strike, | ||
strong, | ||
sub, | ||
sup, | ||
tt, | ||
var, | ||
b, | ||
u, | ||
i, | ||
center, | ||
dl, | ||
dt, | ||
dd, | ||
ol, | ||
ul, | ||
li, | ||
fieldset, | ||
form, | ||
label, | ||
legend, | ||
table, | ||
caption, | ||
tbody, | ||
tfoot, | ||
thead, | ||
tr, | ||
th, | ||
td, | ||
article, | ||
aside, | ||
canvas, | ||
details, | ||
embed, | ||
figure, | ||
figcaption, | ||
footer, | ||
header, | ||
hgroup, | ||
menu, | ||
nav, | ||
output, | ||
ruby, | ||
section, | ||
summary, | ||
time, | ||
mark, | ||
audio, | ||
video, | ||
text { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font-size: 100%; | ||
font-style: inherit; | ||
vertical-align: baseline; | ||
white-space: normal; | ||
} | ||
|
||
/* HTML5 display-role reset for older browsers */ | ||
article, | ||
aside, | ||
details, | ||
figcaption, | ||
figure, | ||
footer, | ||
header, | ||
hgroup, | ||
menu, | ||
nav, | ||
section { | ||
display: block; | ||
} | ||
|
||
body { | ||
line-height: 1; | ||
} | ||
|
||
ol, | ||
ul { | ||
list-style: none; | ||
} | ||
|
||
blockquote, | ||
q { | ||
quotes: none; | ||
} | ||
|
||
blockquote::before, | ||
blockquote::after, | ||
q::before, | ||
q::after { | ||
content: ''; | ||
content: none; | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,79 @@ | ||
body { | ||
--link-color: #00acdc; | ||
--main-color: #000; | ||
--header-color: #fff; | ||
|
||
margin: 0; | ||
font-family: Roboto, sans-serif; | ||
font-weight: 500; | ||
background-color: rgb(231, 231, 228); | ||
} | ||
|
||
header { | ||
position: relative; | ||
display: flex; | ||
width: 100%; | ||
align-items: center; | ||
justify-content: space-between; | ||
box-sizing: border-box; | ||
background-color: var(--header-color); | ||
} | ||
|
||
.main_logo { | ||
display: flex; | ||
width: 140px; | ||
} | ||
|
||
.logo { | ||
display: block; | ||
margin: auto; | ||
} | ||
|
||
.nav { | ||
margin-right: 50px; | ||
} | ||
|
||
.nav__list { | ||
display: flex; | ||
list-style: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.nav__item { | ||
margin-right: 20px; | ||
} | ||
|
||
.nav__item:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.link { | ||
position: relative; | ||
text-decoration: none; | ||
text-transform: uppercase; | ||
color: var(--main-color); | ||
line-height: 60px; | ||
font-size: 12px; | ||
display: inline-block; | ||
} | ||
|
||
.link:hover { | ||
color: var(--link-color); | ||
} | ||
|
||
.is-active.link { | ||
color: var(--link-color); | ||
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 selector '.is-active.link' might be overly specific. Consider using '.link.is-active' to maintain consistency with other class selectors and avoid specificity conflicts. |
||
} | ||
|
||
.is-active::after { | ||
content: ''; | ||
position: absolute; | ||
color: #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. The 'color' property in '.is-active::after' is not necessary since the pseudo-element is a block with a background color. You can remove this line to clean up the code. |
||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
height: 4px; | ||
border-radius: 4px; | ||
background-color: var(--link-color); | ||
} |
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 alt attribute for the image is 'Moyo.png', which is not descriptive. Alt text should describe the content or function of the image, such as 'Moyo Logo'.