Fixed shop seed card.

Signed-off-by: Sarahtonin <[email protected]>
This commit is contained in:
sarah committed 2026-08-30 22:41:01 +02:00
1 parent acb0c8c69f
commit b053d151d3
2 files changed
+75 -36

No files matched your search

+43 -26
View File
@@ -116,17 +116,6 @@ function CreateShopSeedCard(
"span" "span"
); );
Number.className =
"ShopItemNumber";
Number.textContent =
"No. " +
String(Plant.Id).padStart(
3,
"0"
);
const Name = const Name =
document.createElement( document.createElement(
"h3" "h3"
@@ -137,7 +126,6 @@ function CreateShopSeedCard(
Header.append( Header.append(
Number,
Name Name
); );
@@ -291,6 +279,15 @@ function CreateShopPlantVisual(
"ShopPlantVisual"; "ShopPlantVisual";
const ImageFrame =
document.createElement(
"div"
);
ImageFrame.className =
"ShopPlantImageFrame";
const PlantKey = const PlantKey =
GetPlantKeyById( GetPlantKeyById(
Plant.Id Plant.Id
@@ -316,32 +313,52 @@ function CreateShopPlantVisual(
Missing.textContent = Missing.textContent =
"No image"; "No image";
Visual.appendChild( ImageFrame.appendChild(
Missing Missing
); );
} else {
const Image =
document.createElement(
"img"
);
return Visual; Image.className =
"ShopPlantImage";
Image.src =
Images[
Images.length - 1
];
Image.alt =
Plant.Name;
ImageFrame.appendChild(
Image
);
} }
const Image = const Number =
document.createElement( document.createElement(
"img" "span"
); );
Image.className = Number.className =
"ShopPlantImage"; "ShopItemNumber";
Image.src = Number.textContent =
Images[ String(
Images.length - 1 Plant.Id
]; ).padStart(
3,
"0"
);
Image.alt =
Plant.Name;
Visual.appendChild( Visual.append(
Image ImageFrame,
Number
); );
+32 -10
View File
@@ -1201,13 +1201,11 @@ select {
margin: 0; margin: 0;
} }
.ShopItemNumber {
color: var(--Overlay2);
}
.ShopItemBody { .ShopItemBody {
display: grid; display: grid;
grid-template-columns: 5rem minmax(0, 1fr); grid-template-columns:
5.75rem
minmax(0, 1fr);
gap: 0.75rem; gap: 0.75rem;
align-items: start; align-items: start;
@@ -1215,9 +1213,19 @@ select {
.ShopPlantVisual { .ShopPlantVisual {
display: flex; display: flex;
flex-direction: column;
gap: 0.35rem;
width: 5rem; width: 5.75rem;
height: 5rem;
align-items: center;
}
.ShopPlantImageFrame {
display: flex;
width: 5.75rem;
height: 5.75rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -1238,6 +1246,14 @@ select {
image-rendering: pixelated; image-rendering: pixelated;
} }
.ShopItemNumber {
width: 100%;
color: var(--Overlay2);
text-align: center;
}
.ShopPlantMissing { .ShopPlantMissing {
padding: 0.35rem; padding: 0.35rem;
@@ -1348,12 +1364,18 @@ select {
} }
.ShopItemBody { .ShopItemBody {
grid-template-columns: 4.5rem minmax(0, 1fr); grid-template-columns:
5.25rem
minmax(0, 1fr);
} }
.ShopPlantVisual { .ShopPlantVisual {
width: 4.5rem; width: 5.25rem;
height: 4.5rem; }
.ShopPlantImageFrame {
width: 5.25rem;
height: 5.25rem;
} }
} }