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.

111 lines
5.2 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
  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. <div class="post-content">{{ with .Page.Params.Image }}{{ partial "taxonomy/image.html" . }}{{ end }}<h3 class="post-title p-name entry-title">{{ .Title }}</h3><b>{{ .Description }}</b>
  8. <aside>
  9. {{ if eq .Type "article" }}<div class="info">
  10. <i class="fa fa-sun"></i><a class="u-url" href="{{ .RelPermalink }}"><span class="date"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></span></a>
  11. <i class="fa fa-clock"></i><span class="reading-time">{{ .ReadingTime }}-minute read</span>
  12. </div>{{end}}
  13. <div class="e-content">{{ .Content }}
  14. {{ if eq .Type "photo"}}
  15. <div class="photos">
  16. {{ range .Page.Params.Photo }}
  17. <a href="{{ . }}"><img class="u-photo thumb" src="{{ replace . "800." "300."}}"/></a>
  18. {{end}}
  19. </div>
  20. {{end}}
  21. {{ if eq .Type "article" }}<div class="p-summary" style="display:none">
  22. {{ .Page.Params.summary }}<br/>
  23. </div>
  24. {{ end }}<br/>
  25. </div>
  26. <div class="post-footer-page">
  27. <div class="date"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></div>
  28. {{ $pathJSON := (print .Permalink "bridgy.json") }}
  29. {{ $relpathJSON := (print .RelPermalink "bridgy.json") }}
  30. {{ if fileExists $relpathJSON }}
  31. <div class="syndication">
  32. {{ $mJSON := getJSON $pathJSON }}
  33. Syndicated to <a href="{{ printf $mJSON.url}}">Pleroma</a>
  34. </div>
  35. {{ end }}
  36. <div class="info">
  37. {{ with .Page.Params.Blog }}{{ partial "taxonomy/blog.html" . }}{{ end }}
  38. {{ with .Page.Params.category }}{{ partial "taxonomy/categories.html" . }}{{ end }}
  39. {{ with .Page.Params.tag }}{{ partial "taxonomy/tags.html" . }}{{ end }}
  40. </div>
  41. </div>
  42. <a href="https://brid.gy/publish/mastodon"></a>
  43. <div class="interactions"><h4>Interactions</h4></div>
  44. <div class="webmention-form">
  45. <form action="https://webmention.io/deluvi.com/webmention" method="post">
  46. <label>Did you mention this {{ .Type }} on your website? Put the URL of your post here:</label><br/>
  47. <input name="source" type="url"/>
  48. <input name="target" value="{{ .Permalink }}" type="hidden"/>
  49. <input value="Send Webmention" type="submit"/>
  50. </form>
  51. </div>
  52. {{ $pathJSON := (print "data" (strings.TrimSuffix "/" .RelPermalink) ".json") }}
  53. {{ if fileExists $pathJSON }}
  54. <div class="webmentions">
  55. {{ $mJSON := getJSON $pathJSON }}
  56. <div class="like interaction"><h4>Likes</h4>{{ partial "likes.html" $mJSON }}</div>
  57. <div class="share interaction"><h4>Shares</h4>{{ partial "shares.html" $mJSON }}</div>
  58. <h4>Comments & Replies</h4>{{ partial "webmention.html" $mJSON }}
  59. </div>
  60. {{ end }}
  61. </aside></div>
  62. </article>
  63. {{ else if eq .Type "bookmarkof" }}
  64. {{ $cats := slice }}
  65. {{ range .Site.Data.bookmarks }}
  66. {{ $cats = $cats | append .category }}
  67. {{ end }}
  68. {{ $cats = uniq $cats | sort }}
  69. {{ range $cats }}
  70. {{ $cat := . }}
  71. <h4>{{ $cat }}</h4>
  72. {{ range $.Site.Data.bookmarks }}
  73. {{ if eq .category $cat }}
  74. <section data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  75. <div class="author" style="display:none">
  76. <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>
  77. </div>
  78. <aside>
  79. <article class="h-cite">
  80. <u><a href="{{ .bookmarkof | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a></u> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  81. </article>
  82. </aside>
  83. </section>
  84. {{ end }}
  85. {{ end }}
  86. {{ end }}
  87. {{ else }}
  88. {{ if .Params.inreplyto }}<article class="h-entry" id="response">{{ end }}
  89. {{ if .Params.likeof }}<article class="h-entry" id="response">{{ end }}
  90. {{ if .Params.repostof }}<article class="h-entry" id="response">{{ end }}
  91. <div class="author">
  92. <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>
  93. </div>
  94. <aside>
  95. {{ if .Params.inreplyto }}<p> Replied to {{ end }}
  96. {{ if .Params.likeof }}<p> Liked {{ end }}
  97. {{ if .Params.repostof }}<p>Shared {{ end }}
  98. someone's
  99. {{ if .Params.likeof }}<a href="{{ .Params.likeof }}" class="u-like-of"> post</a>{{ end }}
  100. {{ if .Params.inreplyto }}<a href="{{ .Params.inreplyto }}" class="u-in-reply-to"> post</a>{{ end }}
  101. {{ if .Params.repostof }}<a href="{{ .Params.repostof }}" class="u-repost-of"> post</a>{{ end }}</p>
  102. {{ if .Content }}<div class="p-name p-content">{{ .Content }}</div><br/> {{end}}
  103. <a href="{{ .RelPermalink }}" class="link u-url time"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></a>
  104. </aside>
  105. </article>
  106. {{end}}
  107. {{end}}