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.

99 lines
6.0 KiB

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
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
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
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. {{ with .Page.Params.Image }}{{ partial "taxonomy/image.html" . }}{{ end }}<h3 class="p-name entry-title">{{ .Title }}</h3><b>{{ .Description }}</b>
  8. {{ if eq .Type "article" }}<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. <a href="{{ . }}"><img class="u-photo thumb" src="{{ replace . "800." "300."}}"/></a>
  19. {{end}}
  20. </section>
  21. {{end}}
  22. {{ if eq .Type "article" }}<section class="p-summary" style="display:none">
  23. {{ .Page.Params.summary }}<br/>
  24. </section>
  25. {{ end }}<br/>
  26. </section>
  27. <section class="info">
  28. {{ if not (eq .Type "article") }}<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span>{{ end }}
  29. {{ $pathJSON := (print .Permalink "bridgy.json") }}
  30. {{ $relpathJSON := (print .RelPermalink "bridgy.json") }}
  31. {{ if fileExists $relpathJSON }}
  32. <span class="syndication">
  33. {{ $mJSON := getJSON $pathJSON }}
  34. Syndicated to <a href="{{ printf $mJSON.url}}">Pleroma</a></span>{{ end }}
  35. <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>
  36. <a href="https://brid.gy/publish/mastodon"></a>
  37. <section id="interactions"><h4>Interactions</h4>
  38. <section id="webmention-form">
  39. <form action="https://webmention.io/jk.nipponalba.scot/webmention" method="post">
  40. <label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
  41. <input name="source" type="url"/>
  42. <input name="target" value="{{ .Permalink }}" type="hidden"/>
  43. <input value="Send Webmention" type="submit"/>
  44. </form>
  45. </section>
  46. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  47. {{ if isset $mention_ids 1}}
  48. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  49. {{ $mentions := sort $mentions "wm-received" }}
  50. <section id="webmentions">
  51. <section class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "like-of" }}
  52. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  53. {{ end }}</section>
  54. <section class="share interaction"><h4>Shares</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "repost-of" }}
  55. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  56. {{ end }}</section>
  57. <h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }}
  58. </section>{{ end }}</section>
  59. </article>
  60. {{ else if eq .Type "bookmarkof" }}
  61. <section class="bookmarks">{{ $cats := slice }}
  62. {{ range .Site.Data.bookmarks }}
  63. {{ $cats = $cats | append .category }}
  64. {{ end }}
  65. {{ $cats = uniq $cats | sort }}
  66. {{ range $cats }}
  67. {{ $cat := . }}
  68. <section id="{{ $cat }}">
  69. <h4>{{ $cat }}</h4>
  70. {{ range $.Site.Data.bookmarks }}
  71. {{ if eq .category $cat }}
  72. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  73. <section class="author" style="display:none">
  74. <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>
  75. </section>
  76. <section class="h-cite">
  77. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  78. </section>
  79. </article></section>
  80. {{ end }}
  81. {{ end }}
  82. {{ end }}</section>
  83. {{ else }}
  84. <article class="h-entry" id="response">
  85. <section class="author" style="display:none;">
  86. <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>
  87. </section>
  88. <section id="response-details"><br/><p>{{ .Site.Params.Title }}
  89. {{ if eq .Params.posttype "in-reply-to" }} replied to a <a href="{{ index .Params "in-reply-to" }}" class="u-like-of"> post</a>{{ end }}
  90. {{ if eq .Params.posttype "like-of" }} liked a <a href="{{ index .Params "like-of" }}" class="u-like-of"> post</a>{{ end }}
  91. {{ if eq .Params.posttype "repost-of" }} shared a <a href="{{ index .Params "repost-of" }}" class="u-repost-of"> post</a>{{ end }}</p>
  92. {{ if .Content }}<span class="p-name p-content"><p>{{ .Content }}</p></span> {{end}}
  93. </section>
  94. {{ if not (eq .Type "article") }}<section class="info">
  95. <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/>
  96. </section>{{ end }}
  97. {{end}}
  98. {{end}}