theme: remove duplicate path warning #926

This commit is contained in:
Sören Weber 2024-10-13 13:55:49 +02:00
parent 1b78cd6f42
commit 0c81706cf5
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 6 additions and 6 deletions

View file

@ -125,19 +125,19 @@ Chroma auto run:
{{- end }} {{- end }}
{{- with resources.Get "css/theme.css" }} {{- with resources.Get "css/theme.css" }}
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }} {{- $themecontent := print `{{- $assetBusting := partialCached "assetbusting.gotmpl" . -}}\n@import "{{ printf "variables.css%s" $assetBusting }}";` "\n\n" .Content }}
{{- $variantcontent := print `@import "variables.css` $assetBusting `";` "\n\n" .Content }}
{{- range $page.Site.Params.boxStyle }} {{- range $page.Site.Params.boxStyle }}
{{- $identifier := upper .identifier }} {{- $identifier := upper .identifier }}
{{- $identifierl := lower .identifier }} {{- $identifierl := lower .identifier }}
{{- $variantcontent = print $variantcontent {{- $themecontent = print $themecontent
"\n.cstyle." $identifierl " {" "\n.cstyle." $identifierl " {"
"\n --VARIABLE-BOX-color: var(--INTERNAL-BOX-" $identifier "-color);" "\n --VARIABLE-BOX-color: var(--INTERNAL-BOX-" $identifier "-color);"
"\n --VARIABLE-BOX-TEXT-color: var(--INTERNAL-BOX-" $identifier "-TEXT-color);" "\n --VARIABLE-BOX-TEXT-color: var(--INTERNAL-BOX-" $identifier "-TEXT-color);"
"\n}\n" "\n}\n"
}} }}
{{- end }} {{- end }}
{{- $cssres := $variantcontent | resources.FromString "css/theme.css" }} {{- $themeres := $themecontent | resources.FromString (printf "%s.txt" ($themecontent | md5)) }}
{{- $cssres := $themeres | resources.ExecuteAsTemplate "css/theme.css" (dict) }}
{{- /* the following code causes Hugo to generate our css file - although it is in comments */}}<!-- {{ $cssres.RelPermalink }} --> {{- /* the following code causes Hugo to generate our css file - although it is in comments */}}<!-- {{ $cssres.RelPermalink }} -->
{{- end }} {{- end }}

View file

@ -11,8 +11,8 @@
<link href="{{"css/auto-complete.css" | relURL}}{{ $assetBusting }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/auto-complete.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"></noscript> <link href="{{"css/auto-complete.css" | relURL}}{{ $assetBusting }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/auto-complete.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"></noscript>
<link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"> <link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet">
<link href="{{"css/fonts.css" | relURL}}{{ $assetBusting }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fonts.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"></noscript> <link href="{{"css/fonts.css" | relURL}}{{ $assetBusting }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fonts.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"></noscript>
<link href="{{"css/theme.css" | relURL}}{{ $assetBusting }}" rel="stylesheet">
{{- $themevariants := partialCached "_relearn/themeVariants.gotmpl" . }} {{- $themevariants := partialCached "_relearn/themeVariants.gotmpl" . }}
<link href="{{"css/theme.css" | relURL}}{{ $assetBusting }}" rel="stylesheet">
{{- with index $themevariants 0 }} {{- with index $themevariants 0 }}
<link href="{{(printf "css/theme-%s.css" .identifier) | relURL}}{{ $assetBusting }}" rel="stylesheet" id="R-variant-style"> <link href="{{(printf "css/theme-%s.css" .identifier) | relURL}}{{ $assetBusting }}" rel="stylesheet" id="R-variant-style">
<link href="{{(printf "css/chroma-%s.css" .chroma) | safeHTML | relURL}}{{ $assetBusting }}" rel="stylesheet" id="R-variant-chroma-style"> <link href="{{(printf "css/chroma-%s.css" .chroma) | safeHTML | relURL}}{{ $assetBusting }}" rel="stylesheet" id="R-variant-chroma-style">

View file

@ -1 +1 @@
6.4.0+758f74d4a9ebfe9084c82d12a1806689179e919b 6.4.0+1b78cd6f42b0183b5e7408cb43032c270d960cbf