jk.nipponalba.scot website https://jk.nipponalba.scot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

80 lines
7.4 KiB

4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
  1. {{ define "main" }}
  2. <section class="stream h-feed">
  3. <section class="author" style="display:none;">
  4. <a rel="author" class="p-author h-card" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}<img src="/images/profile.jpg"/></a>
  5. </section>
  6. <span id="pagination-top">{{ partial "pagination.html" . }}</span>
  7. {{ range .Paginator.Pages}}
  8. {{ if not (eq .Type "response")}}<section data-post-type="{{ .Type }}" class="feed h-entry {{.Type }}">
  9. <section class="author" style="display:none;">
  10. <a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}<img src="/images/profile.jpg"/></a>
  11. </section>
  12. <article class="index_content">
  13. {{if eq .Type "article" }}<br/>{{ with .Page.Params.Image }}{{ partial "taxonomy/image.html" . }}{{ end }}<a href="{{ .Permalink }}" class="u-url"><h3 class="p-name entry-title">{{ .Title }}</h3></a><b>{{ .Description }}</b>{{ end }}
  14. {{ if eq .Type "article" }}<section class="info">
  15. <span class="info-date"><time class="dt-published" datetime="{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}">{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}</time></span><span class="reading-time">{{ .ReadingTime }}-minute read</span><br/><br/>
  16. <span class="blogs_span">{{ with .Page.Params.Blog }}<i class="fa fa-pencil-square-o fa-1.5x fa-fw" aria-hidden="true" title="Tags"></i><b> {{ partial "taxonomy/blog.html" . }}{{ end }}</b></span><br/>
  17. <span class="categories_span">{{ with .Page.Params.category }}<i class="fa fa-tags fa-1.5x fa-fw" aria-hidden="true" title="Tags"></i>{{ partial "taxonomy/categories.html" . }}{{ end }}{{ with .Page.Params.tag }}, {{ partial "taxonomy/tags.html" . }}{{ end }}</span>
  18. </section>{{ end }}
  19. <section class="e-content">
  20. {{ if eq .Type "article"}}{{ .Summary }}{{else}}{{ .Content }}{{end}}
  21. {{ if eq .Type "photo"}}
  22. <section class="photos">
  23. {{$link := .Permalink}}
  24. {{$summary := .Content}}
  25. {{ range .Page.Params.Photo }}
  26. {{ if isset . "value" }}
  27. <a href="{{ $link }}" class="u-url"><img class="u-photo thumb" src="{{ .value}}" title="{{ .alt }}" alt="{{ .alt }}"/></a>
  28. {{ else }}
  29. <a href="{{ $link }}" class="u-url"><img class="u-photo thumb" src="{{ . }}" title="{{ $summary }}" alt="Alt not yet added, will fix!"/></a>
  30. {{end}}{{end}}
  31. </section>
  32. {{end}}
  33. </section><br/>
  34. {{ if not (eq .Type "article") }}<section class="info">
  35. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  36. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  37. {{ $.Scratch.Set "likecount" 0 }}
  38. {{ $.Scratch.Set "sharecount" 0 }}
  39. {{ $.Scratch.Set "commentcount" 0 }}
  40. {{ $.Scratch.Set "mentioncount" 0 }}
  41. {{ range $mentions }}
  42. {{ if eq (index . "wm-property") "like-of" }}{{ $.Scratch.Add "likecount" 1 }}{{ end }}
  43. {{ if eq (index . "wm-property") "repost-of" }}{{ $.Scratch.Add "sharecount" 1 }}{{ end }}
  44. {{ if eq (index . "wm-property") "in-reply-to" }}{{ $.Scratch.Add "commentcount" 1 }}{{ end }}
  45. {{ if eq (index . "wm-property") "mention" }}{{ $.Scratch.Add "mentioncount" 1 }}{{ end }}
  46. {{ end }}
  47. <a href="{{ .Permalink }}"><span class="mini_interactions">{{ $likecount := $.Scratch.Get "likecount" }}{{ if ne $likecount 0 }} <i class="fa fa-thumbs-up fa-1.5x fa-fw" aria-hidden="true" title="Likes"></i>{{$likecount}} like{{if gt $likecount 1}}s{{end}}{{end}}
  48. {{ $sharecount := $.Scratch.Get "sharecount" }}{{ if ne $sharecount 0 }} <i class="fa fa-share fa-1.5x fa-fw" aria-hidden="true" title="Shares"></i>{{$sharecount}} share{{if gt $sharecount 1}}s{{end}}{{end}}
  49. {{ $commentcount := $.Scratch.Get "commentcount" }}{{ if ne $commentcount 0 }} <i class="fa fa-comment fa-1.5x fa-fw" aria-hidden="true" title="Replies"></i>{{$commentcount}} repl{{if gt $commentcount 1}}ies{{else}}y{{end}}{{end}}
  50. {{ $mentioncount := $.Scratch.Get "mentioncount" }}{{ if ne $mentioncount 0 }} <i class="fa fa-sticky-note fa-1.5x fa-fw" aria-hidden="true" title="Mentions"></i>{{$mentioncount}} mention{{if gt $mentioncount 1}}s{{end}}{{end}}</span></a>
  51. <span class="info-date-other"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}">{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}</time></a>
  52. <span class="syndication">
  53. {{ with .Page.Params.pleromaurl }} -
  54. Syndication: <a href="{{ . }}"><i class="fa fa-pleroma fa-1.5x fa-fw" aria-hidden="true" title="Pleroma"></i></a>{{ end }}</span><span class="categories_span_other">{{ with .Page.Params.category }}{{ partial "taxonomy/categories.html" . }}{{ end }}{{ with .Page.Params.tag }}, {{ partial "taxonomy/tags.html" . }}{{ end }}</span></span>
  55. </section>{{ end }}
  56. </article>
  57. </section>
  58. {{ else }}
  59. <section data-post-type="{{ .Params.posttype }}" data-post-id="{{ .Params.slug }}" class="h-entry" id="response">
  60. <section class="author" style="display:none;">
  61. <a rel="author" class="p-author h-card" rel="me" href="https://jk.nipponalba.scot"><img src="/images/profile.jpg"/><div class="title">{{ .Site.Params.Title }}</div></a>
  62. </section>
  63. <article class="h-cite"><p>{{ .Site.Params.Title }}
  64. {{ if eq .Params.posttype "like-of" }} liked <a href="{{ index .Params "like-of" }}" class="u-like-of">{{ index .Params "like-of" }}</a>{{ end }}
  65. {{ if eq .Params.posttype "in-reply-to" }} replied to <a href="{{ index .Params "in-reply-to" }}" class="u-in-reply-to">{{ index .Params "in-reply-to" }}</a>{{ end }}
  66. {{ if eq .Params.posttype "repost-of" }} shared <a href="{{ index .Params "repost-of" }}" class="u-repost-of">{{ index .Params "repost-of" }}</a>{{ end }}</p>
  67. {{ if .Content }}<section class="p-name p-content">{{ .Content }}</section>{{end}}
  68. {{ if not (eq .Type "article") }}<section class="info">
  69. <span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><span class="info-date"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></a></span><br/>
  70. </section>{{ end }}
  71. </article>
  72. </section><hr/>
  73. {{end}}
  74. {{ end }}
  75. <span id="pagination-bottom">{{ partial "pagination.html" . }}</span>
  76. </section>
  77. {{ end }}