add: feature of sass

This commit is contained in:
Junyi Hou 2024-04-09 19:18:45 +08:00
parent d57d8a7958
commit d979f023f4
7 changed files with 96 additions and 45 deletions

View file

@ -54,6 +54,29 @@
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/light.css") }}
{{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/dark.css") }}
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
{{ range site.Params.customCSS }}
{{ with resources.Get . | toCSS $opts | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ end }}
{{ if site.Params.isso.enabled }} {{/* TODO: maybe we can remove it */}}
<style>
#isso-thread .textarea {
color: #000;
}
#isso-thread .isso-feedlink {
position: relative;
z-index: 1;
}
</style>
{{ end }}
{{ if .Site.Params.copyCodeButton | default true }}
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }}
{{ end }}