From 1163ba61f5097e27e86fbf9748577a3bdd74d7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sun, 14 Aug 2022 23:01:56 +0200 Subject: [PATCH] Add latest issue part on Subscribe page and Create component for Issue --- .../molecules/NewsletterIssue.svelte | 33 ++++++++++++ src/routes/subscribe.svelte | 50 ++++++++----------- src/style/molecules/_issue.scss | 49 ++++++++++++++++-- src/style/pages/_subscribe.scss | 16 ++++-- 4 files changed, 110 insertions(+), 38 deletions(-) create mode 100644 src/components/molecules/NewsletterIssue.svelte diff --git a/src/components/molecules/NewsletterIssue.svelte b/src/components/molecules/NewsletterIssue.svelte new file mode 100644 index 0000000..28491c1 --- /dev/null +++ b/src/components/molecules/NewsletterIssue.svelte @@ -0,0 +1,33 @@ + + + + +
+ + Issue {issue} thumbnail +
+
Issue #{issue}
+
+

{title}

+ +
+
+
+
\ No newline at end of file diff --git a/src/routes/subscribe.svelte b/src/routes/subscribe.svelte index a900ea2..b521485 100644 --- a/src/routes/subscribe.svelte +++ b/src/routes/subscribe.svelte @@ -5,21 +5,22 @@ @@ -74,30 +75,21 @@ diff --git a/src/style/molecules/_issue.scss b/src/style/molecules/_issue.scss index 4658c36..c476f2c 100644 --- a/src/style/molecules/_issue.scss +++ b/src/style/molecules/_issue.scss @@ -8,21 +8,29 @@ a { display: flex; + width: 100%; padding: 20px; text-decoration: none; } // Image - :global(img) { + :global(picture) { $shadow-color: rgba(#936B47, 0.06); - display: block; width: 80px; - height: 56px; margin-right: 16px; + margin-bottom: auto; + overflow: hidden; border-radius: 3px; box-shadow: 0 1.5px 1.5px $shadow-color, 0 3px 3px $shadow-color, 0 12px 12px $shadow-color; + + :global(img) { + display: block; + width: 100%; + height: auto; + object-fit: cover; + } } // Title dt { @@ -61,7 +69,6 @@ transition: transform 0.7s var(--ease-quart); } - // Hover &:hover { background: $color-cream; @@ -74,4 +81,38 @@ transform: rotate(3deg) translateZ(0); } } + + + // Large Variant + &.is-large { + a { + @include bp (sm) { + padding: 28px 64px; + } + } + dt { + @include bp (sm) { + font-size: rem(24px); + } + } + dd { + @include bp (sm) { + font-size: rem(16px); + } + } + time { + @include bp (sm) { + margin-top: 16px; + font-size: rem(14px); + } + } + :global(picture) { + @include bp (sm) { + width: 200px; + max-height: 140px; + border-radius: 6px; + margin-right: 40px; + } + } + } } \ No newline at end of file diff --git a/src/style/pages/_subscribe.scss b/src/style/pages/_subscribe.scss index 29aa5af..1abad1d 100644 --- a/src/style/pages/_subscribe.scss +++ b/src/style/pages/_subscribe.scss @@ -34,11 +34,16 @@ // Title h2 { text-align: center; + margin-top: 40px; + margin-bottom: 24px; + + @include bp (sm) { + margin-top: 64px; + margin-bottom: 32px; + } } ul { - margin-top: 32px; - @include bp (sm) { display: grid; grid-template-columns: repeat(2, 1fr); @@ -52,10 +57,11 @@ @include bp (sm) { margin-bottom: 0; } - } - // Issue - @import "../molecules/issue"; + & > :global(*) { + height: 100%; + } + } } }