Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/J-Siu/hugo-theme-sk3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-08-23 07:08:25 +0300
committerJohn Siu (imacpro) <john.sd.siu@gmail.com>2020-08-23 07:08:25 +0300
commit29a52ff8ae5bd2fa279d17df5b57e1e8cba20c3b (patch)
tree49f08ac4bd84d0cec441069924deb3d30e963704
parentabee5f8baa0f36439f0678ff6960de1be4c83429 (diff)
- add async to script
- mv script to head - mv css to footer
-rw-r--r--layouts/partials/footer.html25
-rw-r--r--layouts/partials/head.html25
2 files changed, 24 insertions, 26 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index e33bd80..5acf60b 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -17,16 +17,21 @@
</footer>
-<!--scripts-->
-{{if or site.Menus.main site.Params.socialshare (default true .Params.toc)}}
-<script>
- openToc=false
- {{with site.Params.openToc}}openToc={{.}}{{end}}
-</script>
-<script src="{{relLangURL ""}}js/sk3.js"></script>
-
-{{end}}
-
+<!--css-->
+<link rel="stylesheet" href="{{relLangURL ""}}css/sk3.css">
+<!--site.Params-->
+<style>
+ {{with site.Params.card.width}}
+ @media only screen and (min-width: 993px){:root{--card-width: {{.}};}}
+ {{end}}
+ {{with site.Params.pagewidth}}
+ @media only screen and (min-width: 993px){:root{--html-width: {{.}};}}
+ {{end}}
+ {{with site.Params.color.bg}}:root{--bg-color:{{.}};}{{end}}
+ {{with site.Params.color.border}}:root{--border-color:{{.}};}{{end}}
+ {{with site.Params.color.link}}:root{--link-color:{{.}};}{{end}}
+ {{with site.Params.color.text}}:root{--text-color:{{.}};}{{end}}
+</style>
<!--custom css-->
{{range site.Params.custom_css}}
<link rel="stylesheet" href="{{.|relURL}}">
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 32f184a..5de6b50 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -15,25 +15,18 @@
{{with .Params.author}}<meta name="author" content="{{.}}">{{end}}
{{with .Language}}<meta http-equiv="content-language" content="{{.}}">{{end}}
{{if site.Params.user_canonical}}<link rel="canonical" href="{{absURL .Permalink}}"/>{{end}}
- <!--css-->
- <link rel="stylesheet" href="{{relLangURL ""}}css/sk3.css">
- <!--site.Params-->
- <style>
- {{with site.Params.card.width}}
- @media only screen and (min-width: 993px){:root{--card-width: {{.}};}}
- {{end}}
- {{with site.Params.pagewidth}}
- @media only screen and (min-width: 993px){:root{--html-width: {{.}};}}
- {{end}}
- {{with site.Params.color.bg}}:root{--bg-color:{{.}};}{{end}}
- {{with site.Params.color.border}}:root{--border-color:{{.}};}{{end}}
- {{with site.Params.color.link}}:root{--link-color:{{.}};}{{end}}
- {{with site.Params.color.text}}:root{--text-color:{{.}};}{{end}}
- </style>
<!--favicon-->
{{with site.Params.favicon}}<link rel="icon" href="{{.}}">{{end}}
+ <!--scripts-->
+ {{if or site.Menus.main site.Params.socialshare (default true .Params.toc)}}
+ <script>
+ openToc=false
+ {{with site.Params.openToc}}openToc={{.}}{{end}}
+ </script>
+ <script async src="{{relLangURL ""}}js/sk3.js"></script>
+ {{end}}
<!--custom scripts-->
{{range site.Params.custom_js}}
- <script src="{{.|relURL}}"></script>
+ <script defer src="{{.|relURL}}"></script>
{{end}}
</head> \ No newline at end of file