Merge pull request #177 from reuters-graphics/fix-more-menu

Fix more menu
This commit is contained in:
Jon McClure 2024-09-24 07:42:26 +01:00 committed by GitHub
commit b8e43621a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 15 deletions

View file

@ -0,0 +1,5 @@
---
'@reuters-graphics/graphics-components': patch
---
Fixes "more" menu options

View file

@ -3,7 +3,6 @@
import { getTime } from './time';
export let story;
export let withSection = false;
$: thumbnail = story.thumbnail;
</script>
@ -11,17 +10,8 @@
<div class="story-card">
<a href="{normalizeUrl(story.canonical_url)}">
<div class="story-text" class:has-thumbnail="{thumbnail}">
{#if withSection}
<a href="{normalizeUrl(story.primary_section.id)}">
<span class="label">{story.primary_section.name}</span>
</a>
{/if}
<span>{story.title}</span>
{#if !withSection}
<time datetime="{story.display_time}"
>{getTime(story.display_time)}</time
>
{/if}
<time datetime="{story.display_time}">{getTime(story.display_time)}</time>
</div>
{#if thumbnail}
<div class="thumbnail">

View file

@ -63,10 +63,7 @@
<ul class="story-list">
{#each stories as story}
<li class="story-item">
<StoryCard
{story}
withSection="{$activeSection === 'more'}"
/>
<StoryCard {story} />
</li>
{/each}
</ul>