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.

126 lines
10 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
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="interactions_intro">Interactions on this site are possible either via <a href="https://indieweb.org/Webmention" title="Webmention is a web standard for mentions and conversations across the web, a powerful building block that is used for a growing federated network of comments, likes, reposts, and other rich interactions across the decentralized social web." class="u-url" target="_blank">webmentions</a> or matrix courtesy of cactus chat, though guest (not logged in) commenting is not yet available. Alternatively, contact me via <a href="https://matrix.to/#/@jk:nipponalba.scot" class="u-url" target="_blank">matrix</a> or <a href="mailto:jk@nipponalba.scot" class="u-url">email</a>.<br/><br/>
  44. <label for="toggle_webmentions" id="webmentions_label">Webmentions</label> | <label for="toggle_comments" id="comments_label">Comments</label></section>
  45. <input type="radio" name="interactions" id="toggle_webmentions" checked="checked"><input type="radio" name="interactions" id="toggle_comments">
  46. <section id="webmentions_frame"><section id="webmention-form">
  47. <form action="https://webmention.io/jk.nipponalba.scot/webmention" method="post">
  48. <label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
  49. <input name="source" type="url"/>
  50. <input name="target" value="{{ .Permalink }}" type="hidden"/>
  51. <input value="Send Webmention" type="submit"/>
  52. </form>
  53. <p>Alternatively, if you do not have a webmentions enabled website then you can leave a message using the comment parade form below.</p>
  54. <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>
  55. <p>All going well, interactions will take a few minutes to appear, possibly longer due to .. gremlins.</p>
  56. </section>
  57. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  58. {{ if isset $mention_ids 0}}
  59. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  60. {{ $mentions := sort $mentions "wm-received" }}
  61. <section id="webmentions">
  62. <section class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "like-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. <section class="share interaction"><h4>Shares</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "repost-of" }}
  66. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  67. {{ end }}</section>
  68. <h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }}
  69. </section>{{ end }}</section>
  70. <section id="comments_frame">
  71. <div id="comment-section"></div>
  72. <script>
  73. initComments({
  74. node: document.getElementById("comment-section"),
  75. defaultHomeserverUrl: "https://nipponalba.scot",
  76. serverName: "nipponalba.scot",
  77. siteName: "jk.nipponalba.scot",
  78. commentSectionId: "{{ .Page.Params.slug }}"
  79. })
  80. </script></section>
  81. </section></article>
  82. {{ else if eq .Type "bookmarkof" }}
  83. <section class="bookmarks">{{ $cats := slice }}
  84. {{ range .Site.Data.bookmarks }}
  85. {{ $cats = $cats | append .category }}
  86. {{ end }}
  87. {{ $cats = uniq $cats | sort }}
  88. {{ range $cats }}
  89. {{ $cat := . }}
  90. <section id="{{ $cat }}">
  91. <h4>{{ $cat }}</h4>
  92. {{ range $.Site.Data.bookmarks }}
  93. {{ if eq .category $cat }}
  94. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark">
  95. <section class="author" style="display:none">
  96. <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>
  97. </section>
  98. <section class="h-entry">
  99. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  100. </section>
  101. </article>
  102. {{ end }}
  103. {{ end }}</section>
  104. {{ end }}</section>
  105. {{ else }}
  106. <article class="{{ .Params.posttype }} h-entry entry" id="response">
  107. <section class="author" style="display:none;">
  108. <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>
  109. </section>
  110. <section class="xrayReply"><p>{{ .Site.Params.Title }}
  111. {{ 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 }}
  112. {{ 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 }}
  113. {{ 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>
  114. {{ 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">{{ .Params.xPublished }}</span><span class="response-text">{{ plainify .Params.xContent }}
  115. {{ if .Params.xContentPhoto }}<br/><br/>{{ range .Params.xContentPhoto }}<img class="u-photo xContentPhoto" src="{{ . }}"/>{{ end }}{{ end }}</span></section><br/>{{end}}
  116. {{ if .Content }}<section class="e-content p-name">{{ .Content }}</section>{{ end }}
  117. </section>
  118. {{ if not (eq .Type "article") }}<section class="info">
  119. </section>{{ end }}
  120. <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/>
  121. <a class="u-url" style="display:none;" href="https://fed.brid.gy/">https://fed.brid.gy/</a>
  122. </article>
  123. {{end}}
  124. {{end}}