Merge pull request #15 from francisbarton/patch-2
Add custom CSS option - fixes issue #14
This commit is contained in:
commit
a75faae0d7
|
@ -43,6 +43,12 @@
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="{{ .Site.BaseURL }}css/main.css" />
|
<link rel="stylesheet" type="text/css" media="screen" href="{{ .Site.BaseURL }}css/main.css" />
|
||||||
{{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}}
|
{{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/dark.css" {{ if eq .Site.Params.mode "auto" }}media="(prefers-color-scheme: dark)"{{ end }} />
|
<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/dark.css" {{ if eq .Site.Params.mode "auto" }}media="(prefers-color-scheme: dark)"{{ end }} />
|
||||||
|
{{ end }}
|
||||||
|
<!-- Custom CSS style get applied last -->
|
||||||
|
{{- if isset .Site.Params "customcss" }}
|
||||||
|
{{ range .Site.Params.customCSS }}
|
||||||
|
<link rel="stylesheet" type="text/css" ref="{{ . | relURL }}">
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- range .Site.Params.customJS }}
|
{{- range .Site.Params.customJS }}
|
||||||
{{- if or (hasPrefix . "http://") (hasPrefix . "https://") }}
|
{{- if or (hasPrefix . "http://") (hasPrefix . "https://") }}
|
||||||
|
@ -51,4 +57,4 @@
|
||||||
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
|
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue