refactor(footer): add footer/include.html

To include HTML code for style and script
This commit is contained in:
Jimmy Cai 2020-09-17 19:47:03 +02:00
parent 841508f491
commit 845834baa6
No known key found for this signature in database
GPG key ID: 3EA408E527F37B18
4 changed files with 6 additions and 5 deletions

View file

@ -9,8 +9,6 @@
</main>
{{- block "right-sidebar" . -}}{{ end }}
</div>
{{ partial "footer/script.html" . }}
{{ partial "footer/style.html" . }}
{{ partial "footer/custom.html" . }}
{{ partial "footer/include.html" . }}
</body>
</html>

View file

@ -1,7 +1,7 @@
<script src="https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js"
integrity="sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g=" crossorigin="anonymous"></script>
{{ $opts := dict "minify" hugo.IsProduction }}
{{ $script := resources.Get "ts/main.ts" | js.Build $opts }}
{{- $opts := dict "minify" hugo.IsProduction -}}
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>

View file

@ -0,0 +1,3 @@
{{ partialCached "footer/components/script.html" . }}
{{ partialCached "footer/components/custom-font.html" . }}
{{ partial "footer/custom.html" . }}