fix: make cookbook cards square and more compact

Changes to cookbook cards:
- Set aspect-ratio: 1 / 1 on cards to maintain square shape
- Changed cover height from 16:9 ratio to 60% fixed height
- Hidden description to reduce card height
- Reduced padding from 1.25rem to 0.75rem
- Reduced title font from 1.3rem to 1rem
- Reduced recipe count font from 0.9rem to 0.8rem

This makes cookbook cards display as squares similar to recipe cards,
preventing them from becoming too tall.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Paul R Kartchner
2026-01-18 21:46:22 -07:00
parent 4ce62d5d3e
commit 4633f7c0cc

View File

@@ -158,7 +158,7 @@
transition: transform 0.2s, box-shadow 0.2s;
display: flex;
flex-direction: column;
height: 100%;
aspect-ratio: 1 / 1;
}
.cookbook-card:hover {
@@ -168,14 +168,14 @@
.cookbook-cover {
width: 100%;
aspect-ratio: 16 / 9;
height: 60%;
object-fit: cover;
flex-shrink: 0;
}
.cookbook-cover-placeholder {
width: 100%;
aspect-ratio: 16 / 9;
height: 60%;
background: linear-gradient(135deg, #81c784 0%, #4caf50 100%);
display: flex;
align-items: center;
@@ -185,7 +185,7 @@
}
.cookbook-info {
padding: 1.25rem;
padding: 0.75rem;
display: flex;
flex-direction: column;
flex: 1;
@@ -193,7 +193,7 @@
}
.cookbook-info h3 {
font-size: 1.3rem;
font-size: 1rem;
color: #212121;
margin: 0 0 0.5rem 0;
overflow: hidden;
@@ -205,20 +205,11 @@
}
.cookbook-info .description {
font-size: 0.95rem;
color: #666;
margin: 0 0 0.75rem 0;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
flex: 0 0 auto;
display: none;
}
.cookbook-info .recipe-count {
font-size: 0.9rem;
font-size: 0.8rem;
color: #2e7d32;
font-weight: 600;
margin: 0;