fix(projects): use top baseline instead of hanging
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m1s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m1s
This commit is contained in:
@@ -58,7 +58,7 @@ const drawTextWithShadow2Lines = (
|
|||||||
onRender((ctx) => {
|
onRender((ctx) => {
|
||||||
assets.images.projects.topScreen.background.draw(ctx, 0, 0);
|
assets.images.projects.topScreen.background.draw(ctx, 0, 0);
|
||||||
|
|
||||||
ctx.textBaseline = "hanging";
|
ctx.textBaseline = "top";
|
||||||
ctx.font = "16px Pokemon DP Pro";
|
ctx.font = "16px Pokemon DP Pro";
|
||||||
|
|
||||||
const project = store.projects[store.currentProject];
|
const project = store.projects[store.currentProject];
|
||||||
@@ -99,14 +99,14 @@ onRender((ctx) => {
|
|||||||
ctx.restore();
|
ctx.restore();
|
||||||
|
|
||||||
// text
|
// text
|
||||||
drawTextWithShadow(ctx, "white", project.title.toUpperCase(), 23, 25);
|
drawTextWithShadow(ctx, "white", project.title.toUpperCase(), 23, 23);
|
||||||
drawTextWithShadow(ctx, "black", project.scope, 12, 41);
|
drawTextWithShadow(ctx, "black", project.scope, 12, 39);
|
||||||
|
|
||||||
drawTextWithShadow2Lines(
|
drawTextWithShadow2Lines(
|
||||||
ctx,
|
ctx,
|
||||||
project.description,
|
project.description,
|
||||||
8,
|
8,
|
||||||
161,
|
159,
|
||||||
90,
|
90,
|
||||||
"white",
|
"white",
|
||||||
"black",
|
"black",
|
||||||
@@ -120,7 +120,7 @@ onRender((ctx) => {
|
|||||||
"black",
|
"black",
|
||||||
project.summary,
|
project.summary,
|
||||||
Math.floor(185 - textWidth / 2),
|
Math.floor(185 - textWidth / 2),
|
||||||
19,
|
17,
|
||||||
);
|
);
|
||||||
|
|
||||||
let textY = 35;
|
let textY = 35;
|
||||||
@@ -134,7 +134,7 @@ onRender((ctx) => {
|
|||||||
ctx.fillRect(105, textY - 1, 1, lines.length * 16);
|
ctx.fillRect(105, textY - 1, 1, lines.length * 16);
|
||||||
|
|
||||||
for (let j = 0; j < lines.length; j += 1) {
|
for (let j = 0; j < lines.length; j += 1) {
|
||||||
drawTextWithShadow(ctx, "white", lines[j]!, 118, textY);
|
drawTextWithShadow(ctx, "white", lines[j]!, 118, textY - 2);
|
||||||
textY += 16;
|
textY += 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,7 +143,7 @@ onRender((ctx) => {
|
|||||||
ctx,
|
ctx,
|
||||||
project.technologies.join(", "),
|
project.technologies.join(", "),
|
||||||
111,
|
111,
|
||||||
161,
|
159,
|
||||||
145,
|
145,
|
||||||
"black",
|
"black",
|
||||||
"black",
|
"black",
|
||||||
|
|||||||
Reference in New Issue
Block a user