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

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

Expand Down
29 changes: 18 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<!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="snake_item item-1">1</div>
<div class="snake_item item-2">2</div>
<div class="snake_item item-3">3</div>
<div class="snake_item item-4">4</div>
<div class="snake_item item-5">5</div>
<div class="snake_item item-6">6</div>
</div>
</body>
</html>
119 changes: 119 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
body {
margin: 0;
--height-item: 300px;
}

.container {
display: flex;
flex-direction: column;
}

.snake_item {
font-family: Arial, Helvetica, sans-serif;
font-size: 100px;
color: white;
text-align: center;
line-height: 300px;
height: var(--height-item);
min-width: 300px;
}

.item-1 {
background-color: rgb(100%, 0%, 0%);
}

.item-2 {
background-color: rgb(80%, 0%, 0%);
}

.item-3 {
background-color: rgb(60%, 0%, 0%);
}

.item-4 {
background-color: rgb(40%, 0%, 0%);
}

.item-5 {
background-color: rgb(20%, 0%, 0%);
}

.item-6 {
background-color: rgb(0%, 0%, 0%);
}

@media (min-width: 600px) {
.container {
flex-direction: row;
flex-wrap: wrap;
}
.snake_item {
min-width: 50%;
}

.item-1 {
order: -6;
}

.item-2 {
order: -5;
}

.item-3 {
order: -3;
}

.item-4 {
order: -4;
}

.item-5 {
order: -2;
}

.item-6 {
order: -1;
}
}

@media (min-width: 900px) {
.container {
flex-direction: row;
flex-wrap: wrap;
}
.snake_item {
min-width: 33.32%;
}

.item-1 {
order: -6;
}

.item-2 {
order: -5;
}

.item-3 {
order: -4;
}

.item-4 {
order: -1;
}

.item-5 {
order: -2;
}

.item-6 {
order: -3;
}

}

@media (min-width: 4096px) {
.container {
flex-direction: row;
flex-wrap: wrap;
}
}