chore: add recent links widget

This commit is contained in:
Cory Dransfeldt 2024-03-13 16:18:47 -07:00
parent 7443d797a9
commit 56f28f7e3f
No known key found for this signature in database
22 changed files with 91 additions and 62 deletions

View file

@ -1,20 +1,14 @@
{% capture css %}
{% render "../../assets/styles/components/popular-posts.css" %}
{% endcapture %}
<style>{{ css }}</style>
{% assign posts = posts | getPopularPosts: analytics %}
<div class="popular-posts">
<h2 class="flex--centered">
{% tablericon "flame" "Popular" %}
Popular posts
</h2>
<ul class="link__list">
{% for post in posts limit: 5 %}
<li>
<a class="no-underline" href="{{post.url}}" title="{{ post.data.title | escape}}">
{{ post.data.title }}
</a>
</li>
{% endfor %}
</ul>
</div>
<h2 class="flex--centered">
{% tablericon "flame" "Popular" %}
Popular posts
</h2>
<ul class="link__list">
{% for post in posts limit: 5 %}
<li>
<a class="no-underline" href="{{post.url}}" title="{{ post.data.title | escape}}">
{{ post.data.title }}
</a>
</li>
{% endfor %}
</ul>