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.

89 lines
4.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
  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. {{ partial "bookmarks.html" . }}
  65. {{ else }}
  66. <section data-post-type="{{ .Params.posttype }}" data-post-id="{{ .Params.slug }}" class="h-entry">
  67. <div class="author" style="display:none;">
  68. <a rel="author" class="u-author h-card" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Title }}<img src="/images/profile.jpg"/></a>
  69. </div>
  70. <aside>
  71. <article class="u-{{ .Params.posttype }} h-cite">
  72. {{ if .Params.inreplyto }}<p> Replied to {{ end }}
  73. {{ if .Params.likeof }}<p> Liked {{ end }}
  74. {{ if .Params.repostof }}<p>Shared {{ end }}
  75. someone's
  76. {{ if .Params.likeof }}<a href="{{ .Params.likeof }}" class="link u-url"> post</a>{{ end }}
  77. {{ if .Params.inreplyto }}<a href="{{ .Params.inreplyto }}" class="link u-url"> post</a>{{ end }}
  78. {{ if .Params.repostof }}<a href="{{ .Params.repostof }}" class="link u-url"> post</a>{{ end }}</p>
  79. {{ if .Content }}<div class="e-content">{{ .Content }}</div><br/> {{end}}
  80. <div class="post-footer"><span class="date"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "02/01/2006 15:04 GMT" }}</time></span></div>
  81. </article>
  82. </aside>
  83. </section>
  84. {{end}}
  85. {{end}}