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.

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