feat: implement responsive column-based styling for all thumbnail cards #9

Merged
pkartch merged 11 commits from feature/cookbook-pagination into main 2026-01-20 04:05:03 +00:00
2 changed files with 54 additions and 37 deletions
Showing only changes of commit a20dfd848c - Show all commits

View File

@@ -443,50 +443,53 @@
}
.recipe-info h3 {
font-size: 0.9rem;
font-size: 0.75rem;
color: #212121;
margin: 0 0 0.25rem 0;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.2;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
flex-shrink: 0;
}
.recipe-info .description {
font-size: 0.75rem;
font-size: 0.65rem;
color: #666;
margin: 0 0 0.5rem 0;
line-height: 1.3;
margin: 0;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
flex: 0 0 auto;
flex-shrink: 1;
}
.recipe-meta {
display: flex;
gap: 0.5rem;
font-size: 0.7rem;
gap: 0.4rem;
font-size: 0.6rem;
color: #757575;
margin-bottom: 0.5rem;
flex: 0 0 auto;
flex-shrink: 0;
margin-top: auto;
}
.recipe-tags {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
margin-top: auto;
margin-top: 0.25rem;
}
.recipe-tags .tag {
padding: 0.15rem 0.5rem;
padding: 0.1rem 0.4rem;
background-color: #e8f5e9;
color: #2e7d32;
border-radius: 10px;
font-size: 0.65rem;
border-radius: 8px;
font-size: 0.55rem;
font-weight: 500;
}
@@ -633,9 +636,15 @@
}
.cookbook-card.nested .cookbook-info h3 {
font-size: 0.9rem;
font-size: 0.75rem;
margin: 0 0 0.25rem 0;
white-space: nowrap;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
flex-shrink: 0;
}
.cookbook-card.nested .cookbook-info .description {
@@ -649,5 +658,6 @@
.cookbook-card.nested .recipe-count,
.cookbook-card.nested .cookbook-count {
font-size: 0.7rem;
font-size: 0.6rem;
line-height: 1.2;
}

View File

@@ -204,13 +204,16 @@
}
.cookbook-info h3 {
font-size: 0.9rem;
font-size: 0.75rem;
color: #212121;
margin: 0 0 0.25rem 0;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 1.2;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
flex-shrink: 0;
}
.cookbook-info .description {
@@ -226,10 +229,11 @@
.cookbook-info .recipe-count,
.cookbook-info .cookbook-count {
font-size: 0.7rem;
font-size: 0.6rem;
color: #2e7d32;
font-weight: 600;
margin: 0;
line-height: 1.2;
white-space: nowrap;
}
@@ -270,7 +274,7 @@
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
flex-direction: column;
height: 100%;
aspect-ratio: 1 / 1;
}
.recipe-card:hover {
@@ -280,60 +284,63 @@
.recipe-image {
width: 100%;
aspect-ratio: 16 / 9;
height: 60%;
object-fit: cover;
flex-shrink: 0;
}
.recipe-image-placeholder {
width: 100%;
aspect-ratio: 16 / 9;
height: 60%;
background: linear-gradient(135deg, #ffb74d 0%, #ff9800 100%);
display: flex;
align-items: center;
justify-content: center;
font-size: 4rem;
font-size: 3rem;
flex-shrink: 0;
}
.recipe-info {
padding: 1.25rem;
padding: 0.5rem;
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
overflow: hidden;
}
.recipe-info h3 {
font-size: 1.2rem;
font-size: 0.75rem;
color: #212121;
margin: 0 0 0.5rem 0;
margin: 0 0 0.25rem 0;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.3;
flex-shrink: 0;
}
.recipe-info .description {
font-size: 0.9rem;
font-size: 0.65rem;
color: #666;
margin: 0 0 0.75rem 0;
line-height: 1.4;
margin: 0;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
flex: 0 0 auto;
flex-shrink: 1;
}
.recipe-meta {
display: flex;
gap: 1rem;
font-size: 0.85rem;
gap: 0.4rem;
font-size: 0.6rem;
color: #757575;
flex-shrink: 0;
margin-top: auto;
}