From 00357cd9cc3ba6ce1adfde9b874c6982ae2fcce1 Mon Sep 17 00:00:00 2001 From: LabPetro Date: Thu, 8 Jun 2023 00:32:55 +0300 Subject: [PATCH] add task solution snake task --- readme.md | 4 +- src/index.html | 34 +++++++++++------ src/style.css | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 13 deletions(-) diff --git a/readme.md b/readme.md index 4b7905be2..954b2c281 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # Boilerplate for layout tasks Replace `` with your Github username and copy the links to Pull Request description: -- [DEMO LINK](https://.github.io/layout_snake/) -- [TEST REPORT LINK](https://.github.io/layout_snake/report/html_report/) +- [DEMO LINK](https://LabPetro.github.io/layout_snake/) +- [TEST REPORT LINK](https://LabPetro.github.io/layout_snake/report/html_report/) > Follow [this instructions](https://mate-academy.github.io/layout_task-guideline) diff --git a/src/index.html b/src/index.html index b20c6e96c..555195bb2 100644 --- a/src/index.html +++ b/src/index.html @@ -1,14 +1,26 @@ - - - - - Snake - - - -

Snake

- + + + + + Snake + + + +
+
1
+ +
2
+ +
3
+ +
4
+ +
5
+ +
6
+
+ diff --git a/src/style.css b/src/style.css index e69de29bb..f601e53f1 100644 --- a/src/style.css +++ b/src/style.css @@ -0,0 +1,102 @@ +* { + box-sizing: border-box; +} + +body { + margin: 0; +} + +.container { + margin: auto; + display: flex; + flex-wrap: wrap; + flex-direction: column; +} + +.block { + height: 300px; + min-width: 300px; + color: white; + font-family: Arial, Helvetica, sans-serif; + font-size: 100px; + display: flex; + flex-grow: 1; + flex-shrink: 0; + justify-content: center; + align-items: center; +} + +.box--1 { + background-color: rgb(100%, 0%, 0%); +} + +.box--2 { + background-color: rgb(80%, 0%, 0%); +} + +.box--3 { + background-color: rgb(60%, 0%, 0%); +} + +.box--4 { + background-color: rgb(40%, 0%, 0%); +} + +.box--5 { + background-color: rgb(20%, 0%, 0%); +} + +.box--6 { + background-color: rgb(0%, 0%, 0%); +} + +@media (min-width: 600px) { + .container { + flex-direction: row; + flex-basis: 50%; + } + + .box--1 { + order: -3; + } + .box--2 { + order: -2; + } + + .box--4 { + order: -1; + } + + .box--3 { + order: 0; + } +} + +@media (min-width: 900px) { + .container { + flex-basis: 33.3%; + } + + .block { + min-width: 33%; + } + + .box--1 { + order: -4; + } + .box--2 { + order: -3; + } + + .box--3 { + order: -2; + } + + .box--6 { + order: -1; + } + + .box--4 { + order: 1; + } +}