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.

104 lines
6.6 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
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. <span class="syndication">
  34. {{ with .Page.Params.pleromalink }}
  35. Syndicated to <a href="{{ . }}">Pleroma</a></span>{{ end }}
  36. <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>
  37. <a href="https://brid.gy/publish/mastodon"></a>
  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 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. </article>
  64. {{ else if eq .Type "bookmarkof" }}
  65. <section class="bookmarks">{{ $cats := slice }}
  66. {{ range .Site.Data.bookmarks }}
  67. {{ $cats = $cats | append .category }}
  68. {{ end }}
  69. {{ $cats = uniq $cats | sort }}
  70. {{ range $cats }}
  71. {{ $cat := . }}
  72. <section id="{{ $cat }}">
  73. <h4>{{ $cat }}</h4>
  74. {{ range $.Site.Data.bookmarks }}
  75. {{ if eq .category $cat }}
  76. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  77. <section class="author" style="display:none">
  78. <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>
  79. </section>
  80. <section class="h-cite">
  81. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  82. </section>
  83. </article>
  84. {{ end }}
  85. {{ end }}</section>
  86. {{ end }}</section>
  87. {{ else }}
  88. <article class="h-entry" id="response">
  89. <section class="author" style="display:none;">
  90. <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>
  91. </section>
  92. <section id="response-details"><br/><p>{{ .Site.Params.Title }}
  93. {{ 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 }}
  94. {{ if eq .Params.posttype "like-of" }} liked <a href="{{ index .Params "like-of" }}" class="u-like-of">{{ index .Params "like-of" }}</a>{{ end }}
  95. {{ if eq .Params.posttype "repost-of" }} shared <a href="{{ index .Params "repost-of" }}" class="u-repost-of">{{ index .Params "repost-of" }}</a>{{ end }}</p>
  96. {{ if .Content }}<span class="p-name p-content"><p>{{ .Content }}</p></span> {{end}}
  97. </section>
  98. {{ if not (eq .Type "article") }}<section class="info">
  99. <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/>
  100. </section>{{ end }}
  101. </article>
  102. <a href="https://brid.gy/publish/mastodon"></a>{{end}}
  103. {{end}}