ignore referrals

This commit is contained in:
Jon McClure 2023-07-06 18:39:36 +01:00
parent 62ba4193e6
commit d1dbc33c09
2 changed files with 15 additions and 6 deletions

View file

@ -83,7 +83,7 @@
class="referral-container"
class:stacked="{clientWidth && clientWidth < 750}"
class:xs="{clientWidth && clientWidth < 450}"
bind:clientWidth
bind:clientWidth="{clientWidth}"
>
{#each $referrals as referral}
<div class="referral">
@ -97,9 +97,13 @@
class="headline"
class:xs="{clientWidth && clientWidth < 450}"
>
<div class="kicker">{referral.kicker.name}</div>
<div class="title">{referral.title}</div>
<div class="publish-time">
<div class="kicker" data-chromatic="ignore">
{referral.kicker.name}
</div>
<div class="title" data-chromatic="ignore">
{referral.title}
</div>
<div class="publish-time" data-chromatic="ignore">
{getTime(new Date(referral.display_time))}
</div>
</div>
@ -108,6 +112,7 @@
class:xs="{clientWidth && clientWidth < 450}"
>
<img
data-chromatic="ignore"
src="{referral.thumbnail.renditions.landscape['240w']}"
alt="{referral.thumbnail.caption ||
referral.thumbnail.alt_text}"

View file

@ -10,12 +10,16 @@
<a href="{url.replace('index.html', '')}">
<IntersectionObserver let:intersecting top="{600}" once="{true}">
{#if intersecting}
<div class="image" style="{`background-image: url(${image});`}"></div>
<div
data-chromatic="ignore"
class="image"
style="{`background-image: url(${image});`}"
></div>
{:else}
<div class="image"></div>
{/if}
</IntersectionObserver>
<p>{title}</p>
<p data-chromatic="ignore">{title}</p>
</a>
</div>