2022-11-13 10:55:17 +01:00
|
|
|
{{- $page := .page }}
|
|
|
|
{{- $outputFormat := .outputFormat }}
|
|
|
|
{{- if not $page }}
|
|
|
|
{{- $page = . }}
|
|
|
|
{{- $outputFormat = partial "output-format.hugo" $page }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with $page }}
|
2022-02-06 13:51:54 +01:00
|
|
|
{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
|
2022-07-15 14:07:48 +02:00
|
|
|
{{ "<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use -->" | safeHTML }}
|
2022-07-18 01:17:25 +02:00
|
|
|
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"></noscript>
|
|
|
|
<link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"></noscript>
|
2022-02-06 13:51:54 +01:00
|
|
|
<link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-07-08 00:10:17 +02:00
|
|
|
<link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-07-18 01:17:25 +02:00
|
|
|
<link href="{{"css/fonts.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fonts.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"></noscript>
|
2022-02-06 13:51:54 +01:00
|
|
|
<link href="{{"css/theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-02-21 23:11:04 +01:00
|
|
|
{{- $themevariants := slice | append (.Site.Params.themeVariant | default "relearn-light" ) }}
|
2022-02-13 01:53:23 +01:00
|
|
|
{{- with index $themevariants 0 }}
|
2022-03-28 11:56:51 +02:00
|
|
|
<link href="{{(printf "css/theme-%s.css" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" id="variant-style">
|
2022-02-06 13:51:54 +01:00
|
|
|
{{- end }}
|
2022-05-28 22:58:55 +02:00
|
|
|
<link href="{{"css/ie.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-02-21 00:35:50 +01:00
|
|
|
<link href="{{"css/variant.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-07-09 18:42:20 +02:00
|
|
|
<link href="{{"css/print.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print">
|
2022-11-12 23:21:21 +01:00
|
|
|
{{- $f := printf "/static/css/format-%s.css" $outputFormat }}
|
2022-11-12 15:16:53 +01:00
|
|
|
{{- if partialCached "fileExists.hugo" $f $f }}
|
2022-11-12 23:21:21 +01:00
|
|
|
<link href="{{(printf "css/format-%s.css" $outputFormat) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-07-09 18:42:20 +02:00
|
|
|
{{- end }}
|
2022-11-18 09:02:39 +01:00
|
|
|
<script src="{{"js/url.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
|
2022-02-20 23:58:16 +01:00
|
|
|
<script src="{{"js/variant.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
|
2022-02-13 02:11:27 +01:00
|
|
|
<script>
|
2022-03-07 17:22:20 +01:00
|
|
|
{{ "// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:" | safeJS }}
|
|
|
|
{{ "// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72" | safeJS }}
|
2022-11-02 00:14:19 +01:00
|
|
|
{{- with .Site.Home.OutputFormats.Get "JSON" }}
|
|
|
|
window.index_json_url={{ "index.json" | relLangURL }};
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Site.Home.OutputFormats.Get "SEARCH" }}
|
|
|
|
window.index_js_url={{ "index.search.js" | relLangURL }};
|
|
|
|
{{- end }}
|
2022-03-07 17:22:20 +01:00
|
|
|
var root_url="/";
|
|
|
|
var baseUri=root_url.replace(/\/$/, '');
|
|
|
|
{{ "// translations" | safeJS }}
|
|
|
|
window.T_Copy_to_clipboard = '{{ T "Copy-to-clipboard" | safeJS }}';
|
|
|
|
window.T_Copied_to_clipboard = '{{ T "Copied-to-clipboard" | safeJS }}';
|
|
|
|
window.T_Copy_link_to_clipboard = '{{ T "Copy-link-to-clipboard" | safeJS }}';
|
|
|
|
window.T_Link_copied_to_clipboard = '{{ T "Link-copied-to-clipboard" | safeJS }}';
|
2022-11-17 22:12:18 +01:00
|
|
|
window.T_No_results_found = '{{ T "No-results-found" | safeJS }}';
|
|
|
|
window.T_N_results_found = '{{ T "N-results-found" | safeJS }}';
|
2022-03-07 17:22:20 +01:00
|
|
|
{{ "// some further base stuff" | safeJS }}
|
2022-03-07 18:25:33 +01:00
|
|
|
var baseUriFull='{{ trim .Site.BaseURL "/" | safeJS }}/';
|
2022-02-20 23:58:16 +01:00
|
|
|
{{- $quotedthemevariants := slice }}
|
|
|
|
{{- range $themevariants }}
|
2022-03-07 18:25:33 +01:00
|
|
|
{{- $quotedthemevariants = $quotedthemevariants | append (printf "'%s'" .) }}
|
2022-02-20 23:58:16 +01:00
|
|
|
{{- end }}
|
2022-07-09 19:46:39 +02:00
|
|
|
window.variants && variants.init( [ {{ delimit $quotedthemevariants ", " | safeJS }} ] );
|
2022-02-13 02:11:27 +01:00
|
|
|
</script>
|
2022-11-13 10:55:17 +01:00
|
|
|
{{- end }}
|