feat: initial import
This commit is contained in:
commit
03ab1091b1
50 changed files with 1146 additions and 0 deletions
21
layouts/_partials/head/css.html
Normal file
21
layouts/_partials/head/css.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{{ range resources.Match "css/*.scss" }}
|
||||
{{ with resources.Get . }}
|
||||
{{ $name := . }}
|
||||
{{ $opts := dict
|
||||
"enableSourceMap" hugo.IsDevelopment
|
||||
"outputStyle" (cond hugo.IsDevelopment "expanded" "compressed")
|
||||
"targetPath" (replace $name ".scss" ".css")
|
||||
"transpiler" "dartsass"
|
||||
"vars" site.Params.styles
|
||||
}}
|
||||
{{ with . | toCSS $opts }}
|
||||
{{ if hugo.IsDevelopment }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{ else }}
|
||||
{{ with . | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
18
layouts/_partials/head/js.html
Normal file
18
layouts/_partials/head/js.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{{- with resources.Get "js/main.js" }}
|
||||
{{- $opts := dict
|
||||
"minify" (not hugo.IsDevelopment)
|
||||
"sourceMap" (cond hugo.IsDevelopment "external" "")
|
||||
"targetPath" "js/main.js"
|
||||
}}
|
||||
{{- with . | js.Build $opts }}
|
||||
{{- if hugo.IsDevelopment }}
|
||||
<script src="{{ .RelPermalink }}"></script>
|
||||
{{- else }}
|
||||
{{- with . | fingerprint }}
|
||||
<script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
<script src="https://unpkg.com/feather-icons"></script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue