forked from devinekask/Workshop-Continuous-Integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44f63b0
commit 660e7b2
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ const draw = function (ctx) { | |
}; | ||
|
||
export default draw; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="../../../style/style.css" /> | ||
<title>Solution 40</title> | ||
</head> | ||
<body class="detail"> | ||
<h1> | ||
<a | ||
href="https://github.com/devinekask/Workshop-Continuous-Integration/issues/[ISSUE NUMMER]" | ||
> | ||
40</a | ||
> | ||
</h1> | ||
<canvas width="300" height="300"></canvas> | ||
<p>Pepijn De Jonckheere</p> | ||
<script type="module"> | ||
import draw from "./solution.js"; | ||
const canvas = document.querySelector("canvas"); | ||
const ctx = canvas.getContext("2d"); | ||
ctx.scale(3, 3); | ||
draw(ctx); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const draw = function (ctx) { | ||
const colors = [ | ||
"#4fc3f7", | ||
"#0d47a1", | ||
"#2196f3", | ||
"#4fc3f7", | ||
]; | ||
|
||
ctx.fillStyle = "#4fc3f7"; | ||
ctx.fillRect(1, 1, 40, 40); | ||
|
||
ctx.fillStyle = "#0d47a1"; | ||
ctx.fillRect(1, 60, 40, 40); | ||
|
||
ctx.fillStyle = "#2196f3"; | ||
ctx.fillRect(60, 1, 40, 40); | ||
|
||
ctx.fillStyle = "#4fc3f7"; | ||
ctx.fillRect(60, 60, 40, 40); | ||
|
||
|
||
|
||
return ctx; | ||
}; | ||
|
||
export default draw; | ||
|