refactor: better variable naming
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const COLOR_SURFACE1 = "#dce0e8";
|
const DOT_COLOR = "#dce0e8";
|
||||||
const DOT_RADIUS = 1 * devicePixelRatio;
|
const DOT_RADIUS = 1 * devicePixelRatio;
|
||||||
|
|
||||||
const canvas = document.getElementById("bg");
|
const canvas = document.getElementById("bg");
|
||||||
@@ -29,7 +29,7 @@ function drawDot(x, y) {
|
|||||||
((effectRadius - Math.min(distance, effectRadius)) / effectRadius);
|
((effectRadius - Math.min(distance, effectRadius)) / effectRadius);
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(x, y, radius, 0, 2 * Math.PI, false);
|
ctx.arc(x, y, radius, 0, 2 * Math.PI, false);
|
||||||
ctx.fillStyle = COLOR_SURFACE1;
|
ctx.fillStyle = DOT_COLOR;
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ main {
|
|||||||
align-items: start;
|
align-items: start;
|
||||||
margin: 2rem;
|
margin: 2rem;
|
||||||
}
|
}
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 768px) {
|
||||||
main {
|
main {
|
||||||
margin: 4rem;
|
margin: 4rem;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user