Skip to content

Commit

Permalink
devinekask#49 solution 040
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijndejonckheeree committed Jun 9, 2020
1 parent 44f63b0 commit 660e7b2
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions solutions/004/SimonVanherweghe/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ const draw = function (ctx) {
};

export default draw;

27 changes: 27 additions & 0 deletions solutions/040 / PepijnDejonckheere/index.html
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>
27 changes: 27 additions & 0 deletions solutions/040 / PepijnDejonckheere/solution.js
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;

0 comments on commit 660e7b2

Please sign in to comment.