feat: enhance image layout and handling

Improved image display by introducing a responsive grid layout for image lists, optimizing the first image's placement in odd-numbered lists to span across both columns. This change enhances visual appeal and usability, especially on larger screens. Additionally, refactored image retrieval logic to wrap images in a container, dynamically adjusting the class based on the number of images for tailored styling.
This commit is contained in:
ccbikai
2024-08-09 08:20:53 +08:00
parent d72c03fd34
commit 8bec08657d
2 changed files with 15 additions and 2 deletions

View File

@@ -1,6 +1,18 @@
.content {
word-break: break-word;
.image-list-container {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: masonry;
&.image-list-odd {
:first-child {
grid-column: 1 / 3;
}
}
}
img {
width: calc(100% - var(--box-margin));
}