diff options
Diffstat (limited to 'themes/simple/layouts/_default/single.html')
| -rwxr-xr-x | themes/simple/layouts/_default/single.html | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/themes/simple/layouts/_default/single.html b/themes/simple/layouts/_default/single.html index c8e786a..1258a3b 100755 --- a/themes/simple/layouts/_default/single.html +++ b/themes/simple/layouts/_default/single.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | {{ define "main" }} | 1 | {{ define "main" }} |
| 2 | <main aria-role="main" class="container-blog mx-auto px-6 md:p-0"> | 2 | <main role="main" class="container-blog mx-auto px-6 md:p-0"> |
| 3 | 3 | ||
| 4 | <!-- Single article --> | 4 | <!-- Single article --> |
| 5 | <article itemtype="http://schema.org/Article" class="single mb-12"> | 5 | <article itemtype="http://schema.org/Article" class="single mb-12"> |
| 6 | <header class="mb-6"> | 6 | <header class="mb-6"> |
| 7 | <h1 itemtype="headline" class="text-4xl font-extrabold mb-6 leading-tight">{{.Title}}</h1> | 7 | <h1 itemtype="headline" class="text-4xl font-extrabold mb-6 leading-tight">{{ .Title }}</h1> |
| 8 | 8 | ||
| 9 | {{ if in .Type "posts" }} | 9 | {{ if in .Type "posts" }} |
| 10 | <time class="text-gray-400 font-medium text-sm">Published on {{ .Date.Format "Monday Jan 2, 2006" }}</time> | 10 | <time class="text-gray-400 font-medium text-sm">Published on {{ .Date.Format "Monday Jan 2, 2006" }}</time> |
| @@ -33,22 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | <!-- Read more --> | 34 | <!-- Read more --> |
| 35 | {{ if in .Type "posts" }} | 35 | {{ if in .Type "posts" }} |
| 36 | <section> | 36 | {{ partial "read-more.html" . }} |
| 37 | <h2 class="text-2xl font-bold mb-6">Read more from this site</h2> | ||
| 38 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12"> | ||
| 39 | <meta itemprop="name" content="Article list"> | ||
| 40 | <ul> | ||
| 41 | {{ $randomPosts := shuffle (where .Site.RegularPages "Type" "posts") | first 5 }} | ||
| 42 | {{ range $randomPosts }} | ||
| 43 | <li class="mb-6"> | ||
| 44 | <time class="block text-gray-400 font-medium text-xs">{{ .Date.Format "Mon Jan 2, 2006" }}</time> | ||
| 45 | <a href="/{{.Params.url}}" itemprop="url" class="hover:bg-yellow-100 font-medium">{{.Title}}</a> | ||
| 46 | <p class="text-gray-600 text-sm">{{.Summary}}</p> | ||
| 47 | </li> | ||
| 48 | {{end}} | ||
| 49 | </ul> | ||
| 50 | </nav> | ||
| 51 | </section> | ||
| 52 | {{ end }} | 37 | {{ end }} |
| 53 | 38 | ||
| 54 | {{ if in .Type "posts" }} | 39 | {{ if in .Type "posts" }} |
