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 @@
# Antisnake
Replace `<your_account>` with your Github username and copy the links to Pull Request description:
- [DEMO LINK](https://<your_account>.github.io/layout_antisnake/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_antisnake/report/html_report/)
- [DEMO LINK](https://usernameluke.github.io/layout_antisnake/)
- [TEST REPORT LINK](https://usernameluke.github.io/layout_antisnake/report/html_report/)

> Follow [this instructions](https://github.com/mate-academy/layout_task-guideline#how-to-solve-the-layout-tasks-on-github)
___
Expand Down
32 changes: 22 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Antisnake</title>
<link rel="stylesheet" href="./styles/main.scss">
</head>
<body>
<h1>Antisnake</h1>
</body>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Antisnake!</title>
<link rel="stylesheet" href="./styles/main.css">
</head>
<body>
<div class="blocks">
<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>
6 changes: 6 additions & 0 deletions src/styles/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$colourOne: red;
$colourTwo: rgb(204, 0, 0);
$colourThree: rgb(153, 0, 0);
$colourFour: rgb(96, 0, 0);
$colourFive:rgb(48, 0, 0);
$colourSix: black;
51 changes: 51 additions & 0 deletions src/styles/blocks.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.blocks {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr;
}

.block {
display: flex;
justify-content: center;
align-items: center;
min-width: 300px;
min-height: 300px;

&--1 {
background-color: $colourOne;
}

&--2 {
background-color: $colourTwo;
}

&--3 {
background-color: $colourThree;
}

&--4 {
background-color: $colourFour;
}

&--5 {
background-color: $colourFive;
}

&--6 {
background-color: $colourSix;
}
}

@media (max-width: 599px) {
.blocks {
grid-template-columns: auto;
grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr;
}
}

@media (min-width: 600px) and (max-width: 899px) {
.blocks {
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
}
}
64 changes: 64 additions & 0 deletions src/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/styles/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
body {
margin: 0;
}
@import "./variables";
@import "./reset.scss";
@import "./blocks.scss";
10 changes: 10 additions & 0 deletions src/styles/reset.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* {
box-sizing: border-box;
}

body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
font-size: 100px;
color: white;
}