github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/partials/stylesheet.html (about) 1 {{- $page := .page }} 2 {{- $outputFormat := .outputFormat }} 3 {{- if not $page }} 4 {{- $page = . }} 5 {{- $outputFormat = partial "output-format.hugo" $page }} 6 {{- end }} 7 {{- with $page }} 8 {{- $assetBusting := not .Site.Params.disableAssetsBusting }} 9 {{ "<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use -->" | safeHTML }} 10 <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> 11 <link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> 12 <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> 13 <link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> 14 <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> 15 <link href="{{"css/theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> 16 {{- $themevariants := partialCached "get-theme-variants.hugo" . }} 17 {{- $themevariantmodifier := .Site.Params.themeVariantModifier | default "" }} 18 {{- with index $themevariants 0 }} 19 <link href="{{(printf "css/theme-%s%s.css" .identifier $themevariantmodifier) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" id="R-variant-style"> 20 <link href="{{(printf "css/chroma-%s.css" .chroma) | safeHTML | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" id="R-variant-chroma-style"> 21 {{- end }} 22 <link href="{{"css/variant.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> 23 <link href="{{"css/print.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print"> 24 {{- $f := printf "/static/css/format-%s.css" $outputFormat }} 25 {{- if or (partialCached "fileExists.hugo" $f $f) (resources.Get (printf "/css/format-%s.css" $outputFormat)) }} 26 <link href="{{(printf "css/format-%s.css" $outputFormat) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> 27 {{- end }} 28 <link href="{{"css/ie.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"> 29 <script src="{{"js/url.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> 30 <script src="{{"js/variant.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script> 31 <script> 32 window.relearn = window.relearn || {}; 33 window.relearn.relBasePath='{{ partial "relBasePath.hugo" $page | safeJS }}'; 34 window.relearn.relBaseUri='{{ partial "relBaseUri.hugo" $page | safeJS }}'; 35 window.relearn.absBaseUri='{{ replaceRE "/*$" "" .Site.BaseURL | safeJS }}'; 36 {{- with .Site.Home.OutputFormats.Get "json" }} 37 {{- warnf "%q: DEPRECATED usage of 'json' output format found, use 'search' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/customization#activate-search" $page.File.Filename }} 38 window.index_json_url={{ "index.json" | relLangURL }}; 39 {{- end }} 40 {{- with .Site.Home.OutputFormats.Get "search" }} 41 window.index_js_url={{ "index.search.js" | relLangURL }}; 42 {{- end }} 43 {{ "// variant stuff" | safeJS }} 44 window.relearn.themeVariantModifier='{{ $themevariantmodifier }}'; 45 {{- $quotedthemevariants := slice }} 46 {{- range $themevariants }} 47 {{- $quotedthemevariants = $quotedthemevariants | append (printf "'%s'" .identifier) }} 48 {{- end }} 49 window.variants && variants.init( [ {{ delimit $quotedthemevariants ", " | safeJS }} ] ); 50 {{ "// translations" | safeJS }} 51 {{ printf "window.T_Copy_to_clipboard = `%s`;" (T `Copy-to-clipboard`) | safeJS }} 52 {{ printf "window.T_Copied_to_clipboard = `%s`;" (T `Copied-to-clipboard`) | safeJS }} 53 {{ printf "window.T_Copy_link_to_clipboard = `%s`;" (T `Copy-link-to-clipboard`) | safeJS }} 54 {{ printf "window.T_Link_copied_to_clipboard = `%s`;" (T `Link-copied-to-clipboard`) | safeJS }} 55 {{ printf "window.T_Reset_view = `%s`;" (T `Reset-view`) | safeJS }} 56 {{ printf "window.T_View_reset = `%s`;" (T `View-reset`) | safeJS }} 57 {{ printf "window.T_No_results_found = `%s`;" (T "No-results-found") | safeJS }} 58 {{ printf "window.T_N_results_found = `%s`;" (T "N-results-found") | safeJS }} 59 </script> 60 {{- end }}