mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-17 11:39:29 -07:00
chore(link.html): update critical style source and options to improve performance and maintainability
chore(link.html): update main style source and options to improve performance and maintainability chore(link.html): remove unused meta.html file chore(nav.html): update decrement and increment buttons to use Unicode characters for better accessibility chore(plugin/style.html): update style plugin to support inline styles for critical CSS chore(plugin/style.html): update style plugin to support minification and fingerprinting for main CSS chore(plugin/style.html): remove script plugin as it is no longer used chore(plugin/style.html): update style plugin to support inline styles for critical CSS chore(plugin/style.html): update style plugin to support minification and fingerprinting for main CSS chore(resources/imageJSON.html): update image resize options for better performance and quality
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
{{- if .Content -}}
|
||||
<script type="text/javascript">
|
||||
{{- .Content | safeJS -}}
|
||||
</script>
|
||||
{{- else if strings.HasPrefix .Source "<script" -}}
|
||||
{{- safeHTML .Source -}}
|
||||
{{- else -}}
|
||||
{{- $src := .Source -}}
|
||||
{{- $integrity := .Integrity -}}
|
||||
{{- if $src -}}
|
||||
{{- if (urls.Parse $src).Host | not -}}
|
||||
{{- $resource := resources.Get $src -}}
|
||||
{{- with .Template -}}
|
||||
{{- $resource = $resource | resources.ExecuteAsTemplate . $.Context -}}
|
||||
{{- end -}}
|
||||
{{- with .ToESBuild -}}
|
||||
{{- $resource = $resource | js.Build . -}}
|
||||
{{- end -}}
|
||||
{{- if .Minify -}}
|
||||
{{- $resource = $resource | minify -}}
|
||||
{{- end -}}
|
||||
{{- with .Fingerprint -}}
|
||||
{{- $resource = $resource | fingerprint . -}}
|
||||
{{- $integrity = $resource.Data.Integrity -}}
|
||||
{{- end -}}
|
||||
{{- $src = $resource.RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with .Link -}}
|
||||
{{- $src = . -}}
|
||||
{{- end -}}
|
||||
<script
|
||||
type="text/javascript"
|
||||
src="{{ $src }}"
|
||||
{{ if .Crossorigin }}crossorigin="anonymous"{{ end }}{{ with $integrity }}
|
||||
integrity="{{ . }}"
|
||||
{{ end }}{{ if .Async }}async{{ end }}{{ if .Defer }}defer{{ end }}{{ with .Attr }}
|
||||
{{ . | safeHTMLAttr }}
|
||||
{{ end }}
|
||||
></script>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user