Skip to content

Commit 4cfb600

Browse files
committed
PostCardSmall increase height, responsive md
1 parent e346261 commit 4cfb600

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

docs/working-notes/todo3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ shaped text around images, home and about pages
455455
better roadmap
456456
add youtube, twitter in footer
457457
sta se tacno desava kad je site_url netacan a i dalje radi, npr: https://nmc-docker.local.nemanjamitic.com
458-
PostCardSmall increase height maybe
458+
PostCardSmall increase height maybe
459459
set canonicalURL, <link href={canonicalURL} rel="canonical" />
460460
----
461461
// 4.10

src/components/PostCardSmall.astro

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const getTransitionNameFromElementId = setTransitionSlug({ pageSlug: slug });
3232

3333
<article
3434
class={cn(
35-
'flex flex-col xs:flex-row gap-2',
36-
'not-first:pt-2 not-last:pb-2',
35+
'flex flex-col xs:flex-row gap-2 md:gap-4',
36+
'not-first:pt-2 not-last:pb-2 md:not-first:pt-4 md:not-last:pb-4',
3737
'not-last:border-b border-base-300',
3838
className
3939
)}
@@ -42,14 +42,14 @@ const getTransitionNameFromElementId = setTransitionSlug({ pageSlug: slug });
4242
{...IMAGE_SIZES.FIXED.POST_CARD_SMALL}
4343
src={heroImage}
4444
alt={heroAlt}
45-
class="object-cover rounded-box hidden xs:block"
45+
class="object-cover rounded-box hidden xs:block w-[142px] h-[80px] md:size-auto"
4646
transition:name={getTransitionNameFromElementId({
4747
elementId: TRANSITION_ELEMENT_IDS.POST_CARD.HERO_IMAGE,
4848
})}
4949
/>
50-
<div>
50+
<div class="flex flex-col">
5151
<h4
52-
class="b-h4 text-xl leading-none line-clamp-1 mb-1"
52+
class="b-h4 text-xl leading-none line-clamp-1 mb-1 md:mb-2"
5353
transition:name={getTransitionNameFromElementId({
5454
elementId: TRANSITION_ELEMENT_IDS.POST_CARD.TITLE,
5555
})}
@@ -62,7 +62,7 @@ const getTransitionNameFromElementId = setTransitionSlug({ pageSlug: slug });
6262
{
6363
description && (
6464
<p
65-
class="text-base text-captions line-clamp-1 mb-2"
65+
class="text-base text-captions line-clamp-1 md:line-clamp-2 mb-2"
6666
transition:name={getTransitionNameFromElementId({
6767
elementId: TRANSITION_ELEMENT_IDS.POST_CARD.DESCRIPTION,
6868
})}
@@ -72,7 +72,7 @@ const getTransitionNameFromElementId = setTransitionSlug({ pageSlug: slug });
7272
)
7373
}
7474
<span
75-
class="inline-flex items-center gap-1 text-sm text-captions text-nowrap"
75+
class="inline-flex items-center gap-1 text-sm text-captions text-nowrap mt-auto"
7676
transition:name={getTransitionNameFromElementId({
7777
elementId: TRANSITION_ELEMENT_IDS.POST_CARD.META,
7878
})}

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const configData: ConfigType = {
3333
SITE_TITLE: 'Nemanja Mitic',
3434
SITE_DESCRIPTION: 'I am Nemanja, full stack developer',
3535
PAGE_SIZE_POST_CARD: 3,
36-
PAGE_SIZE_POST_CARD_SMALL: 10,
36+
PAGE_SIZE_POST_CARD_SMALL: 6,
3737
MORE_POSTS_COUNT: 3,
3838
AUTHOR_NAME: 'Nemanja Mitic',
3939
AUTHOR_EMAIL: '[email protected]',

src/constants/image.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export const IMAGE_SIZES = {
3030
height: 48,
3131
},
3232
POST_CARD_SMALL: {
33-
width: 142,
34-
height: 80,
33+
width: 215,
34+
height: 120,
3535
},
3636
_404: {
3737
width: TW_SCREENS.MD,

0 commit comments

Comments
 (0)