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

Черных Артём #64

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 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
Binary file added cats/Thumbs.db
Binary file not shown.
Binary file added cats/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/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/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/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/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/cat14.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/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/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/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/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/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/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/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/cat9.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/mini_size/Gav.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/mini_size/Thumbs.db
Binary file not shown.
Binary file added cats/mini_size/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/mini_size/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/mini_size/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/mini_size/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/mini_size/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/mini_size/cat14.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/mini_size/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/mini_size/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/mini_size/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/mini_size/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/mini_size/cat6.jpg
Binary file added cats/mini_size/cat7.jpg
Binary file added cats/mini_size/cat8.jpg
Binary file added cats/mini_size/cat9.jpg
136 changes: 136 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
body
{
padding: 0;
}

.note
{
width: 250px;
height: 410px;
display: inline-block;
vertical-align: top;
text-overflow: ellipsis;
padding: 5px;
margin: 1px;
position: relative;
}

.note:hover
{
background-color: #fa0;
transform: scale(1.05);
border: 3px black solid;
}

.cat
{
min-width: 250px;
height: 200px;
position: relative;
}

.cat img:hover
{
opacity: 1;
}

.cat img
{
position: absolute;
bottom: 0;
opacity: .8;
}

.note section
{
overflow: hidden;
text-overflow: ellipsis;
}

.note a
{
font-size: 2.2em;
text-overflow: ellipsis;
}

.note small span
{
text-decoration: underline;
cursor: pointer;
}

.price
{
color: #b00;
font: bold 1.5em sans-serif;

Choose a reason for hiding this comment

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

font: 700 1.5em sans-serif;

Copy link
Author

Choose a reason for hiding this comment

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

Это даёт какие-нибудь преимущества?


}

.price::after
{
content: attr(dataoldprice);
font-size: .75em;
color: black;
text-decoration: line-through;

}

.price:hover
{
text-shadow: 1px 1px 1px #000;
cursor: pointer;
}

.info,
.description
{
vertical-align: top;
}

.description
{
padding: 0;
margin: 0;
}

.description-head
{
display: block;
font: bold 1.05em serif;
}

.list:checked ~ .note
{
display: block;
min-width: 100%;
height: 100%;
vertical-align: top;
position: relative;
}

.list:checked ~ .note:hover
{
transform: scaleX(1);

Choose a reason for hiding this comment

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

Для чего переопределять значение? Можно же добавлять эффект, если выбран режим плиток

}

.list:checked ~ .note .cat
{
display: inline-block;
}

.list:checked ~ .note .cat img
{
top: 0;
}

.list:checked ~ .note .info,
.list:checked ~ .note .description
{
width: 35%;
}

.list:checked ~ .note section
{
display: inline-block;
padding-left: 30px;
}
245 changes: 245 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,252 @@
<html lang="ru">
<head>
<meta charset="utf-8">
<title>Мяндекс.Муррркет</title>
<link rel="stylesheet" type="text/css" href="index.css">
</head>
<body>
<input type="radio" name="view" value="grid" checked>Плитка
<input type="radio" name="view" value="list" class="list">Список
<br>
<br>
<article class="note">
<div class="cat">
<img src="cats/mini_size/cat1.jpg" alt="Пушок">
</div>
<section class="info">
<a href="cats/cat1.jpg">Пушок</a>
<br>
<small>
<span>пушистый</span> - <span>нехлеб</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starempty.png" alt="star empty">
<br>
<span class="price">150р</span>
</section>
<section class="description">
Хороший кот, только любит царапать мебель.
</section>
</article>

<article class="note">
<div class="cat">
<img src="cats/mini_size/Gav.jpg" alt="Гав">
</div>
<section class="info">
<a href="https://www.youtube.com/watch?v=HORAvz3e738">Гав</a>
<br>
<small>
<span>сиамский</span> - <span>анимационный</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<br>
<span class="price">1 котлета</span>
</section>
<section class="description">
Знает, как правильно делить сосиски, зачем нужен тайный язык и почему бояться
грозы нужно вместе с другом на чердаке.
</section>
</article>

