Skip to content

Commit

Permalink
feat: article footer component
Browse files Browse the repository at this point in the history
  • Loading branch information
limulus committed Jan 21, 2025
1 parent b378012 commit 5c10b5c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
8 changes: 8 additions & 0 deletions www/_includes/components/article-footer.webc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<section>
<h2>You Might Enjoy…</h2>

<article-list
:@articles="$data.collections.article.filter(({ url }) => url !== article.page.url)"
@limit="5"
></article-list>
</section>
11 changes: 3 additions & 8 deletions www/_includes/layouts/article.webc
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ layout: page
<div @raw="content" webc:nokeep></div>

<footer>
<section>
<h2>You Might Enjoy…</h2>

<article-list
:@articles="collections.article.filter((article) => article.url !== page.url)"
@limit="5"
></article-list>
</section>
<article-footer
:@article="collections.article.find(({ url }) => url === page.url)"
></article-footer>
</footer>
</article>

Expand Down
6 changes: 6 additions & 0 deletions www/_includes/layouts/video.webc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ layout: page
</header>

<div @raw="content" webc:nokeep></div>

<footer>
<article-footer
:@article="$data.collections.article.find(({ url }) => url === $data.page.url)"
></article-footer>
</footer>
</article>

<style webc:scoped>
Expand Down

0 comments on commit 5c10b5c

Please sign in to comment.