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://Huracann.github.io/layout_snake/)
- [TEST REPORT LINK](https://Huracann.github.io/layout_snake/report/html_report/)

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

Expand Down
42 changes: 31 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
<!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>
<!-- <h1>Snake</h1> -->
<div class="all__boxes">
<div class="box box1">
<div class="text">1</div>
</div>
<div class="box box2">
<div class="text">2</div>
</div>
<div class="box box3">
<div class="text">3</div>
</div>
<div class="box box4">
<div class="text">4</div>
</div>
<div class="box box5">
<div class="text">5</div>
</div>
<div class="box box6">
<div class="text">6</div>
</div>
</div>
</body>
</html>
96 changes: 96 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
body {
margin: 0;
padding: 0;
}

.all__boxes {
display: flex;
flex-wrap: wrap;
flex-direction: column;
}

.box {
--max-height: 300px;

height: var(--max-height);
flex-basis: var(--max-height);
display: flex;
align-items: center;
justify-content: center;
}

.text {
font-family: Arial, sans-serif;
font-size: 100px;
color: rgb(255, 255, 255);
}

.box1 {
order: 1;
background-color: rgb(255, 0, 0);
}

.box2 {
order: 2;
background-color: rgb(calc(255 * 0.8), 0, 0);
}

.box3 {
order: 3;
background-color: rgb(calc(255 * 0.6), 0, 0);
}

.box4 {
order: 4;
background-color: rgb(calc(255 * 0.4), 0, 0);
}

.box5 {
order: 5;
background-color: rgb(calc(255 * 0.2), 0, 0);
}

.box6 {
order: 6;
background-color: rgb(0, 0, 0);
}

@media (min-width: 600px) {
.all__boxes {
flex-direction: row;
}

.box {
flex-basis: 50%;
}

.box3 {
order: 4;
}

.box4 {
order: 3;
}
}

@media (min-width: 900px) {
.all__box {
flex-direction: row;
}

.box {
flex-basis: calc(100% / 3);
}

.box4 {
order: 6;
}

.box5 {
order: 5;
}

.box6 {
order: 4;
}
}