Files
reference/themes/coo/layout/_partial/index/recommend.ejs
T
2022-12-28 16:20:43 +08:00

11 lines
433 B
Plaintext

<section class="w-full grid grid-cols-2 md:grid-cols-4 gap-6 md:gap-8">
<% theme.index_recommends.forEach(function (filePath) { %>
<% let post = site.posts.findOne({slug: filePath}); %>
<a href="<%= url_for(post.path) %>">
<div class="card <%= post.background %>">
<%- icon(post.slug) %>
<p><%= post.title %></p>
</div>
</a>
<% }); %>
</section>