source for sakino.kelbie.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.

100 lines
6.9 KiB

  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="p-author h-card" rel="me" href="https://jon.kelbie.scot">{{ .Site.Params.Author }}<img src="/images/profile1.jpg"/></a>
  6. </section>
  7. {{ with .Page.Params.Image }}{{ partial "image.html" . }}{{ end }}
  8. <section class="post_content">{{ if eq .Type "article" }}<h3 class="p-name entry-title">{{ .Title }}</h3><b>{{ .Description }}</b><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. {{ if eq .Type "article" }}<section class="e-content">{{else}}<section class="e-content p-name">{{end}}
  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=" Trying to 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="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>
  34. <hr/>
  35. <section id="interactions"><h4>Interactions</h4>
  36. <section id="webmention-form">
  37. Interactions on this site are possible only 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>. Alternatively, contact me via <a href="xmpp:jk@nipponalba.scot" class="u-url" target="_blank">xmpp</a>, <a href="https://matrix.to/#/@jk:nipponalba.scot" class="u-url" target="_blank">matrix</a> or <a href="mailto:jon@kelbie.scot" class="u-url">email</a>.<br/><br/>
  38. <form action="https://webmention.io/jon.kelbie.scot/webmention" method="post">
  39. <label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
  40. <input name="source" type="url"/>
  41. <input name="target" value="{{ .Permalink }}" type="hidden"/>
  42. <input value="Send Webmention" type="submit"/>
  43. </form>
  44. <p>Alternatively, if you do not have a webmentions enabled website then you can leave a message using the comment parade form below.</p>
  45. <details id="commentparade"><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>
  46. <p>All going well, interactions will take a few minutes to appear, possibly longer due to .. gremlins.</p>
  47. </section>
  48. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  49. {{ if isset $mention_ids 0}}
  50. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  51. {{ $mentions := sort $mentions "wm-received" }}
  52. <section id="webmentions">
  53. <section class="like interaction"><h4>Likes</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "like-of" }}
  54. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  55. {{ end }}</section>
  56. <section class="share interaction"><h4>Shares</h4>{{ range $mentions }}{{ if eq (index . "wm-property") "repost-of" }}
  57. <a href="{{ .author.url }}"><img class="remote_profile" src="{{ .author.photo }}" title="{{ .author.name }}" alt="{{ .author.name }}" /></a>{{ end}}
  58. {{ end }}</section>
  59. <h4>Comments & Replies</h4>{{ partial "webmention.html" $mentions }}
  60. </section>{{ end }}</section>
  61. </article>
  62. {{ else if eq .Type "bookmarkof" }}
  63. <section class="bookmarks">{{ $cats := slice }}
  64. {{ range .Site.Data.bookmarks }}
  65. {{ $cats = $cats | append .category }}
  66. {{ end }}
  67. {{ $cats = uniq $cats | sort }}
  68. {{ range $cats }}
  69. {{ $cat := . }}
  70. <section id="{{ $cat }}">
  71. <h4>{{ $cat }}</h4>
  72. {{ range $.Site.Data.bookmarks }}
  73. {{ if eq .category $cat }}
  74. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  75. <section class="h-cite">
  76. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  77. </section>
  78. </article>
  79. {{ end }}
  80. {{ end }}</section>
  81. {{ end }}</section>
  82. {{ else}}
  83. <article class="h-entry" id="response">
  84. <section class="author" style="display:none;">
  85. <a rel="author" class="p-author h-card" rel="me" href="https://jon.kelbie.scot">{{ .Site.Params.Author }}<img src="/images/profile1.jpg"/></a>
  86. </section>
  87. <section id="response-details"><br/><p class="response-top">{{ .Site.Params.Firstname }}
  88. {{ 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 }}
  89. {{ if eq .Params.posttype "like-of" }} liked <a href="{{ index .Params "like-of" }}" class="u-like-of">{{ index .Params "like-of" }}</a>{{ end }}
  90. {{ if eq .Params.posttype "repost-of" }} shared <a href="{{ index .Params "repost-of" }}" class="u-repost-of">{{ index .Params "repost-of" }}</a>{{ end }}</p>
  91. {{ if .Content }}<span class="p-name p-content"><p>{{ .Content }}</p></span> {{end}}
  92. {{ if not (eq .Type "article") }}<section class="info">
  93. <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/>
  94. </section>
  95. </section>
  96. </article>{{ end }}
  97. {{ end }}
  98. {{end}}