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.

64 lines
2.3 KiB

4 years ago
  1. {{/*
  2. Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
  3. This file is part of After Dark.
  4. After Dark is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. After Dark is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. */}}
  15. {{ define "title" -}}
  16. {{ .Title }} | {{ .Site.Title }}
  17. {{- end }}
  18. {{ define "header" }}
  19. {{ partial "masthead.html" . }}
  20. {{ end }}
  21. {{ define "main" }}
  22. <header>
  23. <h1>{{ .Title }}</h1>
  24. {{ if .Description }}
  25. <blockquote itemprop="description">{{ .Description }}</blockquote>
  26. {{ end }}
  27. </header>
  28. {{ .Content }}
  29. <footer>
  30. <hr>
  31. <p>
  32. Published
  33. {{ with .Params.categories }}
  34. in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "category-link.html" ".") "chomp" ".") ", " " and " }}</span>
  35. {{ end }}
  36. {{ with .Params.features }}
  37. using {{ delimit (apply (apply (sort .) "partial" "feature-link.html" ".") "chomp" ".") ", " " and " }}.
  38. {{ else }}
  39. using basic features.
  40. {{ end }}
  41. </p>
  42. {{ partial "post/related-content.html" . }}
  43. </footer>
  44. {{ end }}
  45. {{ define "footer" }}
  46. <hr>
  47. <small class="muted">
  48. {{ partial "copyright-notice.html" . }}
  49. </small>
  50. {{ if in .Page.RelPermalink "toxic-swamp" }}
  51. {{ if eq .Params.slug "toxic-swamp" }}
  52. {{ $config_generator := resources.Get "/js/config-generator.js" }}
  53. <script src="{{ $config_generator.Permalink }}" integrity="{{ ($config_generator | resources.Fingerprint "sha512").Data.Integrity }}"></script>
  54. {{ else if in .Page.RelPermalink "configuration" }}
  55. {{ $configuration := resources.Get "/js/configuration.js" }}
  56. <script src="{{ $configuration.Permalink }}" integrity="{{ ($configuration | resources.Fingerprint "sha512").Data.Integrity }}"></script>
  57. {{ end }}
  58. {{ end }}
  59. {{ end }}