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.

106 lines
5.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. {{ define "main" }}
  2. {{ if not (eq .Type "response" "bookmarkof")}}
  3. <article class="post h-entry entry contents">
  4. <div 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. </div>
  7. {{ with .Page.Params.Image }}{{ partial "taxonomy/image.html" . }}{{ end }}<h3 class="p-name entry-title">{{ .Title }}</h3><b>{{ .Description }}</b>
  8. <aside>
  9. {{ if eq .Type "article" }}<div class="info">
  10. {{ with .Page.Params.Blog }}Blog: {{ partial "taxonomy/blog.html" . }}{{ end }}<span id="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/>
  11. {{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}<span class="reading-time">{{ .ReadingTime }}-minute read</span><br/>
  12. {{ with .Page.Params.tag }}Tags: {{ partial "taxonomy/tags.html" . }}{{ end }}
  13. </div>{{ end }}
  14. <div class="e-content">
  15. {{ .Content }}
  16. {{ if eq .Type "photo"}}
  17. <div class="photogrid">
  18. {{ range .Page.Params.Photo }}
  19. <a href="{{ . }}"><img class="u-photo thumb" src="{{ replace . "800." "300."}}"/></a>
  20. {{end}}
  21. </div>
  22. {{end}}
  23. {{ if eq .Type "article" }}<div class="p-summary" style="display:none">
  24. {{ .Page.Params.summary }}<br/>
  25. </div>
  26. {{ end }}<br/>
  27. </div>
  28. {{ if not (eq .Type "article") }}<div class="info">
  29. {{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}
  30. </div>{{ end }}
  31. {{ $pathJSON := (print .Permalink "bridgy.json") }}
  32. {{ $relpathJSON := (print .RelPermalink "bridgy.json") }}
  33. {{ if fileExists $relpathJSON }}
  34. <span class="syndication">
  35. {{ $mJSON := getJSON $pathJSON }}
  36. Syndicated to <a href="{{ printf $mJSON.url}}">Pleroma</a>
  37. </span><span id="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>
  38. {{ end }}
  39. <a href="https://brid.gy/publish/mastodon"></a>
  40. <div class="interactions"><h4>Interactions</h4></div>
  41. <div class="webmention-form">
  42. <form action="https://webmention.io/jk.nipponalba.scot/webmention" method="post">
  43. <label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
  44. <input name="source" type="url"/>
  45. <input name="target" value="{{ .Permalink }}" type="hidden"/>
  46. <input value="Send Webmention" type="submit"/>
  47. </form>
  48. </div>
  49. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  50. {{ if isset $mention_ids 1}}
  51. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  52. {{ $mentions := sort $mentions "published" }}
  53. <div class="webmentions">
  54. <div class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq .wmproperty "like-of" }}
  55. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  56. {{ end }}</div>
  57. <div class="share interaction"><h4>Shares</h4>{{ range $mentions }}{{ if eq .wmproperty "repost-of" }}
  58. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  59. {{ end }}</div>
  60. <h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }}
  61. </div>{{end}}
  62. </aside>
  63. </article>
  64. {{ else if eq .Type "bookmarkof" }}
  65. {{ $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. <h4>{{ $cat }}</h4>
  73. {{ range $.Site.Data.bookmarks }}
  74. {{ if eq .category $cat }}
  75. <section data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  76. <div class="author" style="display:none">
  77. <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>
  78. </div>
  79. <aside>
  80. <article class="h-cite">
  81. <a href="{{ .bookmarkof | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  82. </article>
  83. </aside>
  84. </section>
  85. {{ end }}
  86. {{ end }}
  87. {{ end }}
  88. {{ else }}
  89. <article class="h-entry" id="response">
  90. <div class="author">
  91. <a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot"><img src="/images/profile.jpg"/><div class="title">{{ .Site.Params.Title }}</div></a>
  92. </div>
  93. <div>
  94. {{ if .Params.likeof }}<p>Liked <a href="{{ .Params.likeof }}" class="u-url u-like-of"> {{ .Params.likeof }}</a>{{ end }}
  95. {{ if .Params.inreplyto }}<p>Replied to <a href="{{ .Params.inreplyto }}" class="u-url u-in-reply-to"> {{ .Params.inreplyto }}</a>{{ end }}
  96. {{ if .Params.repostof }}<p>Shared <a href="{{ .Params.repostof }}" class="u-url u-repost-of"> {{ .Params.repostof }}</a>{{ end }}</p>
  97. {{ if .Content }}<div class="p-name p-content"><p>{{ .Content }}</p></div> {{end}}
  98. </div>
  99. {{ if not (eq .Type "article") }}<div class="info">
  100. {{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}<span id="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/>
  101. </div>{{ end }}
  102. {{end}}
  103. {{end}}