Skip to content
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
@@ -1,7 +1,7 @@
# Boilerplate for layout tasks
Replace `<your_account>` with your Github username and copy the links to Pull Request description:
- [DEMO LINK](https://<your_account>.github.io/layout_snake/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_snake/report/html_report/)
- [DEMO LINK](https://holytimy4.github.io/layout_snake/)
- [TEST REPORT LINK](https://holytimy4.github.io/layout_snake/report/html_report/)

> Follow [this instructions](https://mate-academy.github.io/layout_task-guideline)

Expand Down
33 changes: 21 additions & 12 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Snake</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>Snake</h1>
</body>
<head>
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Snake</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="container">
<div class="block block-1">1</div>
<div class="block block-2">2</div>
<div class="block block-3">3</div>
<div class="block block-4">4</div>
<div class="block block-5">5</div>
<div class="block block-6">6</div>
Comment on lines +15 to +20
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
<div class="block block-1">1</div>
<div class="block block-2">2</div>
<div class="block block-3">3</div>
<div class="block block-4">4</div>
<div class="block block-5">5</div>
<div class="block block-6">6</div>
<div class="block block--1">1</div>
<div class="block block--2">2</div>
<div class="block block--3">3</div>
<div class="block block--4">4</div>
<div class="block block--5">5</div>
<div class="block block--6">6</div>

</div>
</body>
</html>
88 changes: 88 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
body {
margin: 0;
padding: 0;
}

.container {
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: center;
}

.block {
display: flex;
flex-shrink: 0;
flex-grow: 1;

justify-content: center;
align-items: center;

height: 300px;
flex-basis: 300px;
background-color: black;

font-family: Arial, sans-serif;
font-size: 100px;
color: white;
}

.block-1 {
background-color: red;
}

.block-2 {
background-color: rgb(204, 0, 0);
}

.block-3 {
background-color: rgb(153, 0, 0);
}

.block-4 {
background-color: rgb(102, 0, 0);
}

.block-5 {
background-color: rgb(51, 0, 0);
}

.block-6 {
background-color: black;
}

@media (min-width:600px) {
.container {
flex-direction: row;
}
.block-3 {
order: 1;
}

.block-5 {
order: 2;
}

.block-6 {
order: 3;
}

}

@media (min-width:900px) {
.block {
flex-basis: calc(100% / 3);
}

.block-4 {
order: 6;
}

.block-5 {
order: 5;
}

.block-6 {
order: 4;
}
}