Add posts from archive to weekly posts

This commit is contained in:
2023-03-06 16:05:54 +11:00
parent 142af0b42b
commit 72cc4cc3ee
4 changed files with 49 additions and 12 deletions

View File

@@ -26,8 +26,16 @@ article class="h-entry"
- if post.tags.map(&:label).include? "weekly"
div class="max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
div class="mx-auto" hx-get="/post/top_tracks/#{post.slug}" hx-trigger="load"
div hx-get="/post/top_tracks/#{post.slug}" hx-trigger="load"
- if past_posts.count > 0
div class="block grow bg-blue-100 dark:bg-blue-600 rounded px-4 py-2 mb-12"
p class="text-sm mb-0" This week, years ago
ul class="mt-0"
- past_posts.each do |past_post|
li class="m-0"
a class="hover:underline" href=past_post.permalink
= "#{past_post.display_title} (#{past_post.published_at.year})"
div class="mb-4 max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
div class="max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"