replace data with article
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
export let data: {
|
||||
export let article: {
|
||||
title: string;
|
||||
description?: string;
|
||||
path: string;
|
||||
@@ -9,18 +9,18 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<a href={data.path}>
|
||||
<a href={article.path}>
|
||||
<div class="card">
|
||||
{#if data.image }
|
||||
<img src="{data.image}" class="image" alt='' />
|
||||
{#if article.image }
|
||||
<img src="{article.image}" class="image" alt='' />
|
||||
{/if}
|
||||
<h2>{data.title}</h2>
|
||||
{#if data.description}
|
||||
<p>{data.description}</p>
|
||||
<h2>{article.title}</h2>
|
||||
{#if article.description}
|
||||
<p>{article.description}</p>
|
||||
{/if}
|
||||
{#if data.tags}
|
||||
{#if article.tags}
|
||||
<div class="tags">
|
||||
{#each data.tags as tag}
|
||||
{#each article.tags as tag}
|
||||
<span class="tag">{tag}</span>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<hr />
|
||||
|
||||
<section class="project_list">
|
||||
{#each data.data as { title, description, path, date, tags, image }}
|
||||
<Card data={{ title, description, path, date, tags, image }} />
|
||||
{#each data.data as article}
|
||||
<Card { article } />
|
||||
{/each}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<hr />
|
||||
|
||||
<section class="card_list">
|
||||
{#each data.data as { title, description, path, date, tags }}
|
||||
<Card data={{ title, description, path, date, tags }} />
|
||||
{#each data.data as article}
|
||||
<Card { article } />
|
||||
{/each}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user