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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2020-08-29 18:06:02 +0300
committerJimmy Cai <jimmehcai@gmail.com>2020-08-29 18:06:02 +0300
commit3385a34d284145a3242bf02759a6b65f18a50185 (patch)
tree54d63e952600f9daa0992369d2f04bc103be6768 /layouts/partials/footer
parent1b948ed8c8b61cff93f87f02614df1a26907dc79 (diff)
feat: load custom font asynchronously
Diffstat (limited to 'layouts/partials/footer')
-rw-r--r--layouts/partials/footer/style.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/layouts/partials/footer/style.html b/layouts/partials/footer/style.html
index f4f83f1..8e2ff37 100644
--- a/layouts/partials/footer/style.html
+++ b/layouts/partials/footer/style.html
@@ -1 +1,11 @@
-<link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap" rel="stylesheet"> \ No newline at end of file
+<script>
+ (function () {
+ const customFont = document.createElement('link');
+ customFont.href = "https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap";
+
+ customFont.type = "text/css";
+ customFont.rel = "stylesheet";
+
+ document.head.appendChild(customFont);
+ }());
+</script> \ No newline at end of file