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

Авинас Мария #44

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Binary file added cats_photos/cat1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat12.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat13.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cats_photos/cat9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
.card-to-list:checked ~ main .catPhoto

Choose a reason for hiding this comment

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

list-view-checkbox

Choose a reason for hiding this comment

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

вместо card-to-list

Choose a reason for hiding this comment

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

не стоит называть классы в camelCase, css не регистрочувствителен
лучше разделять дефисом: cat-photo

{

Choose a reason for hiding this comment

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

лишний отступ при каждом селекторе

Choose a reason for hiding this comment

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

должно быть:

selector
{
    rules
}

width: 25%;
display: inline-block;
}

.card-to-list:checked ~ main .information
{
display: inline-block;
vertical-align: top;
}

.card-to-list:checked ~ main .information .name
{
width: 100%;
Copy link

@trixartem trixartem Nov 14, 2016

Choose a reason for hiding this comment

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

  1. Точно такое же свойство ниже
  2. Для чего ширину менять?

}

.card-to-list:checked ~ main .card
{
width: 100%;

Choose a reason for hiding this comment

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

Здесь тоже не понятно зачем устанавливать ширину 100%

}

header

Choose a reason for hiding this comment

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

Лучше не использовать в селекторе тег, который может быть испольован не один раз на странице

{
font-size: 2em;
text-align: center;
background-color: white;
}

header:first-letter
{
color: red;
}

.card
{
margin: 5px 0;
display: inline-table;

Choose a reason for hiding this comment

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

Почему inline-table?

width: 250px;
text-overflow: ellipsed;

Choose a reason for hiding this comment

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

Не правильное свойство. Оно не будет работать.

}

.name a:hover
{
color: red;
}

.category:hover
{
color: gray;
text-decoration: underline;
}

.card:hover
{
background-color: lightgray;

Choose a reason for hiding this comment

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

Лучше не описывать цвет словом, а с помощью hex записи

Choose a reason for hiding this comment

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

Лучше использовать hex запись, что бы запись была короче и этот цвет проще менять(делать светлее темнее и т. д.).

border: 1px solid black;

Choose a reason for hiding this comment

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

#000 короче

}

img

Choose a reason for hiding this comment

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

Лучше не использовать в селекторе тег, который может быть испольован не один раз на странице
чтобы не получилось, что если у нас появится картинка, например, в хедере, к ней применился лишний стиль

{
max-width: 100%;
}

body
{
background-color: #ff6;
}

.name
{
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

a
{
color: black;
}

.price .current
{
color: red;
font-size: larger;
}

.image-for-list

Choose a reason for hiding this comment

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

list-icon

{
width: 30px;
}
281 changes: 280 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,287 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="index.css">
<meta charset="utf-8">
<title>Мяндекс.Мурркет</title>
</head>
<body>
<header>
Мяндекс.Муррркет<br>
<span>Магазин добрых котиков</span>
</header>
<br>

Choose a reason for hiding this comment

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

зачем <br>? Если нужен отступ, лучше делать margin-bottom

<input type="checkbox" class="card-to-list">

Choose a reason for hiding this comment

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

лишний отступ

<img alt="list" src="spisok.png" title="Список" class="image-for-list">

Choose a reason for hiding this comment

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

alt

<main>
<div class="card">

Choose a reason for hiding this comment

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

article

Choose a reason for hiding this comment

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

Где семантика?

<img class="catPhoto" alt="котик №1" src="cats_photos/cat1.jpg">

Choose a reason for hiding this comment

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

alt должен описывать содержание картинки, например, "фото полосатого кота"

<div class="information">
<div class="name" >
<a href="#">Мурзик</a>
</div>
<div class="category">Полосатый</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">12 мурлей</ins>

Choose a reason for hiding this comment

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

👍

<del class="old">14 мурлей</del>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №2" src="cats_photos/cat2.jpg">
<div class="information">
<div class="name">
<a href="#">Рыжик</a>
</div>
<div class="category">Полосатый,Рыжий, Вислоухий</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">11 мурлей</ins>
<del class="old">13 мурлей</del>

Choose a reason for hiding this comment

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

лучше назвать old-price и current-price
иначе непонятно будет, когда встретим в css класс old
Или кто-то может создать класс old для отображения другого элемента и это повлияет на это место

</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №3" src="cats_photos/cat3.jpg">
<div class="information">
<div class="name">
<a href="#">Пушок</a>
</div>
<div class="category">Полосатый, Вислоухий</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">11 мурлей</ins>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №4" src="cats_photos/cat4.jpg">
<div class="information">
<div class="name">
<a href="#">Кеша</a>

Choose a reason for hiding this comment

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

Лишняя вложенность, кажется что достаточно одной ссылки

</div>
<div class="category">Полосатый</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">10 мурлей</ins>
<del class="old">12 мурлей</del>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №5" src="cats_photos/cat5.jpg">
<div class="information">
<div class="name">
<a href="#">Соня</a>
</div>
<div class="category">Рыжий</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">12 мурлей</ins>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №6" src="cats_photos/cat6.jpg">
<div class="information">
<div class="name">
<a href="#">Великий и ужасный Бонифаций IV, но можно просто Боня</a>
</div>
<div class="category">Котенок</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">13 мурлей</ins>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №7" src="cats_photos/cat7.jpg">
<div class="information">
<div class="name">
<a href="#">Кнопа</a>
</div>
<div class="category">Котёнок, Рыжий</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">13 мурлей</ins>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №8" src="cats_photos/cat8.jpg">
<div class="information">
<div class="name">
<a href="#">Стеша</a>
</div>
<div class="category">Рыжий, Пушистый</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">11 мурлей</ins>
<del class="old">13 мурлей</del>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №9" src="cats_photos/cat9.jpg">
<div class="information">
<div class="name">
<a href="#">Барсик</a>
</div>
<div class="category">Полосатый</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">11 мурлей</ins>
<del class="old">13 мурлей</del>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №10" src="cats_photos/cat10.jpg">
<div class="information">
<div class="name">
<a href="#">Муся</a>
</div>
<div class="category">Рыжий, Пушистый</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">10 мурлей</ins>
<del class="old">12 мурлей</del>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №11" src="cats_photos/cat11.jpg">
<div class="information">
<div class="name">
<a href="#">Васька</a>
</div>
<div class="category">Полосатый</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">11 мурлей</ins>
<del class="old">13 мурлей</del>
</div>
<div class="description">Самый лучший котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №12" src="cats_photos/cat12.jpg">
<div class="information">
<div class="name">
<a href="#">Ужас, летящий на крыльях ночи</a>
</div>
<div class="category">Черный</div>
<div class="raiting">
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">11 мурлей</ins>
<del class="old">13 мурлей</del>
</div>
<div class="description">Самый добрый котик!</div>
</div>
</div>
<div class="card">
<img class="catPhoto" alt="котик №13" src="cats_photos/cat13.jpg">
<div class="information">
<div class="name">
<a href="#">Мистер Усач</a>
</div>
<div class="category">Необычный окрас</div>
<div class="raiting">
<span>&#9733;</span>
<span>&#9733;</span>
<span>&#9733;</span>
<span>&#9733;</span>
<span>&#9734;</span>
</div>
<div class="price">
<ins class="current">14 мурлей</ins>
</div>
<div class="description">Самый оригинальный котик!</div>
</div>
</div>
</main>
</body>
</html>
Binary file added spisok.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.