<article class="note">
<div class="cat">
<img src="cats/mini_size/cat2.jpg" alt="Котозавр">
</div>
<section class="info">
<a href="cats/cat2.jpg">Котозавр</a>
<br>
<small>
<span>пушистый</span> - <span>грустный</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starempty.png" alt="star empty">
<img src="starempty.png" alt="star empty">
<br>
<span class="price">1337р</span>
</section>
<section class="description">
Грустный кот с большими глазами.
</section>
</article>

<article class="note">
<div class="cat">
<img src="cats/mini_size/cat3.jpg" alt="Навукотоносор">
</div>
<section class="info">
<a href="cats/cat3.jpg">Навукотоносор</a>
<br>
<small>
<span>полосатый</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starempty.png" alt="star empty">
<br>
<span class="price" id="1000&dollar;">322&dollar;</span>
</section>
<section class="description">
Милый котик.
</section>
</article>
<article class="note">
<div class="cat">
<img src="cats/mini_size/cat5.jpg" alt="Кот с длинным именем">
</div>
<section class="info">
<a href="cats/cat5.jpg">КотСДлиннымИменем</a>
<br>
<small>
<span>рыжий</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starempty.png" alt="star empty">
<img src="starempty.png" alt="star empty">
<br>
<span class="price">322&dollar;</span>
</section>
<section class="description">
БЕСПЛАТНАЯ доставка
<span class="description-head">Описание товара</span>
У этого кота длинное имя.
</section>
</article>
<article class="note">
<div class="cat">
<img src="cats/mini_size/cat14.jpg" alt="Бутеркот">
</div>
<section class="info">
<a href="cats/cat14.jpg">Бутеркот</a>
<br>
<small>
<span>большой</span> - <span>серый</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<br>
<span class="price">Бесплатно</span>
</section>
<section class="description">
Мясистый кот. Вес: 12 кг. У родителей было вкусное мясо. Сам бы съесл, да стал веганом.
</section>
</article>

<article class="note">
<div class="cat">
<img src="cats/mini_size/cat4.jpg" alt="Кiт">
</div>
<section class="info">
<a href="cats/cat4.jpg">Кiт</a>
<br>
<small>
<span>маленький</span> - <span>не серый</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starempty.png" alt="star empty">
<img src="starempty.png" alt="star empty">
<br>
<span class="price">20 гривень</span>
</section>
<section class="description">
Надоело быть кiтом. Переименуйте меня пожалуйста!
</section>
</article>

<article class="note">
<div class="cat">
<img src="cats/mini_size/cat7.jpg" alt="Барсик">
</div>
<section class="info">
<a href="cats/cat7.jpg">Барсик</a>
<br>
<small>
<span>без категории</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starempty.png" alt="star empty">
<br>
<span class="price" id="3000p">199.99р</span>
</section>
<section class="description">
<span class="description-head">Описание товара</span>
У этого кота отсутствует описание.
</section>
</article>
<article class="note">
<div class="cat">
<img src="cats/mini_size/cat11.jpg" alt="Шавермокот">
</div>
<section class="info">
<a href="cats/cat11.jpg">Шавермокот</a>
<br>
<small>
<span>слоистый</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starempty.png" alt="star empty">
<img src="starempty.png" alt="star empty">
<br>
<span class="price">199.99р</span>
</section>
<section class="description">
Эту породу кошек рекомедуют лучшие шаурмье.
</section>
</article>
<article class="note">
<div class="cat">
<img src="cats/mini_size/cat12.jpg" alt="Серьезный кот">
</div>
<section class="info">
<a href="cats/cat12.jpg">Серьезный кот</a>
<br>
<small>
<span>нешутник</span>
</small>
<br>
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<img src="starfull.png" alt="star full">
<br>
<span class="price">9999.99р</span>
</section>
<section class="description">
Ты думаешь я с тобой шутки шучу?
</section>
</article>
</body>
</html>
Binary file added starempty.png
Binary file added starfull.png