diff --git a/src/components/molecules/PostCard.svelte b/src/components/molecules/PostCard.svelte
index d902d64..ae5c672 100644
--- a/src/components/molecules/PostCard.svelte
+++ b/src/components/molecules/PostCard.svelte
@@ -8,21 +8,21 @@
export let flagId: string
-
-
-
+
+
+
Houses of
{country}
-
-
+
+
-
+
- {street}
- {location}{region ? `, ${region}` : ''}
- {country}
diff --git a/src/style/modules/_post-card.scss b/src/style/modules/_postcard.scss
similarity index 78%
rename from src/style/modules/_post-card.scss
rename to src/style/modules/_postcard.scss
index 6635864..e329dd0 100644
--- a/src/style/modules/_post-card.scss
+++ b/src/style/modules/_postcard.scss
@@ -1,14 +1,16 @@
-.post-card {
+.postcard {
+ --gap: clamp(8px, 0.7vw, 20px);
display: grid;
- grid-template-columns: 40% 60%;
+ grid-template-columns: min(140px, 40%) 1fr;
align-items: baseline;
height: 100%;
width: 100%;
height: 100%;
max-width: 333px;
max-height: 222px;
- padding: clamp(12px, 1.5vw, 32px);
- padding-left: clamp(8px, 1vw, 24px);
+ padding: clamp(12px, 1vw, 20px);
+ padding-left: var(--gap);
+ padding-right: calc(var(--gap) * 2);
background: $color-cream;
box-shadow: 0 16px 12px rgba(#000, 0.15), 0 26px 52px rgba(#000, 0.2);
@@ -17,7 +19,7 @@
align-items: flex-end;
height: 100%;
padding-bottom: 4px;
- padding-right: clamp(8px, 1vw, 24px);
+ padding-right: var(--gap);
border-right: 1px solid rgba(#000, 0.2);
}
&__right {
@@ -32,7 +34,7 @@
&__country {
position: relative;
margin-top: auto;
- font-size: clamp(#{rem(12px)}, 1.2vw, #{rem(32px)});
+ font-size: clamp(#{rem(12px)}, 1.2vw, #{rem(22px)});
color: $color-primary;
font-family: $font-serif;
line-height: 1.1;
@@ -78,13 +80,14 @@
// Address
ul {
margin-top: auto;
- padding-left: clamp(8px, 1vw, 24px);
+ padding-left: var(--gap);
+ width: 100%;
li {
display: block;
- margin-bottom: max(2px, 0.25vw);
+ margin-bottom: clamp(2px, 0.25vw, 4px);
color: $color-text;
- font-size: clamp(#{rem(11px)}, 0.8vw, #{rem(24px)});
+ font-size: clamp(#{rem(11px)}, 0.8vw, #{rem(16px)});
line-height: 1.4;
border-bottom: 1px solid #D9CABD;
}
diff --git a/src/style/pages/_photos.scss b/src/style/pages/_photos.scss
index ef3f96a..6f1af6a 100644
--- a/src/style/pages/_photos.scss
+++ b/src/style/pages/_photos.scss
@@ -340,21 +340,20 @@
// Postcard
- .post-card {
+ .postcard {
position: absolute;
bottom: 0;
right: 0;
border-top-left-radius: 8px;
opacity: 0;
pointer-events: none;
- // transform: translate3d(10%,25%,0) rotate(-2deg);
transform: translate3d(12%, 23%, 0) rotate(-5deg);
- transition: opacity 0.4s var(--ease-quart), transform 1.2s var(--ease-quart);
+ transition: opacity 0.4s var(--ease-quart), transform 1.0s var(--ease-quart);
}
// Show postcard on hover
&:hover {
- .post-card {
+ .postcard {
opacity: 1;
transform: translate3d(3%,3%,0) rotate(2deg);
}
diff --git a/src/style/style.scss b/src/style/style.scss
index 622c6bb..8c63dea 100644
--- a/src/style/style.scss
+++ b/src/style/style.scss
@@ -29,7 +29,7 @@
// Modules
@import "modules/globe";
-@import "modules/post-card";
+@import "modules/postcard";
// Atomic Design System