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.

87 lines
5.9 KiB

5 years ago
4 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
5 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
5 years ago
4 years ago
5 years ago
  1. {{ define "main" }}
  2. <section class="about h-feed">
  3. <section class="profile title h-card p-author">
  4. <section class="profile-left"><img class="u-photo" src="/images/profile.jpg" alt="profile picture"></section>
  5. <section class="profile-right">
  6. <a rel="author" class="title p-name u-url u-uid" rel="me" href="https://jk.nipponalba.scot">{{ .Site.Params.Author }}</a><br/>
  7. <ul class="social-links">
  8. {{ range $item := .Site.Params.socialIcons }}
  9. <a href="{{ $item.url | safeURL }}" rel="me" >
  10. <i class="fa {{ $item.icon }}" aria-hidden="true" title="{{ $item.title }}"></i>
  11. </a>
  12. {{ end }}
  13. </ul>
  14. <section class="description">
  15. <p class="p-note">{{ .Site.Params.description }}</p>
  16. </section>
  17. </section>
  18. <section style="display:none">
  19. <span class="p-country-name">Scotland or Japan</span>
  20. <a class="u-email" rel="me" href="mailto:jk@nipponalba.scot"></a>
  21. <a class="u-url" rel="me" href="https://social.nipponalba.scot/jk"></a>
  22. <a class="u-url" rel="me" href="https://px.nipponalba.scot/jk"></a>
  23. <span class="p-category">Craft Beer</span>
  24. <span class="p-category">Single Malt Whisky</span>
  25. <span class="p-category">Homebrewing</span>
  26. <span class="p-category">Scottish Politics</span>
  27. <span class="p-category">Scottish History</span>
  28. <span class="p-category">Japanese History</span>
  29. <span class="p-category">Tech</span>
  30. <span class="p-category">Veganism</span>
  31. <span class="p-category">Cooking</span>
  32. </section>
  33. </section>
  34. <h1>Latest posts</h1>
  35. {{ range (first 3 (where .Site.RegularPages "Type" "!=" "response")) }}
  36. <article class="post h-entry entry">
  37. {{ if eq .Type "article"}}{{ with .Page.Params.images }}{{ partial "taxonomy/image.html" . }}{{ end }}<h3 class="p-name entry-title"><a href="{{ .Permalink}}" class="u-url">{{ .Title }}</a></h3>{{ end }}
  38. <section class="e-content">{{ if not (eq .Type "article")}}{{ .Content }}{{ else}}{{ .Summary }}{{ end }}
  39. {{ if eq .Type "photo"}}
  40. <section class="photos">
  41. {{$link := .Permalink}}
  42. {{$summary := .Content}}
  43. {{ range .Page.Params.Photo }}
  44. {{ if isset . "value" }}
  45. <a href="{{ $link }}" class="u-url"><img class="u-photo thumb" src="{{ replace .value "800." "600."}}" title="{{ .alt }}" alt="{{ .alt }}"/></a>
  46. {{ else }}
  47. <a href="{{ $link }}" class="u-url"><img class="u-photo thumb" src="{{ replace . "800." "600."}}" title="{{ $summary }}" alt="Alt not yet added, will fix!"/></a>
  48. {{ end }}
  49. {{end}}
  50. </section>
  51. {{end}}
  52. </section>
  53. <section class="info">
  54. {{ if eq .Type "article" }}
  55. <span class="info-date"><time class="dt-published" datetime="{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}">{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}</time></span><span class="reading-time">{{ .ReadingTime }}-minute read</span><br/><br/>
  56. <span class="blogs_span">{{ with .Page.Params.Blog }}<i class="fa fa-pencil-square-o fa-1.5x fa-fw" aria-hidden="true" title="Tags"></i><b> {{ partial "taxonomy/blog.html" . }}{{ end }}</b></span><br/>
  57. <span class="categories_span">{{ with .Page.Params.category }}<i class="fa fa-tags fa-1.5x fa-fw" aria-hidden="true" title="Tags"></i>{{ partial "taxonomy/categories.html" . }}{{ end }}{{ with .Page.Params.tag }}, {{ partial "taxonomy/tags.html" . }}{{ end }}</span>
  58. {{ else }}
  59. {{ $mention_ids := index $.Site.Data.index .RelPermalink }}
  60. {{ $mentions := apply $mention_ids "index" $.Site.Data.mentions "." }}
  61. {{ $.Scratch.Set "likecount" 0 }}
  62. {{ $.Scratch.Set "sharecount" 0 }}
  63. {{ $.Scratch.Set "commentcount" 0 }}
  64. {{ $.Scratch.Set "mentioncount" 0 }}
  65. {{ range $mentions }}
  66. {{ if eq (index . "wm-property") "like-of" }}{{ $.Scratch.Add "likecount" 1 }}{{ end }}
  67. {{ if eq (index . "wm-property") "repost-of" }}{{ $.Scratch.Add "sharecount" 1 }}{{ end }}
  68. {{ if eq (index . "wm-property") "in-reply-to" }}{{ $.Scratch.Add "commentcount" 1 }}{{ end }}
  69. {{ if eq (index . "wm-property") "mention" }}{{ $.Scratch.Add "mentioncount" 1 }}{{ end }}
  70. {{ end }}
  71. <a href="{{ .Permalink }}"><span class="mini_interactions">{{ $likecount := $.Scratch.Get "likecount" }}{{ if ne $likecount 0 }} <i class="fa fa-thumbs-up fa-1.5x fa-fw" aria-hidden="true" title="Likes"></i>{{$likecount}} like{{if gt $likecount 1}}s{{end}}{{end}}
  72. {{ $sharecount := $.Scratch.Get "sharecount" }}{{ if ne $sharecount 0 }} <i class="fa fa-share fa-1.5x fa-fw" aria-hidden="true" title="Shares"></i>{{$sharecount}} share{{if gt $sharecount 1}}s{{end}}{{end}}
  73. {{ $commentcount := $.Scratch.Get "commentcount" }}{{ if ne $commentcount 0 }} <i class="fa fa-comment fa-1.5x fa-fw" aria-hidden="true" title="Replies"></i>{{$commentcount}} repl{{if gt $commentcount 1}}ies{{else}}y{{end}}{{end}}
  74. {{ $mentioncount := $.Scratch.Get "mentioncount" }}{{ if ne $mentioncount 0 }} <i class="fa fa-sticky-note fa-1.5x fa-fw" aria-hidden="true" title="Mentions"></i>{{$mentioncount}} mention{{if gt $mentioncount 1}}s{{end}}{{end}}</span></a>
  75. <span class="info-date-other"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}">{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}</time></a>
  76. <span class="syndication">
  77. {{ with .Page.Params.pleromaurl }} -
  78. Syndication: <a href="{{ . }}"><i class="fa fa-pleroma fa-1.5x fa-fw" aria-hidden="true" title="Pleroma"></i></a>{{ end }}</span><span class="categories_span_other">{{ with .Page.Params.category }}{{ partial "taxonomy/categories.html" . }}{{ end }}{{ with .Page.Params.tag }}, {{ partial "taxonomy/tags.html" . }}{{ end }}</span></span>
  79. {{ end }}
  80. </section>
  81. <a href="https://brid.gy/publish/mastodon"></a>
  82. </article>
  83. {{ end }}
  84. </section>
  85. {{ end }}