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
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",
"colors": "^1.3.3",
Expand Down
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://maksym-mishchanchuk.github.io/layout_antisnake/)
- [TEST REPORT LINK](https://maksym-mishchanchuk.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
25 changes: 15 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<!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.scss">
</head>
<body class="page">
<div class="page__block block"></div>
<div class="page__block block"></div>
<div class="page__block block"></div>
<div class="page__block block"></div>
<div class="page__block block"></div>
<div class="page__block block"></div>
</body>
</html>
37 changes: 37 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
$gradient-color-black-red:
100% 0 1, 80% 20% 2, 60% 40% 3,
40% 60% 4, 20% 80% 5, 0 100% 6;

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

.page {
display: grid;

@media (min-width: 600px) {
grid-template-columns: 1fr 1fr;
grid-template-rows: repeat(2, 1fr);
grid-auto-rows: 300px;
}

@media (min-width: 900px) {
grid-template-columns: repeat(3, 1fr);
}

&__block {
display: flex;
justify-content: center;
align-items: center;
font-size: 100px;
color: #fff;
height: 300px;

@each $red, $black, $num in $gradient-color-black-red {
&:nth-child(#{$num}) {
background-color: rgba($red, 0, 0, 100%);
&::before {
content: "#{$num}";
}
}
}
}
}