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.

121 lines
4.6 KiB

5 years ago
5 years ago
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. <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.5.3/css/foundation.css">
  12. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.6/lunr.min.js" defer=""></script>
  13. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.2/js/foundation.min.js"></script>
  14. <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.7/css/fork-awesome.css">
  15. {{- $assets := slice -}}
  16. {{- .Scratch.Set "sitevar" $.Site -}}
  17. {{- partial "css/color/parse_color" .Scratch -}}
  18. {{- .Scratch.Set "label" "alt_bg" -}}
  19. {{- partial "css/color/detect_light_or_dark" .Scratch -}}
  20. {{- if ($.Scratch.Get "alt_bg_is_dark") -}}
  21. {{- if or $.Site.Params.http2 (getenv "HUGO_HTTP2") -}}
  22. {{- partial "styles" (dict "Asset" "css/dark.css" "Root" $) -}}
  23. {{- else -}}
  24. {{- .Scratch.Set "code_css" "css/dark.css" -}}
  25. {{- end -}}
  26. {{- else -}}
  27. {{- if or $.Site.Params.http2 (getenv "HUGO_HTTP2") -}}
  28. {{- partial "styles" (dict "Asset" "css/light.css" "Root" $) -}}
  29. {{- else -}}
  30. {{- .Scratch.Set "code_css" "css/light.css" -}}
  31. {{- end -}}
  32. {{- end -}}
  33. {{ partial "styles" (dict "Src" "/styles.css" "Root" $) }}
  34. {{- if or $.Site.Params.http2 (getenv "HUGO_HTTP2") -}}
  35. {{ $files := slice "reset" "fonts" "classes" "pagination" "page" "widgets" }}
  36. {{ range $f := $files }}
  37. {{- partial "styles" (dict "Asset" (printf "css/%s.css" $f) "Root" $ ) -}}
  38. {{- end -}}
  39. {{ end }}
  40. {{- if not (or $.Site.Params.http2 (getenv "HUGO_HTTP2")) -}}
  41. {{- $reset := resources.Get "css/reset.css" -}}
  42. {{- $codecss := resources.Get (.Scratch.Get "code_css") -}}
  43. {{- $fonts := resources.Get "css/fonts.css" -}}
  44. {{- $classes := resources.Get "css/classes.css" -}}
  45. {{- $pagination := resources.Get "css/pagination.css" -}}
  46. {{- $page := resources.Get "css/page.css" -}}
  47. {{- $widgets := resources.Get "css/widgets.css" -}}
  48. {{- $css := slice $reset $codecss $fonts $classes $pagination $page $widgets | resources.Concat "css/bundle.css" | fingerprint -}}
  49. {{- partial "styles" (dict "Src" $css.RelPermalink "Integrity" $css.Data.Integrity "Root" $ ) -}}
  50. {{- end -}}
  51. {{ if eq .Kind "page" }}
  52. {{ partial "styles" (dict "Asset" "css/single.css" "Root" $) }}
  53. {{ else }}
  54. {{ partial "styles" (dict "Asset" "css/list.css" "Root" $) }}
  55. {{ end }}
  56. {{ if .Content -}}
  57. {{ $figures := findRE "<figure" .Content -}}
  58. {{ $forms := findRE "<input" .Content -}}
  59. {{ $tables := findRE "<table" .Content -}}
  60. {{ if gt (len $figures) 0 }}
  61. {{ partial "styles" (dict "Asset" "css/figure.css" "Root" $) }}
  62. {{ end }}
  63. {{ if or (gt (len $forms) 0) $.Site.Params.comments.provider }}
  64. {{ partial "styles" (dict "Asset" "css/forms.css" "Root" $) }}
  65. {{ end }}
  66. {{ if gt (len $tables) 0 }}
  67. {{ partial "styles" (dict "Asset" "css/table.css" "Root" $) }}
  68. {{ end }}
  69. {{ end -}}
  70. {{ if $.Site.Params.iubenda.id }}
  71. {{ partial "styles" (dict "Asset" "css/iubenda.css" "Root" $) }}
  72. {{ end }}
  73. {{- $url := "" -}}
  74. {{- $integrity := "" -}}
  75. {{- if $.Site.Params.no_minify -}}
  76. {{- $res := resources.Get "css/print.css" | fingerprint -}}
  77. {{- $url = $res.RelPermalink -}}
  78. {{- $integrity = $res.Data.Integrity -}}
  79. {{- else -}}
  80. {{- $res := resources.Get "css/print.css" | minify | fingerprint -}}
  81. {{- $url = $res.RelPermalink -}}
  82. {{- $integrity = $res.Data.Integrity -}}
  83. {{- end -}}
  84. <link rel="preload" media="print" type="text/css" href="{{ partial "make_link" (dict "URL" $url "Root" $) }}" integrity="{{ $integrity }}" as="style">
  85. {{- partial "shortcodes/partial.html" (dict "Prop" "head" "Root" $) -}}
  86. {{- partial "sidebar/partial.html" (dict "Prop" "head" "Root" $) -}}
  87. {{- partial "comments/partial.html" (dict "Prop" "head" "Root" $) -}}
  88. {{- partial "plugins/partial.html" (dict "Prop" "head" "Root" $) -}}
  89. {{ partial "matomo/head2.html" . }}
  90. {{- partial "favicons.html" . -}}