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.

105 lines
8.1 KiB

4 years ago
5 years ago
5 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
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. {{ if not (eq .Type "response" "bookmarkof")}}
  3. {{ if ne .Type "article"}}<article class="post h-entry entry contents">{{else}}<article class="post longpost h-entry entry contents">{{end}}
  4. <section class="author" style="display:none">
  5. <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.Author}}</div></a>
  6. </section>
  7. {{ if eq .Type "article" }}{{ with .Page.Params.Image }}{{ partial "taxonomy/image.html" . }}{{ end }}<h3 class="p-name entry-title">{{ .Title }}</h3><b>{{ .Description }}</b>
  8. <section class="info">
  9. <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/>
  10. <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/>
  11. <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>
  12. </section>{{ end }}
  13. <section class="e-content p-name">
  14. {{ .Content }}
  15. {{ if eq .Type "photo"}}
  16. <section class="photos">
  17. {{ range .Page.Params.Photo }}
  18. {{ if isset . "value" }}
  19. <a href="{{ .value }}"><img class="u-photo full" src="{{ .value }}" title="{{ .alt }}" alt="{{ .alt }}"/></a>
  20. {{ else }}
  21. <a href="{{ . }}"><img class="u-photo full" src="{{ . }}" title="Alt not yet added, will fix!" alt="Alt not yet added, will fix!"/></a>
  22. {{end}}
  23. {{end}}
  24. </section>
  25. {{end}}
  26. {{ if eq .Type "article" }}<section class="p-summary" style="display:none">
  27. {{ .Page.Params.summary }}<br/>
  28. </section>
  29. {{ end }}<br/>
  30. </section>
  31. {{ if not (eq .Type "article") }}<section class="info">
  32. <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>
  33. <span class="syndication">
  34. {{ with .Page.Params.pleromaurl }} -
  35. Syndication: <a rel="syndication" class="u-syndication" 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>
  36. </section>{{ end }}
  37. <a href="https://brid.gy/publish/mastodon"></a></article>
  38. <section id="interactions"><h4>Interactions</h4>
  39. <section id="webmention-form">
  40. <form action="https://webmention.io/jk.nipponalba.scot/webmention" method="post">
  41. <label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
  42. <input name="source" type="url"/>
  43. <input name="target" value="{{ .Permalink }}" type="hidden"/>
  44. <input value="Send Webmention" type="submit"/>
  45. </form>
  46. <p>Alternatively, if you do not have a webmentions enabled website then you can leave a message using the comment parade form below.</p>
  47. <details><summary>Comment Parade</summary><p>Please copy the following and paste into the URL field below: <span class="url">{{.Permalink }}</span></p><embed type="text/html" class="commentparade" src="https://commentpara.de"></embed></details>
  48. <p>All going well, interactions will take a few minutes to appear, possibly longer due to .. gremlins.</p>
  49. </section>
  50. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  51. {{ if isset $mention_ids 0}}
  52. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  53. {{ $mentions := sort $mentions "wm-received" }}
  54. <section href="webmentions" id="webmentions">
  55. <section class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "like-of" }}
  56. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  57. {{ end }}</section>
  58. <section class="share interaction"><h4>Shares</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "repost-of" }}
  59. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  60. {{ end }}</section>
  61. <h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }}
  62. </section>{{ end }}</section>
  63. {{ else if eq .Type "bookmarkof" }}
  64. <section class="bookmarks">{{ $cats := slice }}
  65. {{ range .Site.Data.bookmarks }}
  66. {{ $cats = $cats | append .category }}
  67. {{ end }}
  68. {{ $cats = uniq $cats | sort }}
  69. {{ range $cats }}
  70. {{ $cat := . }}
  71. <section id="{{ $cat }}">
  72. <h4>{{ $cat }}</h4>
  73. {{ range $.Site.Data.bookmarks }}
  74. {{ if eq .category $cat }}
  75. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  76. <section class="author" style="display:none">
  77. <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.Author}}</div></a>
  78. </section>
  79. <section class="h-cite">
  80. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  81. </section>
  82. </article>
  83. {{ end }}
  84. {{ end }}</section>
  85. {{ end }}</section>
  86. {{ else }}
  87. <section data-post-type="{{ .Params.posttype }}" data-post-id="{{ .Params.slug }}" class="h-entry" id="response">
  88. <section class="author" style="display:none;">
  89. <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>
  90. </section>
  91. <article class="h-cite"><p>{{ .Site.Params.Title }}
  92. {{ if eq .Params.posttype "like-of" }} liked <i class="fa fa-thumbs-up fa-1.5x fa-fw" aria-hidden="true" title="Likes"></i> <a href="{{ .Params.xAuthorUrl }}" target="_blank">{{ .Params.xAuthor }}</a>'s <a href="{{ index .Params "like-of" }}" class="u-like-of">{{ .Params.xPostType }}</a>{{ end }}
  93. {{ if eq .Params.posttype "in-reply-to" }} replied to <i class="fa fa-comment fa-1.5x fa-fw" aria-hidden="true" title="Likes"></i> <a href="{{ .Params.xAuthorUrl }}" target="_blank">{{ .Params.xAuthor }}</a>'s <a href="{{ index .Params "in-reply-to" }}" class="u-in-reply-to">{{ .Params.xPostType }}</a>{{ end }}
  94. {{ if eq .Params.posttype "repost-of" }} shared <i class="fa fa-share fa-1.5x fa-fw" aria-hidden="true" title="Likes"></i> <a href="{{ .Params.xAuthorUrl }}" target="_blank">{{ .Params.xAuthor }}</a>'s <a href="{{ index .Params "repost-of" }}" class="u-repost-of">{{ .Params.xPostType }}</a>{{ end }}</p>
  95. {{ if .Params.xContent }}<section class="p-name p-content"><span class="remotePhoto"><a href="{{ .Params.xAuthorUrl }}" target="_blank"><img src="{{ .Params.xPhoto }}" title="{{ .Params.xAuthor }}" alt="{{ .Params.xAuthor }}'s avatar"/></a></span><span class="response-date">{{ dateFormat "Mon, 02 Jan 2006 15:04:05 GMT" .Params.xPublished }}</span><br/><span class="response-text">{{ plainify .Params.xContent }}</span></section>{{end}}
  96. {{ if .Params.Content }}{{ .Params.Content }}{{ end }}
  97. {{ if not (eq .Type "article") }}<section class="info">
  98. <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 "Mon, 02 Jan 2006 15:04:05 GMT" }}">{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}</time></a></span><br/>
  99. </section>{{ end }}
  100. </article>
  101. </section>
  102. <a href="https://brid.gy/publish/mastodon"></a>{{end}}
  103. {{end}}