@@ -7,6 +7,7 @@ interface Props {
77 pattern? : " circles" | " grid" | " waves" | " dots" ;
88 fontStyle? : " serif" | " sans" | " display" | " handwritten" ;
99 layoutStyle? : " classic" | " minimal" | " modern" ;
10+ orientation? : " vertical" | " horizontal" ;
1011}
1112
1213const {
@@ -17,11 +18,16 @@ const {
1718 pattern = " circles" ,
1819 fontStyle = " serif" ,
1920 layoutStyle = " classic" ,
21+ orientation = " vertical" ,
2022} = Astro .props ;
2123---
2224
23- <a href ={ href } class =" book-card-link" >
24- <div class =" book-card" data-layout ={ layoutStyle } >
25+ <a href ={ href } class =" book-card-link" data-orientation ={ orientation } >
26+ <div
27+ class =" book-card"
28+ data-layout ={ layoutStyle }
29+ data-orientation ={ orientation }
30+ >
2531 <div
2632 class =" book-cover"
2733 style ={ ` background: linear-gradient(135deg, ${coverColor }, ${coverColor }dd) ` }
@@ -210,10 +216,8 @@ const {
210216 left: 0;
211217 right: 0;
212218 bottom: 0;
213- background-image: linear-gradient(
214- rgba(255, 255, 255, 0.05) 1px,
215- transparent 1px
216- ),
219+ background-image:
220+ linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
217221 linear-gradient(
218222 90deg,
219223 rgba(255, 255, 255, 0.05) 1px,
@@ -235,7 +239,8 @@ const {
235239 left: 0;
236240 right: 0;
237241 bottom: 0;
238- background: radial-gradient(
242+ background:
243+ radial-gradient(
239244 circle at 100% 100%,
240245 transparent 20%,
241246 rgba(255, 255, 255, 0.05) 21%,
@@ -360,4 +365,23 @@ const {
360365 -webkit-line-clamp: 2; /* Reduce lines on very small cards */
361366 }
362367 }
368+
369+ /* Horizontal Orientation */
370+ .book-card-link[data-orientation="horizontal"] {
371+ max-width: 300px; /* Wider max-width for landscape */
372+ }
373+
374+ .book-card[data-orientation="horizontal"] {
375+ aspect-ratio: 3/2; /* Landscape aspect ratio */
376+ transform: rotateY(-5deg); /* Slightly more angle for width */
377+ }
378+
379+ .book-card[data-orientation="horizontal"] .book-title {
380+ font-size: 8cqw !important; /* Smaller relative font size as width is larger */
381+ }
382+
383+ .book-card[data-orientation="horizontal"] .book-decor {
384+ width: 40cqw;
385+ height: 40cqw;
386+ }
363387</style >
0 commit comments