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.

108 lines
8.4 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.images }}{{ 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. {{ if or (isset .Page.Params "pleromaurl") (isset .Page.Params "pixelfedurl")}}
  35. - Syndication:
  36. {{ with .Page.Params.pleromaurl }}<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">
  37. {{ with .Page.Params.pixelfedurl }}<a rel="syndication" class="u-syndication" href="{{ . }}"><i class="fa fa-pixelfed fa-1.5x fa-fw" aria-hidden="true" title="Pixelfed"></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 }}
  38. {{ end }}</span></span>
  39. </section>{{ end }}
  40. <a href="https://brid.gy/publish/mastodon"></a></article>
  41. <section id="interactions"><h4>Interactions</h4>
  42. <section id="webmention-form">
  43. <form action="https://webmention.io/jk.nipponalba.scot/webmention" method="post">
  44. <label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
  45. <input name="source" type="url"/>
  46. <input name="target" value="{{ .Permalink }}" type="hidden"/>
  47. <input value="Send Webmention" type="submit"/>
  48. </form>
  49. <p>Alternatively, if you do not have a webmentions enabled website then you can leave a message using the comment parade form below.</p>
  50. <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>
  51. <p>All going well, interactions will take a few minutes to appear, possibly longer due to .. gremlins.</p>
  52. </section>
  53. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  54. {{ if isset $mention_ids 0}}
  55. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  56. {{ $mentions := sort $mentions "wm-received" }}
  57. <section href="webmentions" id="webmentions">
  58. <section class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "like-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. <section class="share interaction"><h4>Shares</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "repost-of" }}
  62. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  63. {{ end }}</section>
  64. <h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }}
  65. </section>{{ end }}</section>
  66. {{ else if eq .Type "bookmarkof" }}
  67. <section class="bookmarks">{{ $cats := slice }}
  68. {{ range .Site.Data.bookmarks }}
  69. {{ $cats = $cats | append .category }}
  70. {{ end }}
  71. {{ $cats = uniq $cats | sort }}
  72. {{ range $cats }}
  73. {{ $cat := . }}
  74. <section id="{{ $cat }}">
  75. <h4>{{ $cat }}</h4>
  76. {{ range $.Site.Data.bookmarks }}
  77. {{ if eq .category $cat }}
  78. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  79. <section class="author" style="display:none">
  80. <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>
  81. </section>
  82. <section class="h-cite">
  83. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  84. </section>
  85. </article>
  86. {{ end }}
  87. {{ end }}</section>
  88. {{ end }}</section>
  89. {{ else }}
  90. <section data-post-type="{{ .Params.posttype }}" data-post-id="{{ .Params.slug }}" class="h-entry" id="response">
  91. <section class="author" style="display:none;">
  92. <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>
  93. </section>
  94. <article class="h-cite"><p>{{ .Site.Params.Title }}
  95. {{ 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 }}
  96. {{ 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 }}
  97. {{ 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>
  98. {{ 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}}
  99. {{ if .Params.Content }}{{ .Params.Content }}{{ end }}
  100. {{ if not (eq .Type "article") }}<section class="info">
  101. <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/>
  102. </section>{{ end }}
  103. </article>
  104. </section>
  105. <a href="https://brid.gy/publish/mastodon"></a>{{end}}
  106. {{end}}