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.

107 lines
6.8 KiB

5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 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
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. <article class="post h-entry entry contents">
  4. <section class="author" style="display:none;">
  5. <a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}<img src="/images/profile.jpg"/></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="blogs_span">{{ with .Page.Params.Blog }}Blog: {{ partial "taxonomy/blog.html" . }}{{ end }}</span><span class="info-date"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></span><br/>
  10. <span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><span class="reading-time">{{ .ReadingTime }}-minute read</span><br/>
  11. <span class="tags_span">{{ with .Page.Params.tag }}Tags: {{ partial "taxonomy/tags.html" . }}{{ end }}</span>
  12. </section>{{ end }}
  13. <section class="e-content">
  14. {{ .Content }}
  15. {{ if eq .Type "photo"}}
  16. <section class="photogrid">
  17. {{ range .Page.Params.Photo }}
  18. {{ if isset . "value" }}
  19. <a href="{{ .value }}"><img class="u-photo" src="{{ .value }}" alt="{{ .alt }}"/></a>
  20. {{ else }}
  21. <a href="{{ . }}"><img class="u-photo" src="{{ . }}" 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. <section class="info">
  32. {{ if not (eq .Type "article") }}<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span>{{ end }}
  33. {{ $pathJSON := (print .Permalink "bridgy.json") }}
  34. {{ $relpathJSON := (print .RelPermalink "bridgy.json") }}
  35. {{ if fileExists $relpathJSON }}
  36. <span class="syndication">
  37. {{ $mJSON := getJSON $pathJSON }}
  38. Syndicated to <a href="{{ printf $mJSON.url}}">Pleroma</a></span>{{ end }}
  39. <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></section>
  40. <a href="https://brid.gy/publish/mastodon"></a>
  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 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. </article>
  67. {{ else if eq .Type "bookmarkof" }}
  68. <section class="bookmarks">{{ $cats := slice }}
  69. {{ range .Site.Data.bookmarks }}
  70. {{ $cats = $cats | append .category }}
  71. {{ end }}
  72. {{ $cats = uniq $cats | sort }}
  73. {{ range $cats }}
  74. {{ $cat := . }}
  75. <section id="{{ $cat }}">
  76. <h4>{{ $cat }}</h4>
  77. {{ range $.Site.Data.bookmarks }}
  78. {{ if eq .category $cat }}
  79. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  80. <section class="author" style="display:none">
  81. <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>
  82. </section>
  83. <section class="h-cite">
  84. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  85. </section>
  86. </article>
  87. {{ end }}
  88. {{ end }}</section>
  89. {{ end }}</section>
  90. {{ else }}
  91. <article class="h-entry" id="response">
  92. <section class="author" style="display:none;">
  93. <a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot"><img src="/images/profile.jpg"/><span class="title">{{ .Site.Params.Title }}</span></a>
  94. </section>
  95. <section id="response-details"><br/><p>{{ .Site.Params.Title }}
  96. {{ 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 }}
  97. {{ if eq .Params.posttype "like-of" }} liked <a href="{{ index .Params "like-of" }}" class="u-like-of">{{ index .Params "like-of" }}</a>{{ end }}
  98. {{ if eq .Params.posttype "repost-of" }} shared <a href="{{ index .Params "repost-of" }}" class="u-repost-of">{{ index .Params "repost-of" }}</a>{{ end }}</p>
  99. {{ if .Content }}<span class="p-name p-content"><p>{{ .Content }}</p></span> {{end}}
  100. </section>
  101. {{ if not (eq .Type "article") }}<section class="info">
  102. <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/>
  103. </section>{{ end }}
  104. </article>
  105. <a href="https://brid.gy/publish/mastodon"></a>{{end}}
  106. {{end}}