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.

72 lines
3.0 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. {{ $custom := resources.Get "css/custom.css" }}
  16. {{ if eq .Site.Params.hackcss.disabled true }}
  17. {{ with (slice $custom | resources.Concat "styles.css").Content }}
  18. {{ if gt (len .) 0 }}
  19. <style>{{ . | safeCSS }}</style>
  20. {{ partial "meta/theme-color.html" . }}
  21. {{ end }}
  22. {{ end }}
  23. {{ else }}
  24. {{ $hack := resources.Get "css/vendor/hack/hack.css" }}
  25. {{ $standard := resources.Get "css/vendor/hack/standard.css" }}
  26. {{ $dark := resources.Get "css/vendor/hack/dark.css" }}
  27. {{ $darkgrey := resources.Get "css/vendor/hack/dark-grey.css" }}
  28. {{ $solarizeddark := resources.Get "css/vendor/hack/solarized-dark.css" }}
  29. {{ $theme := resources.Get "css/theme.css" | minify }}
  30. {{ if eq .Site.Params.hackcss.palette "dark-grey" }}
  31. {{ if eq .Site.Params.hackcss.mode "standard" }}
  32. {{ with (slice $hack $standard $darkgrey $theme $custom | resources.Concat "styles.css").Content }}
  33. <style>{{ . | safeCSS }}</style>
  34. {{ partial "meta/theme-color.html" . }}
  35. {{ end }}
  36. {{ else }}
  37. {{ with (slice $hack $darkgrey $theme $custom | resources.Concat "styles.css").Content }}
  38. <style>{{ . | safeCSS }}</style>
  39. {{ partial "meta/theme-color.html" . }}
  40. {{ end }}
  41. {{ end }}
  42. {{ else if eq .Site.Params.hackcss.palette "solarized-dark" }}
  43. {{ if eq .Site.Params.hackcss.mode "standard" }}
  44. {{ with (slice $hack $standard $solarizeddark $theme $custom | resources.Concat "styles.css").Content }}
  45. <style>{{ . | safeCSS }}</style>
  46. {{ partial "meta/theme-color.html" . }}
  47. {{ end }}
  48. {{ else }}
  49. {{ with (slice $hack $solarizeddark $theme $custom | resources.Concat "styles.css").Content }}
  50. <style>{{ . | safeCSS }}</style>
  51. {{ partial "meta/theme-color.html" . }}
  52. {{ end }}
  53. {{ end }}
  54. {{ else }}
  55. {{ if eq .Site.Params.hackcss.mode "standard" }}
  56. {{ with (slice $hack $standard $dark $theme $custom | resources.Concat "styles.css").Content }}
  57. <style>{{ . | safeCSS }}</style>
  58. {{ partial "meta/theme-color.html" . }}
  59. {{ end }}
  60. {{ else }}
  61. {{ with (slice $hack $dark $theme $custom | resources.Concat "styles.css").Content }}
  62. <style>{{ . | safeCSS }}</style>
  63. {{ partial "meta/theme-color.html" . }}
  64. {{ end }}
  65. {{ end }}
  66. {{ end }}
  67. {{ end }}