Skip to content

Commit 10c0f9a

Browse files
feat(TerminalCanvas): adjust font sizes for HUD elements to improve readability
1 parent b1d12f5 commit 10c0f9a

2 files changed

Lines changed: 36 additions & 24 deletions

File tree

src/app/globals.css

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,15 +2110,15 @@ textarea {
21102110

21112111
.featured-track {
21122112
/* Track yüksekliğini artır ki kartlar sığsın */
2113-
min-height: 560px;
2113+
min-height: 480px;
21142114
place-items: center;
21152115
justify-content: center;
21162116
}
21172117

21182118
.featured-card {
21192119
/* Çok dikey form, ince uzun */
2120-
min-height: 540px;
2121-
padding: 24px 20px;
2120+
min-height: 430px;
2121+
padding: 22px 18px;
21222122
display: flex;
21232123
flex-direction: column;
21242124
justify-content: space-between;
@@ -2132,8 +2132,8 @@ textarea {
21322132

21332133
.featured-summary {
21342134
/* Mobilde açıklamayı biraz kısalt */
2135-
-webkit-line-clamp: 5;
2136-
line-clamp: 5;
2135+
-webkit-line-clamp: 4;
2136+
line-clamp: 4;
21372137
font-size: 14px;
21382138
}
21392139

@@ -2148,6 +2148,20 @@ textarea {
21482148
place-items: center;
21492149
justify-content: center;
21502150
}
2151+
2152+
.featured-controls {
2153+
display: grid;
2154+
grid-template-columns: auto minmax(0, 1fr) auto;
2155+
align-items: center;
2156+
gap: 12px;
2157+
width: min(92vw, 360px);
2158+
margin-left: auto;
2159+
margin-right: auto;
2160+
}
2161+
2162+
.featured-controls .featured-dots {
2163+
justify-content: center;
2164+
}
21512165
}
21522166

21532167
.featured-controls {
@@ -3207,14 +3221,14 @@ textarea {
32073221

32083222
.featured-slider {
32093223
width: 100vw;
3210-
--featured-card-width: min(340px, 72vw);
3211-
--featured-offset-1: 60vw;
3212-
--featured-offset-2: 120vw;
3224+
--featured-card-width: clamp(300px, 72vw, 420px);
3225+
--featured-offset-1: clamp(180px, 26vw, 220px);
3226+
--featured-offset-2: calc(var(--featured-offset-1) * 2);
32133227
--featured-center-nudge: 0px;
32143228
}
32153229

32163230
.featured-track {
3217-
min-height: clamp(420px, 58vh, 620px);
3231+
min-height: 480px;
32183232
padding: 12px 0 24px;
32193233
place-items: center;
32203234
}
@@ -3235,7 +3249,7 @@ textarea {
32353249

32363250
.featured-card {
32373251
padding: 22px 20px;
3238-
min-height: clamp(420px, 56vh, 560px);
3252+
min-height: 430px;
32393253
box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
32403254
}
32413255

@@ -3245,10 +3259,11 @@ textarea {
32453259
}
32463260

32473261
.featured-summary {
3248-
display: block;
3249-
-webkit-line-clamp: unset;
3250-
line-clamp: unset;
3251-
max-height: none;
3262+
display: -webkit-box;
3263+
-webkit-line-clamp: 4;
3264+
line-clamp: 4;
3265+
-webkit-box-orient: vertical;
3266+
overflow: hidden;
32523267
}
32533268

32543269
.featured-stack {
@@ -3269,19 +3284,16 @@ textarea {
32693284
}
32703285

32713286
.featured-controls {
3272-
display: flex;
3273-
flex-wrap: wrap;
3287+
display: grid;
3288+
grid-template-columns: auto minmax(0, 1fr) auto;
32743289
align-items: center;
3275-
justify-content: center;
3276-
gap: 6px;
3277-
width: min(420px, 86vw);
3290+
gap: 10px;
3291+
width: min(92vw, 360px);
32783292
margin: 0 auto;
32793293
}
32803294

32813295
.featured-controls .featured-dots {
32823296
margin: 0;
3283-
gap: 6px;
3284-
flex-basis: 100%;
32853297
justify-content: center;
32863298
}
32873299

src/components/terminal/TerminalCanvas.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9523,8 +9523,8 @@ export default function TerminalCanvas({
95239523
);
95249524
}
95259525

9526-
const labelFont = Math.max(9, Math.floor(hudHeight * 0.16));
9527-
const valueFont = Math.max(14, Math.floor(hudHeight * 0.33));
9526+
const labelFont = Math.max(8, Math.floor(hudHeight * 0.14));
9527+
const valueFont = Math.max(12, Math.floor(hudHeight * 0.15));
95289528
const labelY = hudY + Math.floor(hudHeight * 0.14);
95299529
const valueY = hudY + Math.floor(hudHeight * 0.4);
95309530
const statPad = Math.floor(sectionPadding * 0.4);
@@ -9580,7 +9580,7 @@ export default function TerminalCanvas({
95809580
ctx.fillStyle = "#f4d35e";
95819581
ctx.fillText(String(bombs).padStart(2, "0"), bombsX + statPad, valueY);
95829582

9583-
ctx.font = `${Math.max(9, Math.floor(hudHeight * 0.16))}px "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace`;
9583+
ctx.font = `${Math.max(8, Math.floor(hudHeight * 0.13))}px "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace`;
95849584
ctx.fillStyle = "rgba(255,255,255,0.55)";
95859585
const weaponKeyMap: Record<string, string> = {
95869586
fist: "weaponFist",

0 commit comments

Comments
 (0)