Source code for website arcusiridis.com
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.

116 lines
4.5 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. <!-- Prematurely connect to the servers to save some milliseconds -->
  2. <!-- <link rel="preload"> is only in recent browser versions, so we keep "dns-prefetch" and "preconnect" -->
  3. <!-- <link rel="prefetch" loads content the user may request *after* the page loads -->
  4. {{- with $.Site.Params.thumbnail -}}
  5. <meta name="thumbnail" content="{{ partial "make_link" (dict "URL" . "Root" $) }}" />
  6. {{- end -}}
  7. {{ partial "fontawesome/head.html" . }}
  8. {{ partial "matomo/head.html" . }}
  9. {{ partial "styles" (dict "Asset" "css/foundation.css" "Root" $) }}
  10. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  11. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.2/js/foundation.min.js"></script>
  12. <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.5.3/css/foundation.css">
  13. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.6/lunr.min.js" defer=""></script>
  14. {{- $assets := slice -}}
  15. {{- .Scratch.Set "sitevar" $.Site -}}
  16. {{- partial "css/color/parse_color" .Scratch -}}
  17. {{- .Scratch.Set "label" "alt_bg" -}}
  18. {{- partial "css/color/detect_light_or_dark" .Scratch -}}
  19. {{- if ($.Scratch.Get "alt_bg_is_dark") -}}
  20. {{- if or $.Site.Params.http2 (getenv "HUGO_HTTP2") -}}
  21. {{- partial "styles" (dict "Asset" "css/dark.css" "Root" $) -}}
  22. {{- else -}}
  23. {{- .Scratch.Set "code_css" "css/dark.css" -}}
  24. {{- end -}}
  25. {{- else -}}
  26. {{- if or $.Site.Params.http2 (getenv "HUGO_HTTP2") -}}
  27. {{- partial "styles" (dict "Asset" "css/light.css" "Root" $) -}}
  28. {{- else -}}
  29. {{- .Scratch.Set "code_css" "css/light.css" -}}
  30. {{- end -}}
  31. {{- end -}}
  32. {{ partial "styles" (dict "Src" "/styles.css" "Root" $) }}
  33. {{- if or $.Site.Params.http2 (getenv "HUGO_HTTP2") -}}
  34. {{ $files := slice "reset" "fonts" "classes" "pagination" "page" "widgets" }}
  35. {{ range $f := $files }}
  36. {{- partial "styles" (dict "Asset" (printf "css/%s.css" $f) "Root" $ ) -}}
  37. {{- end -}}
  38. {{ end }}
  39. {{- if not (or $.Site.Params.http2 (getenv "HUGO_HTTP2")) -}}
  40. {{- $reset := resources.Get "css/reset.css" -}}
  41. {{- $codecss := resources.Get (.Scratch.Get "code_css") -}}
  42. {{- $fonts := resources.Get "css/fonts.css" -}}
  43. {{- $classes := resources.Get "css/classes.css" -}}
  44. {{- $pagination := resources.Get "css/pagination.css" -}}
  45. {{- $page := resources.Get "css/page.css" -}}
  46. {{- $widgets := resources.Get "css/widgets.css" -}}
  47. {{- $css := slice $reset $codecss $fonts $classes $pagination $page $widgets | resources.Concat "css/bundle.css" | fingerprint -}}
  48. {{- partial "styles" (dict "Src" $css.RelPermalink "Integrity" $css.Data.Integrity "Root" $ ) -}}
  49. {{- end -}}
  50. {{ if eq .Kind "page" }}
  51. {{ partial "styles" (dict "Asset" "css/single.css" "Root" $) }}
  52. {{ else }}
  53. {{ partial "styles" (dict "Asset" "css/list.css" "Root" $) }}
  54. {{ end }}
  55. {{ if .Content -}}
  56. {{ $figures := findRE "<figure" .Content -}}
  57. {{ $forms := findRE "<input" .Content -}}
  58. {{ $tables := findRE "<table" .Content -}}
  59. {{ if gt (len $figures) 0 }}
  60. {{ partial "styles" (dict "Asset" "css/figure.css" "Root" $) }}
  61. {{ end }}
  62. {{ if or (gt (len $forms) 0) $.Site.Params.comments.provider }}
  63. {{ partial "styles" (dict "Asset" "css/forms.css" "Root" $) }}
  64. {{ end }}
  65. {{ if gt (len $tables) 0 }}
  66. {{ partial "styles" (dict "Asset" "css/table.css" "Root" $) }}
  67. {{ end }}
  68. {{ end -}}
  69. {{ if $.Site.Params.iubenda.id }}
  70. {{ partial "styles" (dict "Asset" "css/iubenda.css" "Root" $) }}
  71. {{ end }}
  72. {{- $url := "" -}}
  73. {{- $integrity := "" -}}
  74. {{- if $.Site.Params.no_minify -}}
  75. {{- $res := resources.Get "css/print.css" | fingerprint -}}
  76. {{- $url = $res.RelPermalink -}}
  77. {{- $integrity = $res.Data.Integrity -}}
  78. {{- else -}}
  79. {{- $res := resources.Get "css/print.css" | minify | fingerprint -}}
  80. {{- $url = $res.RelPermalink -}}
  81. {{- $integrity = $res.Data.Integrity -}}
  82. {{- end -}}
  83. <link rel="preload" media="print" type="text/css" href="{{ partial "make_link" (dict "URL" $url "Root" $) }}" integrity="{{ $integrity }}" as="style">
  84. {{- partial "shortcodes/partial.html" (dict "Prop" "head" "Root" $) -}}
  85. {{- partial "sidebar/partial.html" (dict "Prop" "head" "Root" $) -}}
  86. {{- partial "comments/partial.html" (dict "Prop" "head" "Root" $) -}}
  87. {{- partial "plugins/partial.html" (dict "Prop" "head" "Root" $) -}}
  88. {{ partial "matomo/head2.html" . }}
  89. {{- partial "favicons.html" . -}}