Skip to content

Commit

Permalink
cleanup: update article list example
Browse files Browse the repository at this point in the history
  • Loading branch information
GabsEdits committed Sep 10, 2024
1 parent f042dbc commit 8e9147e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions custom/ArticleListExample.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
>{{ post.title }}</a
>
</h3>
<p v-if="post.description">{{ post.description }}</p>
<div v-if="post.excerpt" v-html="post.excerpt"></div>
<div class="post-details">
<p class="date">
{{ post.date }}
Expand All @@ -49,10 +49,19 @@
</span>
</p>
<div class="tags" v-if="post.tags">
<span v-if="typeof post.tags === 'string'" :key="post.tags">{{
post.tags
}}</span>
<span v-else v-for="tag in post.tags" :key="tag">{{ tag }}</span>
<span
v-if="typeof post.tags === 'string'"
:key="post.tags"
@click="filterPosts(post.tags)"
>{{ post.tags }}</span
>
<span
v-else
v-for="tag in post.tags"
:key="tag"
@click="filterPosts(tag)"
>{{ tag }}</span
>
</div>
</div>
</article>
Expand Down

0 comments on commit 8e9147e

Please sign in to comment.