Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Frontend practice with catalog page using grid
Replace `<your_account>` with your Github username and copy the links to Pull Request description:
- [DEMO LINK](https://<your_account>.github.io/layout_catalog_grid/)
- [DEMO LINK](https://Luk2asz.github.io/layout_catalog_grid/)

> Follow [this instructions](https://github.com/mate-academy/layout_task-guideline#how-to-solve-the-layout-tasks-on-github)

Expand Down
18 changes: 9 additions & 9 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@
</head>
<body>
<header class="header">
<a class="header__logo" href="">
<a class="header__logo" href="home">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The href value for the header__logo link should start with a '/' to indicate the root directory (e.g. '/home')

<img src="./images/logo.png" alt="Moyo logo">
</a>

<nav class="nav">
<ul class="nav__list">
<li class="nav__item nav__item--is-active">
<a href="" class="nav__link">Apple</a>
<a href="Apple" class="nav__link">Apple</a>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

href attribute values should be started with lowercase e.g. apple

change this for the rest links also

</li>
<li class="nav__item">
<a href="" class="nav__link">Samsung</a>
<a href="Samsung" class="nav__link">Samsung</a>
</li>
<li class="nav__item">
<a href="" class="nav__link">Smartphones</a>
<a href="Smartphones" class="nav__link">Smartphones</a>
</li>
<li class="nav__item">
<a href="" class="nav__link">Laptops & computers</a>
<a href="Laptops & computers" class="nav__link">Laptops & computers</a>
</li>
<li class="nav__item">
<a href="" class="nav__link">Gadgets</a>
<a href="Gadgets" class="nav__link">Gadgets</a>
</li>
<li class="nav__item">
<a href="" class="nav__link">Tablets</a>
<a href="Tablets" class="nav__link">Tablets</a>
</li>
<li class="nav__item">
<a href="" class="nav__link">Photo</a>
<a href="Photo" class="nav__link">Photo</a>
</li>
<li class="nav__item">
<a href="" class="nav__link">Video</a>
<a href="Video" class="nav__link">Video</a>
</li>
</ul>
</nav>
Expand Down
23 changes: 20 additions & 3 deletions src/styles/_catalog.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.catalog {
display: flex;
flex-wrap: wrap;

display: grid;
gap: 48px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add here also justify-content: center to center all cards

max-width: 944px;
margin: 0 auto;

Expand All @@ -20,3 +19,21 @@
margin-right: 48px;
}
}

@media (min-width: 488px) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this all @media styling should be placed in .catalog class line 6, please move them up and then you can remove .catalog class from inside, it will automatically points to this class :)

Suggested change
@media (min-width: 488px) {
@media (min-width: 488px) {
grid-template-columns: repeat(2, 200px);
}

.catalog {
grid-template-columns: repeat(2, 200px);
}
}

@media (min-width: 768px) {
.catalog {
grid-template-columns: repeat(3, 200px);
}
}

@media (min-width: 1024px) {
.catalog {
grid-template-columns: repeat(4, 200px);
}
}