From 1632803e91854e95920e356c1beee73f646ea89a Mon Sep 17 00:00:00 2001 From: Sped0n Date: Mon, 30 Oct 2023 15:57:13 +0800 Subject: [PATCH] refactor(plugin/style.html): improve code formatting and indentation for better readability --- layouts/partials/plugin/style.html | 88 +++++++++++++++++++----------- 1 file changed, 55 insertions(+), 33 deletions(-) diff --git a/layouts/partials/plugin/style.html b/layouts/partials/plugin/style.html index ffe3afc..8bf6d98 100644 --- a/layouts/partials/plugin/style.html +++ b/layouts/partials/plugin/style.html @@ -1,36 +1,58 @@ {{- if strings.HasPrefix .Source " + + {{- else -}} + + {{- end -}} {{- end -}} -{{- with .Content -}} -{{- $resource = resources.FromString $.Path . -}} -{{- end -}} -{{- if $resource -}} -{{- with .Template -}} -{{- $resource = $resource | resources.ExecuteAsTemplate . $.Context -}} -{{- end -}} -{{- with .ToCSS -}} -{{- $options := . | merge (dict "outputStyle" "compressed") -}} -{{- $resource = $resource | toCSS $options -}} -{{- end -}} -{{- if .Minify -}} -{{- $resource = $resource | minify -}} -{{- end -}} -{{- with .Fingerprint -}} -{{- $resource = $resource | fingerprint . -}} -{{- $integrity = $resource.Data.Integrity -}} -{{- end -}} -{{- $href = $resource.RelPermalink -}} -{{- end -}} -{{- if .Defer -}} - - -{{- else -}} - -{{- end -}} -{{- end -}} \ No newline at end of file +