aboutsummaryrefslogtreecommitdiff
path: root/themes/simple/layouts/partials/read-more.html
blob: 9de15544f8e540c179d5a4d6fcf1fcd8a8368ad2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<section>
  <h2 class="text-2xl font-bold mb-6">Read more from this site</h2>
  <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12">
    <meta itemprop="name" content="Article list">
    <nav class="flex flex-col gap-4">
      {{ $randomPosts := shuffle (where .Site.RegularPages "Type" "posts") | first 5 }}
      {{ range $randomPosts }}
      <div>
        <time class="block text-gray-400 font-medium text-xs">{{ .Date.Format "Mon Jan 2, 2006" }}</time>
        <a href="/{{ .Params.url }}" itemprop="url" class="block underline font-medium mb-1">{{ .Title }}</a>
        <p class="text-gray-600 text-sm">{{ .Summary }}</p>
      </div>
      {{ end }}
    </nav>
  </nav>
</section>