Move all layouts to platters theme

This commit is contained in:
Eryn Wells 2024-10-07 21:39:17 -07:00
parent de8101efed
commit 66adceaf24
91 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{{ $imports := dict }}
{{ if eq 0 1 }}
{{ with $tsModuleResources := resources.Match "scripts/modules/*/*" }}
{{ range $tsModuleResources }}
{{ $resource := . }}
{{ if eq (path.Ext .) ".ts" }}
{{ $resource = . | js.Build }}
{{ end }}
{{/*
Create imports for these scripts that look like $dirname/$basename
where basename doesn't have the extension
*/}}
{{ $directoryBasename := path.Base (path.Dir $resource) }}
{{ $key := path.Join $directoryBasename (path.BaseName $resource) }}
{{ $imports = merge $imports (dict $key $resource.RelPermalink) }}
{{ end }}
{{ end }}
{{ else }}
{{ $imports = dict "modules/" "scripts/modules/" }}
{{ end }}
{{ $importmap := dict }}
{{ if gt (len $imports) 0 }}
{{ $importmap = dict "imports" $imports }}
{{ end }}
{{ return $importmap }}