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.

58 lines
3.0 KiB

  1. {{ define "main" }}
  2. <section class="archive">
  3. <section class="archive-listing">
  4. <span class="list-title">{{if not (eq .Name "Blog")}}{{ .Name }}{{ end }}{{if eq .Name "Blog"}}All Blogs{{ end }} <a href="{{ .Permalink }}index.xml"><i class="fa fa-rss fa-2x fa-fw" aria-hidden="true" title="{{ .Name }} RSS feed"></i></a></span>
  5. {{ if eq .Type "article" "blog"}}<ul class="listing">{{ range .Data.Pages.GroupByDate "2006" }}
  6. {{ range .Pages }}
  7. <li class="archive-listing-item">
  8. {{ if eq .Type "blog"}}
  9. <span class="list-blog"><a class="u-url" href="{{ .Permalink }}" title="{{ .Title }}">
  10. {{ $image := (replace .Title " " "") }}
  11. {{ $image := print "/images/" $image ".jpg" }}
  12. <img class="banner" src="{{ ( $image | urlize ) | relLangURL }}" />
  13. <span class="p-name entry-title">{{ .Title }}</span></a>
  14. </span>
  15. {{end}}
  16. {{ if eq .Type "article"}}
  17. <span class="list-article h-entry entry"><a class="u-url" href="{{ .Permalink }}">
  18. {{ with .Page.Params.Image }}{{ partial "image.html" . }}{{ end }}<span class="p-name entry-title">{{ .Title }}</span>
  19. <section class="e-content">{{ .Description }}</section>
  20. </a></span>
  21. {{end}}
  22. </li>
  23. {{ end }}{{end}}</ul>{{else}}
  24. <ul class="listing">
  25. {{ range .Pages }}
  26. <li class="archive-listing-item">
  27. {{ if not (eq .Type "note" "photo") }}
  28. {{ if eq .Type "article"}}
  29. <span class="list-article h-entry entry"><a class="u-url" href="{{ .Permalink }}">
  30. {{ with .Page.Params.Image }}{{ partial "image.html" . }}{{ end }}<span class="p-name entry-title">{{ .Title }}</span>
  31. <section class="e-content">{{ .Description }}</section>
  32. </a></span>
  33. {{else}}<span class="listing-post"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</span>{{end}}{{else}}
  34. {{ if eq .Type "note"}}
  35. <span class="list-category"><a class="u-url" href="{{ .Permalink }}" title="{{ .Title }}">
  36. <span class="note-banner">{{ humanize .Type }}</span>
  37. <span class="p-summary e-content"><p>{{ .Summary }}</p></span></a>
  38. </span>{{else}}
  39. <article class="list-category index-photo h-entry entry"><a class="u-url" href="{{ .Permalink }}">
  40. <section class="e-content">
  41. <section class="photos">
  42. {{ range first 1 .Page.Params.Photo }}
  43. {{ if isset . "value" }}
  44. <img class="u-photo thumb" src="{{ replace .value "800." "300."}}" alt="{{ .alt }}"/>
  45. {{ else }}
  46. <img class="u-photo thumb" src="{{ replace . "800." "300."}}" alt="Alt not yet added, will fix!"/>
  47. {{ end }}
  48. {{end}}
  49. </section>
  50. </section>
  51. </a></article>{{end}}{{end}}
  52. </li>
  53. {{ end }}</ul>
  54. {{ end }}
  55. </section>
  56. </section>
  57. {{ end }}