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.

69 lines
3.5 KiB

4 years ago
4 years ago
4 years ago
  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://sakino.kelbie.scot">{{ .Site.Params.Author }}<img src="/images/profile1.jpg"/></a>
  6. </section>
  7. <section class="post_content">
  8. <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 "2 Jan 2006 15:04 GMT" }}</time></a></span>
  9. <section class="e-content"><section class="e-content p-name">
  10. {{ .Content }}
  11. {{ if eq .Type "photo"}}
  12. <section class="photogrid">
  13. {{ range .Page.Params.Photo }}
  14. {{ if isset . "value" }}
  15. <a href="{{ .value }}"><img class="u-photo" src="{{ .value }}" alt="{{ .alt }}"/></a>
  16. {{ else }}
  17. <a href="{{ . }}"><img class="u-photo" src="{{ . }}" alt=" Trying to fix"/></a>
  18. {{end}}
  19. {{end}}
  20. </section>
  21. {{end}}
  22. {{ if eq .Type "article" }}<section class="p-summary" style="display:none">
  23. {{ .Page.Params.summary }}<br/>
  24. </section>
  25. {{ end }}<br/>
  26. </section>
  27. <section class="info">
  28. {{ if not (eq .Type "article") }}<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span>{{ end }}<br/>
  29. </section></section>
  30. </article>
  31. {{ else if eq .Type "bookmarkof" }}
  32. <section class="bookmarks">{{ $cats := slice }}
  33. {{ range .Site.Data.bookmarks }}
  34. {{ $cats = $cats | append .category }}
  35. {{ end }}
  36. {{ $cats = uniq $cats | sort }}
  37. {{ range $cats }}
  38. {{ $cat := . }}
  39. <section id="{{ $cat }}">
  40. <h4>{{ $cat }}</h4>
  41. {{ range $.Site.Data.bookmarks }}
  42. {{ if eq .category $cat }}
  43. <article data-post-type="bookmark-of" data-post-id="{{ .Params.slug }}" class="bookmark h-entry">
  44. <section class="h-cite">
  45. <a href="{{ (index . "bookmark-of") | absURL }}" class="u-bookmark-of" target="_blank">{{ .name }}</a> - <div class="p-name p-content">{{ .content | markdownify }}</div>
  46. </section>
  47. </article>
  48. {{ end }}
  49. {{ end }}</section>
  50. {{ end }}</section>
  51. {{ else}}
  52. <article class="h-entry" id="response">
  53. <section class="author" style="display:none;">
  54. <a rel="author" class="p-author h-card" rel="me" href="https://jon.kelbie.scot">{{ .Site.Params.Author }}<img src="/images/profile1.jpg"/></a>
  55. </section>
  56. <section id="response-details"><br/><p class="response-top">{{ .Site.Params.Firstname }}
  57. {{ 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 }}
  58. {{ if eq .Params.posttype "like-of" }} liked <a href="{{ index .Params "like-of" }}" class="u-like-of">{{ index .Params "like-of" }}</a>{{ end }}
  59. {{ if eq .Params.posttype "repost-of" }} shared <a href="{{ index .Params "repost-of" }}" class="u-repost-of">{{ index .Params "repost-of" }}</a>{{ end }}</p>
  60. {{ if .Content }}<span class="p-name p-content"><p>{{ .Content }}</p></span> {{end}}
  61. {{ if not (eq .Type "article") }}<section class="info">
  62. <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/>
  63. </section>
  64. </section>
  65. </article>{{ end }}
  66. {{ end }}
  67. {{end}}