diff --git a/src/components/ReferralBlock/ReferralBlock.stories.svelte b/src/components/ReferralBlock/ReferralBlock.stories.svelte index 7fbad8e9..d2489767 100644 --- a/src/components/ReferralBlock/ReferralBlock.stories.svelte +++ b/src/components/ReferralBlock/ReferralBlock.stories.svelte @@ -51,5 +51,6 @@ section: '/lifestyle/sports/', number: 4, cls: 'my-3', + heading: 'More World Cup coverage', }}" /> diff --git a/src/components/ReferralBlock/ReferralBlock.svelte b/src/components/ReferralBlock/ReferralBlock.svelte index f6b16080..10e7dd80 100644 --- a/src/components/ReferralBlock/ReferralBlock.svelte +++ b/src/components/ReferralBlock/ReferralBlock.svelte @@ -78,10 +78,15 @@ {#if $referrals.length === number} {#if heading} -

{heading}

+
+ {heading} +
{/if}
-
+
-
+
{referral.kicker.name}
-
+
{referral.title}
-
+
{getTime(new Date(referral.display_time))}
{referral.thumbnail.caption ||
@@ -128,14 +143,10 @@
 {/if}
 
 <style lang= - @import '../../scss/mixins'; + @use '../../scss/mixins' as *; - h4 { - @include font-sans; - @include text-primary; - font-size: 1.1rem; + div.heading { margin: 0 0 5px; - font-weight: bold; &.stacked { max-width: 450px; margin: 0 auto 5px; @@ -143,10 +154,6 @@ } .referral-container { - width: 100%; - display: inline-flex; - flex-wrap: wrap; - justify-content: center; gap: 10px 40px; a { text-decoration: none; @@ -173,12 +180,6 @@ } } - div.referral-pack { - display: flex; - justify-content: space-around; - max-width: 450px; - margin: 0 auto; - } .headline { display: inline-block; width: calc(100% - 140px); @@ -194,35 +195,20 @@ } } .kicker { - @include font-sans; - @include text-secondary; font-size: 0.9rem; - margin: 0; - font-weight: 400; } .title { - @include font-sans; - @include text-primary; font-size: 0.95rem; line-height: 1.15rem; - font-weight: bold; - margin: 0; } .publish-time { - @include font-sans; - @include text-secondary; font-size: 0.75rem; margin: 2px 0 0; - font-weight: 400; } } .image-container { - margin: 0; - overflow: hidden; border-radius: 10px; - border: 1px solid var(--theme-colour-brand-rules, #d0d0d0); - display: block; - position: relative; + border: 1px solid $theme-colour-brand-rules; width: 140px; height: 90px; &.xs { @@ -231,11 +217,7 @@ } img { transition: filter 0.1s; - display: block; - width: 100%; height: inherit; - object-fit: cover; - margin: 0; } } }