Merge pull request #177 from reuters-graphics/fix-more-menu
Fix more menu
This commit is contained in:
commit
b8e43621a3
3 changed files with 7 additions and 15 deletions
5
.changeset/pink-penguins-brush.md
Normal file
5
.changeset/pink-penguins-brush.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@reuters-graphics/graphics-components': patch
|
||||
---
|
||||
|
||||
Fixes "more" menu options
|
||||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue