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

Snake solution #2971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
48 changes: 47 additions & 1 deletion .linthtmlrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
{
"extends": "@mate-academy/linthtml-config"
"attr-bans": [
"align",
"background",
"bgcolor",
"border",
"frameborder",
"style"
],
"attr-name-ignore-regex": "viewBox",
"attr-no-dup": true,
"attr-quote-style": "double",
"attr-req-value": true,
"class-no-dup": true,
"doctype-first": true,
"doctype-html5": true,
"fig-req-figcaption": true,
"head-req-title": true,
"html-req-lang": true,
"id-class-style": false,
"id-no-dup": true,
"img-req-src": true,
"img-req-alt": "allownull",
"indent-width": 2,
"indent-style": "spaces",
"indent-width-cont": true,
"input-radio-req-name": true,
"spec-char-escape": true,
"tag-bans": [
"b",
"i",
"u",
"center",
"style",
"marquee",
"font",
"s"
],
"tag-name-lowercase": true,
"tag-name-match": true,
"tag-self-close": "never",
"tag-close": true,
"text-ignore-regex": "&",
"title-no-dup": true,
"line-end-style": "lf",
"attr-new-line": 2,
"attr-name-style": "dash",
"attr-no-unsafe-char": true
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mate-academy/bemlint": "^0.1.1",
"@mate-academy/eslint-config": "*",
"@mate-academy/linthtml-config": "0.0.2",
"@mate-academy/scripts": "^0.9.1",
"@mate-academy/scripts": "^1.2.8",
"@mate-academy/stylelint-config": "*",
"backstopjs": "^5.0.1",
"eslint": "^5.16.0",
Expand Down
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://nenatre.github.io/layout_snake/)
- [TEST REPORT LINK](https://nenatre.github.io/layout_snake/report/html_report/)

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

Expand Down
46 changes: 35 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
<!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="section">
<div class="blocks block_1">
1
</div>

<div class="blocks block_2">
2
</div>

<div class="blocks block_3">
3
</div>

<div class="blocks block_4">
4
</div>

<div class="blocks block_5">
5
</div>

<div class="blocks block_6">
6
</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 @@
* {
box-sizing: border-box;
}

body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}

.section {
display: flex;
flex-wrap: wrap;
flex-direction: row;
}

.blocks {
display: flex;
justify-content: center;
align-items: center;
font-size: 100px;
color: white;
height: 300px;
}

.block_1 {
background-color: rgb(255, 0, 0) ;
}

.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: rgb(0, 0, 0);
}

@media (min-width: 752px) {
.blocks {
flex-basis: 33.3%;
}

.block_4 {
order: 3;
}

.block_5 {
order: 2;
}

.block_6 {
order: 1;
}
}

@media screen and (max-width: 751px) {
.blocks {
flex-basis: 50%;
}
.block_3 {
order: 3;
}

.block_4 {
order: 2;
}

.block_5 {
order: 4;
}

.block_6 {
order: 5;
}
}

@media screen and (max-width:451px) {
.blocks {
flex-basis: 100% ;
}
.block_3 {
order: 2;
}
}