Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The page should match the design Pixel Perfect: all the sizes, colors and distan

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_moyo-header/report/html_report/)
- [DEMO LINK](https://MissDragi.github.io/layout_moyo-header/)
- [TEST REPORT LINK](https://MissDragi.github.io/layout_moyo-header/report/html_report/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
113 changes: 111 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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"

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'.

/>
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item">
<a
href="apple"

Choose a reason for hiding this comment

The 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"

Choose a reason for hiding this comment

The 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"

Choose a reason for hiding this comment

The 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"

Choose a reason for hiding this comment

The 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"

Choose a reason for hiding this comment

The 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"

Choose a reason for hiding this comment

The 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"

Choose a reason for hiding this comment

The 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"

Choose a reason for hiding this comment

The 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>
137 changes: 137 additions & 0 deletions src/reset.css
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;
}
76 changes: 76 additions & 0 deletions src/style.css
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);

Choose a reason for hiding this comment

The 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;

Choose a reason for hiding this comment

The 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);
}
Loading